voodish logo
Skip to: Content | Navigation | Site map

Perl cgi displaying as text or error 500 [FIXES]

perl icon

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

Comments RSS Feed

2 Trackbacks/Pingbacks

  1. Pingback: Important things to consider, and choose the right web hosting plan | Uncategorized | Information about Web Hosting, Web hosting service! on July 31, 2010
  2. Pingback: Perl files download instead of executing / processing (fixed), Voodish Articles. on February 25, 2011

1 Comments

  1. voodish September 29, 2010

    Additionally, Plesk servers, have the cgi-bin dir above httpdocs

  2. Go to Top of the page

Leave a comment