Run CGI on cpanel server

Hey Guys,

I am trying to run a cgi script (its a website page)...on a cpanel/whm server.

When I try to run that I get the following message:

500 Server Error
A misconfiguration on the server caused a hiccup. Check the server logs, fix the problem, then try again. URL:

I have tried running with permission 755.
Please help
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Brad HoweDevOps ManagerCommented:
Where are you executing your scripts from?

1. Did you try to put your script on cgi-bin folder. Then try to execute via   

2. You could also create a .htaccess file in the folder you are looking to use .pl scripts and add the following.

AddHandler cgi-script .pl .cgi
Options Includes ExecCGI

3. Check to make sure you have the perl compile link in the script as the first line.

Hope it helps,

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ShivtekAuthor Commented:
I have never used cgi/pl

my files are in .cgi extension and on the top it starts like this:

use CGI 'qw/:standard :html3/';

the .htaccess which is not in cgi-bin folder, but is in the domain root (public_html) has the following:

#RewriteEngine on
# Use PHP5 Single php.ini as default
#AddHandler application/x-httpd-php5s .php
AddHandler application/x-httpd-php5 .html .htm
AddHandler cgi-script cgi PHP html
AddType x-httpd-php .php .htm .htm

AddType application/x-httpd-php .php .htm .html
# AddHandler x-httpd-php .php .htm .html
<FilesMatch "\.(htm|html|php)$">
SetHandler application/x-httpd-php5

Options All -Indexes

AddHandler cgi-script .pl .cgi
Options Includes ExecCGI

Still no luck

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.