Help - Search - Members - Calendar
Full Version: Mt-config.cgi Missing?
Movable Type Community Forum > Installing and Upgrading > Basic Installation and Setup
larinalou
I've just moved my domain across to a new server, changed the nameservers and still waiting for things to catch up on my isp but trying to re-install MT in the meantime.

I've uploaded everything to the new server via FTP, and by using the temporary web address (since the dns info is cached on my isp) I've run the mt-check.cgi script ... which worked fine and told me everything was ready to go.

However, now when I try to load mt.cgi (also via the temporary web address), I get a message saying:

Got an error: Error opening file '/mt-config.cgi': No such file or directory

I'm positive the file is there ... I've checked and re-uploaded multiple times and can't find anything wrong with it.

Could this simply be because my isp has cached the dns info and won't let me refresh yet, thereby somehow screwing up the mt-config.cgi file settings? Or do I have a real problem?
larinalou
Definitely seems to be something wrong. The domain has come across and is no longer stuck in the cache on my isp. http://lost-dreaming.net/ is loading fine for me .... but http://lost-dreaming.net/mt/mt.cgi is still telling me "Got an error: Error opening file '/mt-config.cgi': No such file or directory" ... I know the file is there, so can't figure out what the problem is. Any ideas or suggestions greatly appreciated! Thanks!
PRO IT Service
Hello Larina,

It looks like you have no files uploaded to that server

Make sure your domain DNS points to the server where you have the MT up

Cheers,
Mihai
larinalou
I'm not sure why it looks that way, I have pointed the DNS to the correct server. There is nothing in the root directory other than the temporary message saying I'm moving in ... but MT is loaded into an "MT" folder, so I'm trying to access it here: http://lost-dreaming.net/mt/mt.cgi.

Cheers,
Larina
larinalou
I have continued to play, with the help of a friend this time, in the hope of figuring this out ... but only seem to have confused myself more. This is what I have discovered ...

Trying to access http://lost-dreaming.net/mt/mt.cgi gets me the error message:
Got an error: Error opening file '/mt-config.cgi': No such file or directory

It definitely finds the mt-config.cgi file, because if I delete it it tells me I forgot to move the original version mt-config.cgi-original to mt-config.cgi.

If I rename it to mt-config.cfg I get the same error as before except it says /mt-config.cfg No such file or directory instead.

So we think there's a problem with my mt-config.cgi file ... but can't work out what!

Tried commenting out all the database stuff, same error.
Tried commenting out both URLs, same error.
Tried putting it all back, still get an error.
Tried using my old mt-config.cgi file that I was using on my previous server ... same error.
Tried renaming and then naming it back to what it should be ... no change.

Checked the error log in cpanel ... it lists the following error each time we access mt-config.cgi
"Premature end of script headers"
... which we suspect is a false alarm.

Not sure what else to try! Any ideas?

Cheers,
Larina
bruce21
In mt-config.cgi:

# The CGIPath is the URL to your Movable Type directory
CGIPath http://www.example.com/cgi-bin/mt/

Is the path there relative or as above? In your case not in cgi-bin but need full path not relative.
Sounds like there is only a / there
larinalou
I used the full path as follows:

# The CGIPath is the URL to your Movable Type directory
CGIPath http://www.lost-dreaming.net/mt/

I assume this is correct? It's the same as I have used previously without any problems.

Thanks for any suggestions!

Cheers,
Larina
PRO IT Service
Hello Larina,

Looks like your Movable Type is now reachedable online at:

http://www.lost-dreaming.net/mt/

Good luck,
Mihai Bocsaru
larinalou
You had me awfully excited for a minute then! It does look rather convincingly okay ... but as soon as I click on "log in" I get the same error message as before ...

"Got an error: Error opening file '/mt-config.cgi': No such file or directory"

I've installed and am now temporarily using WordPress ... but I'm really not a fan. Hoping to get back to MT asap.

Next step is to remove everything and start again ... unless anyone has a better idea?

Cheers,
Larina
illogicz
I'm having the same problem. When I open mt.cgi I get:
QUOTE
Got an error: Error opening file '/mt-config.cgi': No such file or directory

My error log says:
QUOTE
Premature end of script headers: /home/illogicz/public_html/cgi-bin/mt/mt-config.cgi

