500 errors on CGI scripts

500 errors on CGI scripts

Postby midnightsun » Tue Dec 08, 2009 10:32 am

Hi all,
Every cgi script I install, I keep getting the 500 internal server error. I have cpanel on my own vps server. The path to perl is /usr/bin/perl. In the cgi scripts the path is #!/usr/bin/perl. I have tried using both paths, and have tried the path !/usr/bin/perl. Still get the internal server error. I have tried using every permission configuration and keep getting the error. I have made sure the first line in the script is the path to perl, and have put the files in the cgi_bin of my website, but nothing works.

Can someone please tell me how to install a cgi script properly. I always use php scripts because I could never get a cgi script to work. I have several cgi scripts on my hard drive that I would like to use, but need someone to tell me the proper way of installing them so I don't keep getting the internal server error.

I have shell access to the server, is there something I need to change on the server itself or is it all in just the scripts settings?

Thank you for your time.
Posts: 1
Joined: Tue Dec 08, 2009 10:23 am

Postby tony » Tue Dec 08, 2009 11:03 am


What is the permission of the file. For scripts to run properly, you must set it to 755.

You can use the command:

chmod 755 <filename>

If this is not case, then you can send and email to our support department with the file location and they will have a look.

Hope this helps.

CWH Staff
Posts: 102
Joined: Wed Jan 26, 2005 11:38 am
Location: Vancouver, BC

Return to PHP

Who is online

Users browsing this forum: No registered users and 0 guests