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: http://www.domain.com/cgi-bin/form1.cgi

I have tried running with permission 755.
Please help
LVL 1
ShivtekAsked:
Who is Participating?
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
http://www.mydomain.com/cgi-bin/myscript.pl   

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.
#!/usr/bin/perl


Hope it helps,
Hades666

0

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:

#!"E:\Perl\bin\perl.exe"
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
</FilesMatch>

Options All -Indexes

AddHandler cgi-script .pl .cgi
Options Includes ExecCGI

Still no luck

0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.