mt-config.cgi
QUOTE
shelley
For cases like this where the path to the config file cannot be determined, you can change all the CGI scripts to specify it explicitly:

CODE
use MT::Bootstrap App => '...', Config => '/home/illogicz/public_html/cgi-bin/mt/mt-config.cgi'

For example, mt.cgi looks like this:

CODE
use strict;
use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
use MT::Bootstrap App => 'MT::App::CMS';

So, you'd change that last line to:

CODE
use MT::Bootstrap App => 'MT::App::CMS', Config => '/home/illogicz/public_html/cgi-bin/mt/mt-config.cgi';

OR, you may be able to use a rule in an .htaccess file (placed in the MT installation directory) to set the MT_CONFIG environment variable:

CODE
SetEnv MT_CONFIG /home/illogicz/public_html/cgi-bin/mt/mt-config.cgi

Larina, in your case, you'd substitute this path:

CODE
/home/larina/public_html/mt/mt-mt-config.cgi
adamcsiye
Just wanted to say thank you Shelley for the info, I was having the same problem and the solution that you posted worked very well.

However would anybody know why the same error would cause stylecatcher plugin not to work?
konscious
shelly, when i added that to the mt.cgi file, i got this error:

Got an error: Base class package "Data::ObjectDriver::BaseObject" is empty.
(Perhaps you need to 'use' the module which defines that package first.)
at lib/MT/Object.pm line 10
BEGIN failed--compilation aborted at lib/MT/Object.pm line 10.
Compilation failed in require at (eval 13) line 3.
...propagated at /usr/lib/perl5/5.8.8/base.pm line 85.
BEGIN failed--compilation aborted at lib/MT/Config.pm line 9.
Compilation failed in require at lib/MT/ConfigMgr.pm line 256.
Moji
Hi
I have the same problem as konscious. Does anyone can help us to get rid of this?
Thanks
DylanDT
This seems to be a widespread issue. Had the exact problem as Moji and Konscious. The check-mt.cgi runs fine, but the mt.cgi gives me the "Error opening file '/mt-config.cgi': No such file or directory". I tried changing all the .cgi scripts to the full path as Shelly suggested, but then I get the "Base class package "Data::ObjectDriver::BaseObject" is empty" error. If I try to run mt-config.cgi I get a 500 error. I have tried every reasonable variation I can think of and am not sure what to do. Help would be greatly appreciated.
Moji
Hi
I used the method described in the following link and now it seems to be working fine.
http://orangescale.net/blognotes/movable-t...bject-is-empty/
Ito
i tried, but it gave me 500 internal error. sad.gif

but i do know it managed to connect to the database.
PRO IT Service
Guys, you need to edit the file mt-config.cgi-original

1) Save it as mt-config.cgi


2) Edit the CGIPath line:

QUOTE


Make sure you keep the "/" listed at the end of the URL pattern


3) Edit the StaticWebPath line:

QUOTE


Most people do a mistake here by placing a "/" after the static folder! Don't do that! Just follow the model


4) Assuming you are going to run the web site backed on a mysql database, then:


4.1) Delete:

QUOTE
##### POSTGRESQL #####
ObjectDriver DBI::postgres
Database DATABASE_NAME
DBUser DATABASE_USERNAME
DBPassword DATABASE_PASSWORD
DBHost localhost

##### SQLITE #####
ObjectDriver DBI::sqlite
Database /path/to/sqlite/database/file



4.2) Edit:

QUOTE
##### MYSQL #####
ObjectDriver DBI::mysql
Database DATABASE_NAME
DBUser DATABASE_USERNAME
DBPassword DATABASE_PASSWORD
DBHost localhost


Basically replace: DATABASE_NAME, DATABASE_USERNAME, DATABASE_PASSWORD and localhost with the right values of your database (sometimes you will leave localhost the same, if your database is hosted on your 'localhost', meaning on the same place as the rest of the site files. you will however get that exact information when creating a new mysql database)


5) Save and upload your mt-config.cgi in ASCII mode to the same folder where you've uploaded the other Movable Type .CGI files so basically at the location you've mentioned as CGIPath


6) Make sure this file permission is set to 755 or chmod it to 755

That should make your life much easier smile.gif

Enjoy
drritalin
I have the same problem.
I am sure I did all things you said "PRO IT Service" but the problem exists.
Any Help?

