Jump to content

Recommended Posts

Posted

Ive got the Reblog Script installed on my server. Works fine in a manual mode. But when I try to use the cron job w/ the reblog.pl Im getting path errors.

 

Heres what my cron job looks like:

 

/usr/bin/perl /home/myusername/public_html/mt/reblog.pl

 

 

error is:

 

Can't locate MT.pm in @INC (@INC contains: /usr/lib/perl5/5.8.7/i686-linux /usr/lib/perl5/5.8.7 /usr/lib/perl5/site_perl/5.8.7/i686-linux /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.1/i686-linux /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /home/*******/public_html/mt/reblog.pl line 15.

 

Can anyone help me - thanks alot

 

 

Edit: TCH-Bruce - removed user name

Posted

From what I can tell by reading the instructions and looking at the reblog code (I do not have reblog installed on my site):

 

1) reblog.pl is not meant to be called directly, such as from a cron job. The first thing that any script calling on MT needs to do is tell perl where MT's /lib and /extlib directories are, and reblog.pl does not have any code which does this. This is the direct cause of the error message you're seeing. (MT.pm is in your public_html/mt/lib directory, but perl can't locate it because public_html/mt/lib isn't in perl's library search path.)

 

2) reblog.pl should be located in your plugins directory (public_html/mt/plugins), not your MT directory (public_html/mt). The purpose of reblog.pl is to provide the necessary plugin hooks into MT, which it can only do from MT's /plugins directory (because that's the only place where MT looks for plugin code).

 

3) If you were going to try to call a reblog script in a cron job, it looks to me like reblog_import.pl would be the one to use (which should be in your MT directory (public_html/mt)). reblog_import.pl does have the necessary code to tell perl where MT's /lib and /extlib directories are.

 

To use reblog_import.pl:

 

1) reblog_import.pl needs to be executable (its permissions set to 0700 or 0755).

 

2) There are two parameters in the script that you need to edit before you can use the script:

 

a) Line 7 - RB_BLOG_ID - the ID number of the blog you want to import into

 

B) Line 10 - RB_AUTHOR_NAME - the MT login name of the user you want to import new entries as

 

3) Cron job should be set up with following command line:

>cd /home/cpanelName/public_html/mt; ./reblog_import.pl

(where cpanelName is your CPanel username).

 

This script does produce output, pretty much like what you see in your browser when you do a manual import. Cron will interpret this as an error message and e-mail you whatever the script outputs every time it runs. If you would prefer not to receive these e-mails, set up your cron job with the following command:

>cd /home/cpanelName/public_html/mt; ./reblog_import.pl > /dev/null

Hope this helps...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...