Getting background publishing to work in MT 4.1
I spent probably two hours trying to get background publishing to work on my installation of Movable Type 4.1. I finally got it going, with lots of googling, trial-and-error, and tips from A Small Orange's incomparable support team... but since it took me so long to figure it out, I thought I'd post my fix here for any future googlers.
Ok, so the problem was that, after setting up a cronjob for run-periodic-tasks, I kept seeing this error in my logs:
Can't locate MT/Bootstrap.pm in @INC (@INC contains: lib ../lib /usr/lib/perl5/5.8.8/x86_64-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /home/gobecky/public_html/gobecky-net/cgi-bin/mt/tools/run-periodic-tasks line 12.
BEGIN failed--compilation aborted at /home/gobecky/public_html/gobecky-net/cgi-bin/mt/tools/run-periodic-tasks line 12.
Basically, this translates to, "To make this work, I need the file Bootstrap.pm, but it's not in any of the places you've given me to look, so I give up." So, let's have a look-see at Line 12:
use lib 'lib', '../lib';
The problem is that '..lib';. It's simply pointing to the wrong place in the MT file structure, which is weird, given that it's their app and all, but whatev. So what you need to do is point the script to Bootstrap.pm using the absolute filepath, and all will be well. In my case, my Line 12 looks like this after making the changes:
use lib 'lib', '/home/gobecky/public_html/gobecky-net/cgi-bin/mt/lib/';
As always, when you get 500 Internal Server Errors, the first thing to do is re-upload the file(s) in ASCII mode (don't trust your FTP app to figure out the file type and proper transfer mode) and set the permissions on the file(s) to 755.
Hope this helps someone out there!
1 Comment