UPDATE:
As Moji said: I used the method described in the following link and now it seems to be working fine:
http://orangescale.net/blognotes/movable-t...bject-is-empty/
rmdelatorre
[quote name='drritalin' date='Nov 22 2007, 06:54 AM' post='257513']
I have the same problem.
I am sure I did all things you said "PRO IT Service" but the problem exists.
Any Help?

I also did all the things above, and no solution.
PRO IT Service
it would actually be great if you do follow the exact steps

sometimes one things sHe did it right but a little detail could be the cause of the problem smile.gif

anyhow, feel free to send me access to your mt admin and ftp and i will be glad to have a look
rmdelatorre
QUOTE (PRO IT Service @ Nov 23 2007, 10:39 PM) *
it would actually be great if you do follow the exact steps

sometimes one things sHe did it right but a little detail could be the cause of the problem smile.gif

anyhow, feel free to send me access to your mt admin and ftp and i will be glad to have a look


Here my steps...

1. Downloaded MT 4.01. Uploaded it to cgi-bin/mt folder in my website. Permissions ok. Ascii mode ok. I have done these steps few times before, so I shouldn't have got it wrong now.
2. Uploaded mt-static to / folder.
3. Made changes to mt-config.cgi accordingly.
4. Try to access mt.cgi, and I get an error:

Got an error: Error opening file '/mt-config.cgi': No such file or directory

5. Search foruns. Find this thread.
6. Follow Shelley's prior suggestion. Add ", Config => '/home/trpz/public_html/cgi-bin/mt/mt-config.cgi'" to all cgi files, with the exception of mt-config.cgi (that I know is not a real cgi file...).
7. Try to access mt.cgi, and I get a new error:

Got an error: Base class package "Data::ObjectDriver::BaseObject" is empty.
(Perhaps you need to 'use' the module which defines that package first.)
at lib/MT/Object.pm line 10
BEGIN failed--compilation aborted at lib/MT/Object.pm line 10.
Compilation failed in require at (eval 13) line 3.
...propagated at /usr/lib/perl5/5.8.8/base.pm line 85.
BEGIN failed--compilation aborted at lib/MT/Config.pm line 9.
Compilation failed in require at lib/MT/ConfigMgr.pm line 256.

8. Search. Find this post:

http://orangescale.net/blognotes/movable-t...bject-is-empty/

9. Follow suggestion and add "BEGIN { $ENV{'MT_HOME'} = '/home/trpz/public-html/cgi-bin/mt/'; }" to all cgis (in addition to what I had changed before).
10. Try to access mt.cgi. Get access. Configure and post some entries.

However, I cannot post comments. I get a 500 error.
rmdelatorre
By the way, from the other posts and a little bit of research, this seems to be a widespread problem that has been going on for a while now –– And Six Apart is paying no attention at all to this. No information whatsoever about what may be doing this.
liquidcourage
I get the same error. I really want to use MT too! It looks like I'm going to be using Wordpress....
rmdelatorre
QUOTE (liquidcourage @ Nov 24 2007, 12:18 AM) *
I get the same error. I really want to use MT too! It looks like I'm going to be using Wordpress....


Nothing changed since yesterday, but my hosting company said I was using too much processor resources from the server, and my account was suspended. They say they will be charging me the next time it happens, and that I should "reconsider using the perl script I was using". They gave me the log file, that is like this, but with ten times as many lines.

trpz 13540 11.9 55.1 4931260 2233488 ? D 20:57 0:23 /usr/bin/perl -w mt.cgi
trpz 13540 14.1 55.1 4931260 2233488 ? D 20:57 0:23 /usr/bin/perl -w mt.cgi
trpz 14488 2.9 0.5 50752 22964 ? S 20:59 0:00 /usr/bin/perl -w mt.cgi
trpz 14488 1.1 0.5 50752 22964 ? S 20:59 0:00 /usr/bin/perl -w mt.cgi
trpz 14593 23.2 0.5 50752 22960 ? S 21:00 0:01 /usr/bin/perl -w mt.cgi
trpz 14601 20.0 0.5 50752 22960 ? S 21:00 0:00 /usr/bin/perl -w mt.cgi
trpz 14604 29.6 0.5 50752 22964 ? S 21:00 0:00 /usr/bin/perl -w mt.cgi
trpz 14616 36.5 0.5 50756 22964 ? S 21:00 0:00 /usr/bin/perl -w mt.cgi
trpz 14593 3.2 0.5 50752 22960 ? S 21:00 0:01 /usr/bin/perl -w mt.cgi
trpz 14601 2.2 0.5 50752 22960 ? S 21:00 0:00 /usr/bin/perl -w mt.cgi
trpz 14604 2.6 0.5 50752 22964 ? S 21:00 0:00 /usr/bin/perl -w mt.cgi
trpz 14616 2.2 0.5 50756 22964 ? S 21:00 0:00 /usr/bin/perl -w mt.cgi
trpz 13540 11.2 51.6 5110504 2090628 ? D 20:57 0:24 /usr/bin/perl -w mt.cgi
trpz 14488 0.8 0.5 50752 23136 ? S 20:59 0:00 /usr/bin/perl -w mt.cgi
trpz 14593 2.0 0.5 50752 23148 ? S 21:00 0:01 /usr/bin/perl -w mt.cgi

