Cgi not working at all

software development

#1

I’ve been using PHP and am now trying to use some Perl CGI scripts. I’ve uploaded them in ASCII mode, set the permissions properly, and they have a proper extension, yet when I try to load them up all I see is the source code in the browser.

I did see this: “If scripts aren’t being run from the web, but are just showing their source code instead, you may have CGI turned off for that domain!To turn it on, simply go to the Domains > Manage section of our web panel and click the [edit] link to the right of the “http” service for the domain you’re having trouble with!” at https://panel.dreamhost.com/kbase/index.cgi?area=342

But once I go there the only things I see about CGI are the options for running PHP as CGI and what user the CGI should run as.

Anyone have any ideas?


#2

I think this is just bad / outdated documentation - I’m pretty sure we just enable it everywhere now. Hard to say what’s happening here without an example, but you might want to submit a support request. If you want to post a link to one of the scripts in question, I’ll try to take a look at it (maybe not 'til tomorrow).


#3

http://faintlyscreaming.net/cgi-bin/ucount.pl is the script I couldn’t get to work.

I just started a new subdomain for a friend’s cgi scripts and the scripts actually seem to work but I keep getting Internal Server Errors. ARGH

I shall be putting in a support request shortly, although any help here is also appreciated.


#4

Well CGI wasn’t enabled (it’s an old domain from when this was still an option). I went ahead and changed that for you.

That script doesn’t seem to output anything when I run it from the command line, though.

BTW, the permissions on it were wrong too - the script was set to 0777 instead of 0755.