2008 Mar 5

Error in Movable Type: No such file or directory

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. 

0 TrackBacks

Listed below are links to blogs that reference this entry: Error in Movable Type: No such file or directory .

TrackBack URL for this entry: http://www.tildemark.com/cgi-bin/mt4/mt-tb.cgi/101

2 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

Leave a comment

About this Entry

This page contains a single entry by tildemark published on March 5, 2008 1:59 AM.

Davao meetup with Freestyle's Jinky Vidal was the previous entry in this blog.

Laser for your Eyes is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Recent Activity

Friday

  • tildemark tweeted, "im so sleepy. Zzzzzzzz"

Sunday

  • tildemark tweeted, "some of my scipts are not working with godaddy. but works fine on the others. not mention their poorly coded admin page"

Today

  • tildemark tweeted, "so many pending tasks i need to finish. need more coffee !!!"
  • tildemark tweeted, "@gmtristan i dont think that is true."

Today

  • tildemark tweeted, "how does godaddy subdomain behaves? i have some problems with it on my scripts. it does not seem to accept query strings.."

Monday

  • tildemark tweeted, "i had a hard time removing the error messages generated by surf side kick. i ended up uninstalling most of my applications."

Sunday

  • tildemark tweeted, "i got hit by surf side kick and im getting numerous error messages on my screen. tskkkkk"

Saturday

  • tildemark tweeted, "check boxes, i didn't know they can also be complex"
  • tildemark tweeted, "this smart bro internet speed is depressing, i thinking of filling a complaint to the DTI next week."

Friday

  • tildemark tweeted, "the seminar turned out to be leadership training. it was fun, learned alot. i have already attended numerous seminars but this is different."