Movable Type Workaround for Cpanel update woes

Lat­est Cpanel updates are break­ing Mov­able type instal­la­tions, wreak­ing havoc with 500 Server Error mes­sages and caus­ing core dumps all over the place. Here's the kludg­ish workaround, that, well, works.

Lat­est Cpanel updates are break­ing Mov­able type instal­la­tions, wreak­ing havoc with 500 Server Error mes­sages and caus­ing core dumps all over the place. Here's the kludg­ish workaround, that, well, works.

A user on MT forums sug­gested that down­grad­ing to DBD::Mysql 2.9007 should do the trick. It does. Six Apart seems to be aware of it.

Here's a lit­tle script for Cpanel/WHM users to exe­cute on their SSH shells. Save it as, say, "dbidowngrade.sh" in your root folder, CHMOD it to 755, and exe­cute it with "./dbidowngrade.sh" at the com­mand prompt.

Impor­tant Note:

Yes, some peo­ple will have prob­lems with Cpanel updat­ing their DBD::Mysql with the /upcp script, in which case you should prob­a­bly set up a cron job to exe­cute the above script on a reg­u­lar basis. I have it up as hourly and it takes just a few sec­onds. I have com­mented out the lines in green because you don't need to down­load the file from CPAN more than once.

Please remem­ber, this is merely a tem­po­rary solu­tion. Mov­able Type should of course have an update soon, and Cpanel should shortly start pro­vid­ing the 3.0001 ver­sion in the near future.

Update: July 8, 2005

The lat­est update of DBD::Mysql, 3.0001_3, works for me. So here's the new code:

1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
cd /usr/src
 
wget -O dbd.tar.gz "http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-3.0001_3.tar.gz"
gzip -cd dbd.tar.gz | tar xf -
rm -rf dbd.tar.gz
 
cd DBD-mysql-3.0001_3
perl Makefile.PL
make
make install

Update: July 6, 2005

Looks like the DBD::Mysql author has released a 3.0001_2 devel­oper update. I haven't been able to install it, it gives me a bunch of errors but that's par for the course from 'devel­oper' ver­sions of soft­ware. YMMV. I'll stick with the 2.9007 for now.

Orig­i­nal method: Down­grad­ing surely works

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
#---------------------------------------------
# Script to downgrade to DBD::mysql 2.9007
#---------------------------------------------
cd /usr/src
wget -O dbd.tar.gz "http://www.cpan.org/modules/by-module/DBD/DBD-mysql-2.9007.tar.gz"
gzip -cd dbd.tar.gz | tar xf -
rm -rf dbd.tar.gz
cd DBD-mysql-2.9007
perl Makefile.PL
make
make install
 
# Clean up
cd /usr/src
rm -rf DBD-mysql-2.9007
  • Craig M

    Thanks a bunch for this post. It gives me some "Fail­ure" errors on my machine, but what­ever it is, it works.

  • net­gain

    i think your script assumes a linux type os. it may be use­ful to men­tion that.

  • http://sniptools.com snip­tools

    Note: The textarea above with the code in it is auto­mat­i­cally link­ing the URLs. Please strip the A HREF tags before using it. Best idea is to use it as a ref­er­ence. Most sysad­mins will of course know what I'm talk­ing about, for oth­ers, YMMV.

  • scripty

    It has been dis­cov­ered that down­grad­ing only DBD::Mysql to 2.9006 will do the job. No need to down­grade DBI. Thanks for these instructions.

  • http://sniptools.com snip­tools

    Scripty, thanks for the info. It works. Have update the arti­cle accordingly.

  • melanie90

    I've been fol­low­ing this issue on the six apart pronet mail­ing list and found this aret­i­cle. my cus­tomers is ask­ing me when I will fix the issues with DBD::mysql so I have to decide what to do and when to do it. six apart employ­ees said that they expected cPanel servers that were apply­ing auto­matic updates to pick up DBD::mysql 3.0001_3 and apply it today. but this is not hap­pen­ing to my server.

  • http://sniptools.com snip­tools

    Accord­ing to six apart cpanel will include the file in its next /upcp update. If you have that the updates set to man­ual, you may want to change it to auto­matic. In gen­eral, installing 3.0001_3 man­u­ally should do the job as well, for the time being.

  • ed girth

    Actu­ally the Cpanel update is work­ing with 3.0001 but it's not 3.0001_3 so I would sug­gest stick­ing with the cron method for now.

  • thrifty­rocker

    FWIW, my host wouldn't do a global update to 3.0001_3 so I had them install it in my user direc­tory, then I copied all the files from the 'lib' direc­tory in DBD to 'extlib' in the MT install and it worked. If your host won't update glob­ally, this is prob­a­bly a good workaround!