View Single Post
  #464  
Old 05-27-2002, 06:29 PM
www.tourc.ca www.tourc.ca is offline
 
Join Date: Mar 2002
Location: Greater Toronto Area
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

fastforward: I must say this is by far the best hack on my site, and had very few problems that weren't sorted out right away, and the documentation is pretty straight forward. Thanks very sincerley for doing this hack and supporting it so damn well! I'll be sticking with the perl version myself! so far there isn't a problem I couldn't solve with a little help from google!

I'm a little new to cron, and I've read this whole thread (all 32 pages) and haven't found an answer. I do hope you get your benz... you definatley deserve it in my books! I've also read tons of pages on using cron, and now understand it!

I've created a crontab (crontab -e) and a job 10,30,50 * * * * perl /home/admin/newnews.pl and so far it works and e-mails the output to me, but it has problems finding some perl modules.

if I run the command perl newnews.pl from the prompt via ssh the script runs beginning to end without a problem! it's perfect, problem is I want to obviously have this automated, and cron's the tool, but it seems it can't find the perl modules when cron runs it!

the first time it ran, I got the following message:
Can't locate News/NNTPClient.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at /home/admin/newnews.pl line 42. BEGIN failed--compilation aborted at /home/admin/newnews.pl line 42.

somewhere else in this thread (as I assumed from the message) it states that it can't find the path. I thought it was a little strange that it works fine when I run it manually and not through cron, but I uncommented the line in the newnews.pl script that is:

# uncomment the following line if you installed perl modules to a
# non-standard directory
use lib "/usr/local/lib/perl5/site_perl/5.6.1";

note: the NNTPClient.pm was located (locate NNTPClient.pm) in /usr/local/lib/perl5/site_perl/5.6.1/News/NNTPClient.pm

now it can find the NNTPClient.pm file but now I get the following message and the script stops on the line
use MIME::WordDecoder;

Can't locate MIME/Base64.pm in @INC (@INC contains: /usr/local/lib/perl5/siet_perl/5.6.1/MIME/Decoder /usr/local/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at /usr/local/lib/perl5/site_perl/5.6.1/MIME/Words.pm line 85. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.1/MIME/Words.pm line 85. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.1/MIME/WordDecoder.pm line 77. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.1/MIME/WordDecoder.pm line 77. Compilation failed in require at /home/admin/newnews.pl line 45. BEGIN failed--compilation aborted at /home/admin/newnews.pl line 45.


i typed 'locate Base64.pm' and it returned

/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/MIME/Base64.pm
/usr/local/lib/perl5/site_perl/5.6.1/MIME/Decoder/Base64.pm

i tried adding another use lib line below the first in the perl script but cannot get it past this error. I used the following format!

use lib "/usr/local/lib/perl5/site_perl/5.6.1";
use lib "/usr/local/lib/perl5/site_perl/5.6.1/i686-linux";

but this isn't working and I continue to get that last message about not being able to find base64.pm

I'm new to most of this and have tried a ton of things and am kind of stuck here!... Please help, and forgive my ignorance!

dave
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01226 seconds
  • Memory Usage 1,769KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete