PDA

View Full Version : trouble running the spider


bforsyth
12-20-2004, 03:17 AM
Hi Guys,

I am having trouble running the spider from Cron or the command line. Seems that it is a problem with $relative_script_path - but I can't work out what it is for the life of me. I am echoing it out in spider.php and it looks right. Weird thing is that it runs OK in the browser? See output below. Any help appreciated:



@truth:~$ nice --adjust=19 /usr/bin/php4 -f /home/username/public_html/search/admin/spider.php http://www.globalwaterintel.com/list.php

Relative Script path---->/home/username/public_html/search
Warning: main(../includes/config.php): failed to open stream: No such file or directory in /home/username/public_html/search/admin/spider.php on line 91

Warning: main(): Failed opening '../includes/config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/username/public_html/search/admin/spider.php on line 91

Warning: main(../admin/robot_functions.php): failed to open stream: No such file or directory in /home/username/public_html/search/admin/spider.php on line 112

Warning: main(): Failed opening '../admin/robot_functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/username/public_html/search/admin/spider.php on line 112

Fatal error: Call to undefined function: phpdigprnmsg() in /home/username/public_html/search/admin/spider.php on line 128

bforsyth
12-20-2004, 03:42 AM
Just someting a little further. If I change to the phpdig/admin directory and run the spider from there using


cd public_html/search/admin/

/usr/bin/php4 -f spider.php http://www.mysite.com

it seems to work OK - so I am trying to work out why calling it using a full path would be any different?

Slider
12-20-2004, 03:33 PM
The fix I had to use to make cron work. Hopefully related to your problem also.
http://www.phpdig.net/forum/showthread.php?p=6919#post6919