Invalid Login on My MovableType

As some of you may have noticed, my site experienced technical difficulties yersterday. The comment system didn’t work. You will see Entry with ID “xx” does not exisit or page not found or other error messages. This lasted for about 20 hours.

For me, when I try to logon using my user name and password into MovableType, I got the following error:

“Invalid Login”

It seemed I have typed the wrong username and password, which I was very sure to be correct.

I tried the recover password in MovableType function but was told the user “Jian Shuo Wang” does not exist.

Wired

I was really scared and backed up everything immediately. I tried a lot of methods, including restore my previous backups to the server. These does not work. After that, I know something wrong with the server software, instead of my database files.

Answers have been Given

I should search with Google for “Invide Login” and MovableType earlier. Actually, this problem is descrbied in user mannual of MovableType already. According to the troubleshooting secton:

I changed hosts, and now I can’t log in to Movable Type

When you change hosting providers (or just move to a different server at the same provider), it is possible that the two servers have different versions of the Berkeley DB library; this is the library that Movable Type uses to store your data. When you copy the DB files from one host to another, if the two hosts have different versions of Berkeley DB, the new host will not be able to read the files from the old host.

This can be fixed by converting the DB files over to the format used by the new library version; this is accomplished in several different ways, depending on the Berkeley DB versions involved. The files that need to be converted are all of the files in your db directory whose filenames end in either .db or .idx (the .lock files do not need to be converted).

The Server Administrator Upgraded the Dataase Driver

It turned out that the server administrator has upgraded the database driver on the server. I checked the system with mt-check.cgi and got the following result:

Movable Type [mt-check.cgi]

SYSTEM INFORMATION:

Current working directory: E:/customer/wangjianshuo

Operating system: MSWin32

Perl version: 5.6.0

(Probably) Running under cgiwrap or suexec

CHECKING FOR REQUIRED MODULES:

HTML::Template (version >= 2)…

Your server has HTML::Template installed (version 2.6).

Image::Size…

Your server has Image::Size installed (version 2.992).

File::Spec (version >= 0.8)…

Your server has File::Spec installed (version 0.8).

CGI::Cookie…

Your server has CGI::Cookie installed (version 1.16).

CHECKING FOR DATA STORAGE MODULES:

The following modules are used by the different data storage options in

Movable Type. In order run the system, your server needs to have at least

one of these modules installed.

DB_File…

Your server has DB_File installed (version 1.806).

DBD::mysql…

Your server does not have DBD::mysql installed. DBI and

DBD::mysql are required if you want to use the MySQL database

backend. Please consult the installation instructions for help

in installing DBD::mysql.

DBD::Pg…

Your server does not have DBD::Pg installed. DBI and DBD::Pg

are required if you want to use the PostgreSQL database

backend. Please consult the installation instructions for help

in installing DBD::Pg.

DBD::SQLite…

Your server does not have DBD::SQLite installed. DBI and

DBD::SQLite are required if you want to use the SQLite database

backend. Please consult the installation instructions for help

in installing DBD::SQLite.

CHECKING FOR OPTIONAL MODULES:

The following modules are optional; if your server does not have these

modules installed, you only need to install them if you require the

functionality that the module provides.

LWP::UserAgent…

Your server has LWP::UserAgent installed (version 1.73).

SOAP::Lite (version >= 0.5)…

Either your server does not have SOAP::Lite installed, or the

version that is installed is too old. SOAP::Lite is optional;

it is needed if you wish to use the MT XML-RPC server

implementation. Please consult the installation instructions

for help in installing SOAP::Lite.

File::Temp…

Your server does not have File::Temp installed. File::Temp is

optional; it is needed if you would like to be able to

overwrite existing files when you upload. Please consult the

installation instructions for help in installing File::Temp.

Image::Magick…

Your server has Image::Magick installed (version 5.26).

Your server has all of the required modules installed; you do not need to

perform any additional module installations. Continue with the installation

instructions.

I cannot remember the previous version number, but it was obviously not 1.806 – this string seems so strange to me.

The Fix

The fix was easy – to run db_upgrade command on all *.db and *.idx.

“Run db_upgrade?” It is easy to say! The db_upgrade can be easily get on a Linux or Unix server. Where can I get db_upgrade command from a Windows system?

I searched the Internet and didn’t got an answer. The final fix was, not surprisingly, I asked for help from my friend Eric. He opened an account on his Linux server for me. I was not skilled enough to transfer data from Windows to Linux yet. So I opened FTP service on another Windows 2003 server, transfered all my *.db and *.idx files to that server, download it from the Linux server – thank God that the TCP/IP is working on the Linux. Run the db_upgrade *.db *.idx command at the folder containing the database files. Then transfer the new files back via the FTP server. It worked like a charm. The nightmare of the dabase problem ended.

Importance of Backup

Many articles are avaiable on Installation of MovableType. However, I didn’t see anyone talking about backup of MovableType. I suggest the following backup approach.

1. Export the Entries. On the MovableType console, click Import/Export from the left navigation bar and click Export Entries From <your blog name> and you see the HTML code. Do not directly click File -> Save as…. to save it. Instead, click View -> Source Code. After the codes are loaded in notepad, click Save on File menu to save it. I am using the naming convension of yyyymmdd-blogname-weekly.backup.txt to save the files.

Special note: Please check the exported files to make sure there is no lines with more than seven dashes “-“. Dashes from the begining of the line has sepecial meanings. So replace any seperator in comments or entry bodies like “”

2. Save all the .db and .idx files in your database folders. There should be 53 files of them. The .lock files always has 0 bytes in it and don’t need backup.

7 thoughts on “Invalid Login on My MovableType

  1. Thanks for helping me get on the right track with this problem!

    Since I didn’t have a unix-capable friend to help me out, I found a solution for w2k that I posted in the MT-support forums

    I really should have made backups of this stupid little version of this stupid little DB_File-perl-module that I had installed.

    Sjeah, rright… ;-)

  2. ホスト更æ-°

    ついにと言うべきか、ごのæ-¥è¨˜ã‚’ serve ã-ているホストがリãƒ-レースão れた。 で、案の定あちごちå‹o かなくなったものが出た中にごの movable type 自身もあったり。 どごかで見た挙å‹o だと記æ…

  3. The pain of moving to a new server

    After using Movable Type for a couple of weeks, I asked my host company to install suexec. This turned out to be a mistake. Right after suexec was installed, I was locked out of MT. My password no longer…

  4. I wasn’t able to locate db_upgrade on my hosting provider. However, they did have it under different names: db2_upgrade, db31_upgrade, db32_upgrade, db33_upgrade and db40_upgrade. I had the same mt-check.cgi output that you had and db40_upgrade worked.

  5. I’m using Bluehost and none of these seem to work. Does anyone know if there’s any way around this with Bluehost? I’m on linux but there doesn’t seem to be a way to find out exactly what version. I followed the steps to upgrade each db file individually too and that didn’t seem to do anything either.

Leave a Reply

Your email address will not be published. Required fields are marked *