Portal Home > Knowledgebase > Articles Database > running a perl script throws internal 500 error.


running a perl script throws internal 500 error.




Posted by jjk2, 12-23-2008, 03:41 AM
i tried running something like this, and when i run in browser, i get internal 500 error. but when i run it in commandline, it works fine. perl test.pl #!/usr/bin/perl print "Content-type: text/html\n\n"; print < Hello, World! END_HTML Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, 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.

Posted by Codebird, 12-23-2008, 06:39 AM
1- script may contain errors 2- script should be executable chmod 755 3- if both doesn't work contact your hosting provider

Posted by cygnusd, 12-23-2008, 12:34 PM
Also, try to check Apache (or your webserver's) error logs. You'll probably see some message there to help you troubleshoot the problem.

Posted by zacharooni, 12-23-2008, 10:15 PM
Try making it: #!/usr/bin/perl -w Also, make sure you have this in .htaccess in the cgi-bin directory: Options +ExecCGI



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
nameserver (Views: 503)
24hostingnow (Views: 498)