cgi scripts not running, path to perl problem?

cranius

Verified User
Joined
Feb 18, 2012
Messages
6
I'm trying to run cgi scripts in my cgi folder, and instead of the script running and doing something, I just see the script (hope that makes sense).
This started when I tried to set up a contact form, and then uploaded FormMail.pl in my cgi bin folder. But instead of the script running, I just see a printout of the script. I then tried uploading a Test.pl file that should display the words "Hello World" but instead it prints out the script again.
I think it is a problem with the Path to Perl, and it may be because my directadmin account has multiple (three) websites on it and the path to perl is not usual? The website I'm trying to get cgi scripts to run in is http://www.cranialborborygmus.com but again I have two other domains on the account as well. Is that the problem, and or how do I specify the path to perl?
In any event, the problem is that instead of the script running (or even getting an error message), I just end up seen the script in my browser window when I try to run it.
Here's the link to my test file... cranialborborygmus.com/cgi-bin/test.pl
The file is set to 755
It should print "Hello World" but instead I just see the script...
Thanks in advance for any guidance or suggestions!
 
solved!

Hello,

Is perl/cgi-bin enabled for your user and domain?

Alex,
Thanks! That was the problem, CGI was OFF!
I posted here before asking my webhost because their support can be a bit slow and sometimes they don't seem to know why things don't work. I expected i would get an answer here. Anyway, after posting here, I kept working on the problem, then created a support ticket with my host (describing my problem like I did here). I then keep working on it even more, and then saw via my control panel settings that CGI-BIN said OFF. I updated my support ticket asking if my CGI was off, and then my host got back to me saying it had been off and they turned it on.
Bottom line, now the perl scripts work! I was just confused (and spent a lot of time) because I couldn't find anything on google that described my problem of scripts in the cgi bin not running but simply printing out, when the simple solution was that it meant cgi support was not turned on. Most of the answers were about the "path to perl" but now I know my needed solution was quite simple. Thanks again!
 
Back
Top