Movable type CGI woes

apps

#1

Hi. I just came over to DreamHost and have been working on a new installation of MT 2.661. I followed the directions here [ http://www.wombatnation.com/misc/installMTDreamHost.htm] exactly, and checked them against MT’s own installation instructions just in case.

I find myself hung up at the mt-check.cgi point. All I get is the actual CGI source. I have checked all my permissions and they are correct. The Movable Type Troubleshooting for this particular problem doesn’t help much, only says that CGI must not be turned on on my server (I’m on a shared plan), but I think it has to be, right?

I uninstalled everything and then reinstalled it all according to the instructions a total of three times, and I still can’t make it work correctly.

I’m not sure if this is related, but just in case, in the Domains>Web>Edit HTTP part of the Dreamhost Panel, I do have it checked to run PHP as CGI.

Any insight is appreciated.


#2

Make sure mt-check.cgi is executable.

$ ls -l mt-check.cgi
-rwxr-xr-x 1 username groupname 4789 Feb 22 2003 mt-check.cgi

If you don’t see the x’s, do the following:

$ chmod 755 mt-check.cgi

Make sure all the cgi files in the mt directory (except for mt-db-pass.cgi) are executable.

$ ls -l mt-db-pass.cgi
-rw------- 1 username groupname 8 Feb 15 2003 mt-db-pass.cgi

Robert
http://www.wombatnation.com/


#3

Also, running PHP as CGI is irrelevant for Movable Type. MT is written in Perl, not PHP.

Robert
http://www.wombatnation.com/


#4

Thank you Robert.

I verified the things you suggested and all the settings are correct. I’m still having the problem though. Any other ideas?

Heidi


#5

More info.

I deleted the last install of MT2.661 (again), deactivated my one mysql database, made a new one, waited a couple hours, and basically started over from the very beginning on Robert’s instructions. I did it all one more time according to the instructions, exactly. And again in Mozilla I still just get the CGI script on mt-check.cgi.

I tried it in IE, and it gave me mt-check.cgi as the script, but in a Notepad file.

I’m really at a loss for how to make this work!


#6

I saw in another thread someone saying that they had to get DreamHost customer support to enable CGI for their site. Normally, this is enabled by default, but you might want to check with DreamHost support to be sure.

Here’s something else to try. Create a new file with the following contents (not including the asterisks):


#!/usr/bin/python print "Content-type: text/html" print print "<pre>" import os, sys print "<strong>Python %s</strong>" % sys.version for (x,y) in os.environ.items(): print "%s\t%s" % (x, y) print "</pre>"*********

Save it in your root directory with a name like py-test.cgi. Make sure the line that starts with a # is the first line in the file. Also, make sure the file is executable:

$ chmod 755 py-test.cgi

Then, load the URL in your web browser like so:
http://yourdomain.com/py-test.cgi

If it worked, you will see a bunch of lines of text that begin with a line something like:
Python 2.1.3 (#1, Sep 7 2002, 15:29:56)

This is a basic test of whether Python CGI scripts can run on your site. Admittedly, MT is written in Perl, not Python, but I don’t know Perl very well. At least this will help verify whether cgi is enabled in general for your site.

Robert
http://www.wombatnation.com/


#7

I tried the test you suggested. This is the output I got:

#!/usr/bin/python print “Content-type: text/html” print print "
"
import os, sys
print “Python %s” % sys.version
for (x,y) in os.environ.items():
print “%s\t%s” % (x, y)
print “

I’ll ask support about the CGI situation.

Thanks again!
Heidi


#8

Good news, I am not completely technologically inept after all.

This came from support today:


[quote]When I get to the step “mt-check.cgi” and test it in my browser, I do not get an Internal Server Error, but a page of CGI script. See http://www.mydomain.com/mt/mt-check.cgi

[/quote]

I apologize for this - we had a bug wherein your account was not automatically set up for CGI when it should have been. I’ve changed this, and your account should be CGI-enabled within a few hours, after the web server configuration reloads.

Sorry again for any trouble this caused! If there’s anything else we can help with, please let us know.


Thanks Robert.
Heidi