Perl cgi displaying as text or error 500 [FIXES]
For those experiencing problems with perl script rendering as text or returning Server 500 errors, then here are some things to check to get things working.
1. Make sure you are calling your cgi script from the correct directory. This is usually:
/public_html/cgi-bin/
If your trying to use cgi from a subdirectory then you will have to update your Apache configuration accordingly.
2. Make sure the permissions set on your cgi-bin and files within are set to 755, using 777 will not work as it is an su_exec security violation.
3. Make sure your “shebang” line contains the path to your perl install e.g:
#!d:/perl/bin/perl
or
#!/usr/local/bin/perl -w
The addition of -w will evoke warnings from the console.
4. Also make sure to upload any Perl files in ASCII format and not as binary; this should be pre-configured for .pl extensions in your FTP program, but make sure.
Related Articles
- 08.04.11: Rename SMTP Banner Exim (1)
- 14.02.11: Perl files download instead of executing / processing (fixed) (0)
- 11.10.11: RSForm minimum character for phone | phone validation Joomla (0)
- 21.03.11: Display mail log in CentOS Linux (0)
- 17.06.11: Sales order error in Magento Sage Pay (0)









Comments RSS Feed





Additionally, Plesk servers, have the cgi-bin dir above httpdocs
Go to Top of the page