No help fro Movable Type, so I say bye. I'll try wordpress. If you start having the mt-config.cgi no such file... error, I suggest to do the same.

I have been using Movable Type for the past 4 years. But the last 4 months were hell.
OtherNiceMan
What plugins do you have installed?
rmdelatorre
QUOTE (OtherNiceMan @ Nov 24 2007, 07:54 PM) *
What plugins do you have installed?


No plugins. Fresh install in order to see if that was the problem.
bunny
Hi Guys,

different blog - same problem sad.gif
I tried all the different methods as well but always get a perl error:

The script could not be executed correctly.
Common causes might be that the file was uploaded in a non-ASCII format or the path to the interpreter (e.g.: #!/usr/bin/perl) is missing or set incorrectly.

Any help or suggestion would be wounderful

Desperate bunny greetings...
sandylp
QUOTE (bunny @ Nov 27 2007, 10:23 PM) *
Hi Guys,

different blog - same problem sad.gif
I tried all the different methods as well but always get a perl error:

The script could not be executed correctly.
Common causes might be that the file was uploaded in a non-ASCII format or the path to the interpreter (e.g.: #!/usr/bin/perl) is missing or set incorrectly.

Any help or suggestion would be wounderful

Desperate bunny greetings...


I was having a similar problem when my blog (version 3.21) was moved to a new server by my host. I could not access the cgi file and received the error: Maybe you forgot to move mt-config.cgi-original to mt-config.cgi? They also upgraded the PHP to version 5.2.4 and mysql to 5.0.27. The technician said that he added a directive to the cgi file by adding another file called .htaccess.bkp. The directive is: AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
#Options -ExecCGI


He said that there was a bug in MT causing the scripts not to detect the config file. I don't know why the problem occurred when everything was working fine on the old server. Maybe it had something to do with the PHP upgrade. I'm also curious as to why the directive couldn't be added directly to the .htaccess file. Oh well, everything is working fine now so I'll just keep my fingers crossed. smile.gif
Filmstalker
Just to let people know, because yet again I can't find a proper answer from the MT people nor a solution that worked, my hosting company helped me out when this happened to my installations - both untouched for close to two years.

They added the following line to the BOOTSTRAP.PM file:

CODE
sub BEGIN {
$ENV{'MT_HOME'} = '/home/[account]/public_html/[path to mt]';


The problem seemed to coincide with an upgrade of Perl.

Frankly, even though this is fixed, my unhappiness with the way MT isn't easily upgradable - install problems, having to recreate templates from scratch or use the previous versions minus the new features, etc. - has me looking to Expression Engine, Drupal or WordPress, despite my years of running MT.
OtherNiceMan
I surprised that you had a problem finding an answer for this problem. I encounter this error when moving to a new host and googled the answer It is related to security and new versions of Perl, the OS stops the CGI script from reading environmental variables.
1omrani
Hi...
I used the method described in the following link and now every thing is ok...
Link : http://orangescale.net/log/2007/10/movable...bject-is-empty/
Kim Daniels
I had this problem and was able to solve it by using the solution that Filmstalker posted:

Add this to the top of the bootstrap.pm file:
sub BEGIN {
$ENV{'MT_HOME'} = '/home/brunton/public_html/filmstalker/moveabletype-system';

I changed the mt.cgi file back to the original version (minus the fixes offered above) and it worked fine. I hope it works for everyone else.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.