Jump to content

[Solved] Cgi And Perl Scripts Returnss 500 Error


Recommended Posts

Posted

Hi,

I am learning perl. I created a hello world example file called "test.pl" and the URL is: http://netrix.ml/cgi-bin/test.pl

When I visit this page via browser it returns 500 error. I'd chmoded it to 755. But still not worked. The test.pl contains following code:

#!/usr/bin/perl

 

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

 

print "Hello, Perl!";

Posted

You used the wrong file encoding http://netrix.ml/cgi-bin/test2.pl Linux is very particular about dos line endings. I recommend using the file manager in cpanel, then click the code editor button to make sure your files have proper linux encoding. Either that or you can use an editor like notepad++ on windows.

Guest
This topic is now closed to further replies.
×
×
  • Create New...