Closed Thread
Results 1 to 5 of 5

Thread: run cgi scripts on x10hosting

  1. #1
    kl2217 is offline x10Hosting Member kl2217 is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    6

    Question run cgi scripts on x10hosting

    Hi,
    I have trouble to get the cig scripts working.

    My scripts are test.cgi:

    #!usr/bin/perl

    my $var = 'this is pure perl';
    print "$var\n";

    The file is located in public_html/cig-bin/test.cgi

    when I try to access the page with url:http://kl2217.x10hosting.com/cgi-bin/test.cgi

    I get the error:
    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@kl2217.x10hosting.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    Any idea how to fix it?
    Last edited by kl2217; 01-10-2010 at 08:55 PM.

  2. #2
    nosunshine is offline x10Hosting Member nosunshine is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    9

    Re: run cgi scripts on x10hosting

    It would help if you used #!/usr/bin/perl instead of #!usr/bin/perl


  3. #3
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,436

    Re: run cgi scripts on x10hosting

    I would recommend using the extension pl over cgi, but it's your choice. Also remember to send an HTTP header of "Content-Type: text/html".

    - xav0898
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  4. #4
    nosunshine is offline x10Hosting Member nosunshine is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    9

    Re: run cgi scripts on x10hosting

    Code:
    #!/usr/bin/perl
    print "Content-type: text/html\n\n";
    
    my $var = 'this is pure perl';
    print "$var\n";
    Also, for whatever reason, /cgi-bin/*.* doesn't default to execute, so you'll need to edit the permissions for test.pl
    Last edited by nosunshine; 01-11-2010 at 09:34 AM.

  5. #5
    kl2217 is offline x10Hosting Member kl2217 is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    6

    Re: run cgi scripts on x10hosting

    Thank you guys! Now it works.

Closed Thread

Similar Threads

  1. Nuevo en x10? Lee el Tema Principal
    By ZharkD in forum Noticias y Anuncios
    Replies: 7
    Last Post: 10-21-2008, 12:43 PM
  2. Why Cannot Sign Up In Indonesia?
    By legionsa in forum Free Hosting
    Replies: 4
    Last Post: 07-17-2008, 10:38 AM
  3. Replies: 15
    Last Post: 04-20-2008, 09:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers