Error in Movable Type: No such file or directory

2008 Mar 5
I fell like posting a new blog post yesterday but when i tried logging in, i got this message:

Got an error: Error opening file '/mt-config.cgi': No such file or directory
I was stunned, like being hit by Skeleton king's hammer. I haven't done anything to the installation and why this incident has happened? I begin checking the server hoping to find any problems, but there were none. I tried the forums and the documentation but there were no instance of the same problem recorded lately. Lastly i tried contacting my host to see if they have done something to the server. Well the only solution they have is to edit my cgi scripts manually and add a $ENV{'MT_HOME'} tag in it.

Here's is what i did before adding the lines above.
1. Check if your mt-config.cgi is really missing or what. if its there and you can edit it fine then it shouldn't be the problem. if its not there then edit the file mt-config.cgi.original, fill in the necessary fields and save it as mt-config.cgi.

2. If the error persists, check the file security of your mt-config.cgi. It should be 755. if its not, issue a CHMOD command.

3. If at this point the error is still there. Edit your mt.cgi script and the following line just below the use strict; line. Please note that this depends upon the location of your movable type files. In my case its at /cgi-bin/mt4 your might be different.

BEGIN { $ENV{'MT_HOME'} = '/home/username/public_html/cgi-bin/mt4'; }

your mt.cgi should look like:

use strict;
BEGIN { $ENV{'MT_HOME'} = '/home/username/public_html/cgi-bin/mt4'; }
use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
use MT::Bootstrap App => 'MT::App::CMS';

4. Do the same with your mt-search.cgi. Insert the line above just below the use strict; line

UPDATE:
There is a much easier fix to this error. Instead of manually editing your .cgi files, edit the Bootstrap.pm located at

{MT HOME}/lib/MT/bootstrap.pm

Insert this line right after sub BEGIN {

$ENV{'MT_HOME'} = '/home/userfolder/public_html/cgi-bin/mt';

Edit the line above to match to your settings. 
Tweet this post

Related Entries

4 Comments

Great! Thanks. The same thing happened to me, must be due to service providers' change to the perl configuration or version. There might be other CGI files one would wish to update, such as mt-upgrade.cgi.

yes, you will need to update every .cgi file on your mt root folder except the config file of course. Do it on all files until you don't get an error anymore

TNX! It work!

Hey, it works!

Thank you very much

Master!

Leave a comment


About Me


Alfredo Sanchez is an internet professional focusing on the study search engines behavior in particular. Supports Free Open Source Software and currently develops applications with it using XAMPP.

Recent Entries

Close