Hello .. New to X10... cgi-bin issue...

devnagri

New Member
Messages
0
Reaction score
0
Points
0
I've uploaded my perl script at public_html/cgi-bin/
but I get HTTP 500 Internal server error when following file is accessed:
devnagri.x10hosting.com/cgi-bin/hello.pl
file permission is set to 755. Also tried 777 but of no avail. I also get error when run from public_html directory.

Anything missing?

regards,
 

intheclutch

New Member
Messages
72
Reaction score
0
Points
0
755 is the permission you'd want. I wonder if it's a problem with the code itself.

You might want to add these in the code:

#!/usr/bin/perl

use CGI;
use CGI::Carp qw(fatalsToBrowser);
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
Code:
#!/usr/bin/perl -wT

yet that might not be the problem. What server are you on? If it is absolut maybe try changing the extension to *.cgi !
 

devnagri

New Member
Messages
0
Reaction score
0
Points
0
I tried both suggestions, but the same 500 errror problem:
permission is set to 755.

1.) http://devnagri.x10hosting.com/cgi-bin/hello2.pl

#!/usr/bin/perl
use CGI;
use CGI::Carp qw(fatalsToBrowser);
print "<html>\n";
print "<head>\n";
print "<title>Devnagri Sample - किशॊर&nbsp;कुमार</title>\n";
print "</head>\n";
print "<body>\n";
print "Hello World\n<br>";
print "\n</body>\n";
print "</html>\n";

2.) http://devnagri.x10hosting.com/cgi-bin/hello3.pl

#!/usr/bin/perl -wT
print "<html>\n";
print "<head>\n";
print "<title>Devnagri Sample - किशॊर&nbsp;कुमार</title>\n";
print "</head>\n";
print "<body>\n";
print "Hello World\n<br>";
print "\n</body>\n";
print "</html>\n";


Please help.

thanks.
 

intheclutch

New Member
Messages
72
Reaction score
0
Points
0
Ah..you'll want this:

print "Content-type: text/html\n\n";

Put that the line before print "<html>\n";
 
Last edited:
Top