run cgi scripts on x10hosting

Status
Not open for further replies.

kl2217

New Member
Messages
6
Reaction score
0
Points
0
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:

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
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
 

nosunshine

New Member
Messages
9
Reaction score
1
Points
0
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:
Status
Not open for further replies.
Top