The ol' 500 error

Hey guys,

First time posting here. Hope there’s a solution somewhere!

I’ve been running MovableType v3.34 on a Dreamhost server for about a month. I had moved it from my old server with few problems (surprisingly)… but in the last month something odd has occurred…

Every time I try to post something new, or somebody trying to post a comment, a 500 Internal error (egads!!!) pops up. Strangely, the post (or comment) is added to the site just fine. Yet the error shows up every time an action is taken… contacting DH support didn’t help too much…

I was told to check the error.log for any specifics…

This error is entered into the log any time I try to post in MT:

[Tue Aug 07 06:03:15 2007] [error] Callback called exit at mt.cgi line 11.
[Tue Aug 07 06:03:15 2007] [error] BEGIN failed–compilation aborted at mt.cgi line 11.
[Tue Aug 07 06:03:15 2007] [error] Premature end of script headers: mt.cgi

I sent this tip to support and got this response:

"Well, it sounds like, for whatever reason, MT might be hitting the php
memory limit. I don’t know why it would do this for a simple post, but
then again, I see a lot of weird stuff with MT, so there’s no telling.
There are ways to increase the memory limit on PHP, but it is rather

You kinda have to know your way around things to do this, and we aren’t
able to help you with the process. I would recommend asking around both
on the discussion forums here, as well as at the MT forums.

This is why I use WordPress! Let me know if you have any other

Okay, well I understand they have limited resources to help specifics, but I’m not ready to abandon MT and move to Wordpress (nothing against WP, just don’t see this as my final option)…

Any ideas? I’ll admit I’m not too savvy when it comes to PHP, and obviously there is a memory overload issue here.

Any help would be appreciated.
Thanks guys.


I haven’t found anything to solve this problem, and Dreamhost support has pretty much washed their hands of it. If anyone has any ideas I’d appreciate it.

Three things:

A. Is your site set to use .cgi as php?
B. Whatever version of php you’re using now - have you tried switching to the alternate version of php in the domain setup? (You should be able to do this without compromising your site other than functionality. If it doesn’t work properly, switch it back to the first version of php.)
C. After backing up your moveable type db and scripts, have you tried updating to the latest version of MT?



I’ll admit, you have gotten me totally confused. Movable Type is a Perl program, not PHP so I have no idea what the support folks were talking about regarding PHP memory limit, re-compiling PHP, etc… That’s just bizarre. I’m not at all sure that memory has anything at all to do with it.

That said, DH does not provide support for 3rd party applications, so you can’t really expect every support representative to know all the nuances of every application someone is likely to run. In some cases, they might be better off just saying, “sorry, we don’t support that” rather than trying to help if they really know nothing about the program in question (I’m sure whoever responded to you was just trying to be helpful; they obviously don’t know much about mt :wink: ).

Anyway, your problem is likely related to whatever is in line 11 of the file mt.cgi (according to your error log). MT is a pretty stable application, so I doubt that there is something inherently wrong with the code, and that assumption seems likely to be correct given that you have run it successfully on another host.This makes me think that your configuration of MT may have a problem with the DreamHost environment.

Did you re-install MT from scratch on DreamHost, or did you “move” the code from your old host onto DreamHost servers? This is important for many reasons, including the fact that DreamHost runs cgi under suexec, and permissions need to be set differently on files and folders here than they do on other hosts.

This is often the cause of “500 Internal Server errors” on DreamHost when running Perl scripts (which MT is - not PHP at all).

If you can let me know about how you installed MT on DreamHost, and provide say the 1st 20 lines of mt.cgi, I’ll try to help you get this sorted.


Movable Type is written in Perl, and the PHP configuration should have nothing to do with it’s operation.

Your troubleshooting suggestions are, however, very good for troubleshooting problems with software running PHP. :slight_smile:


rlparker: Yeah, guess I made an error in judgement. I “moved” the MT environment, rather than install from scratch. However, ironically it was under the advisement from support… they seemed to think nothing would break, so to speak. But you’re right, they can’t know everything! :wink:

mt.cgi reads as follows:

#!/usr/bin/perl -w

Copyright 2001-2007 Six Apart. This code cannot be redistributed without

permission from For more information, consult your

Movable Type license.

$Id: mt.cgi 1003 2007-01-05 23:46:47Z gboggs $

use strict;
use lib $ENV{MT_HOME} ? “$ENV{MT_HOME}/lib” : ‘lib’;
use MT::Bootstrap App => ‘MT::App::CMS’;

It stops there…

Perhaps upgrading/installing MT4 would do the trick? I currently run v3.

Thanks for the help guys!

Yeah, I was wondering about that. I’d never heard of .cgi being enabled for php.