View Single Post
Old 01-13-2005, 02:32 PM   #1
drywall
Green Mole
 
Join Date: May 2004
Posts: 25
command line and ABSOLUTE_SCRIPT_PATH

I've had phpdig up and running on my site for a while, but I've gotten tired of manully spidering, so I decided to look into setting up cron -- which largely appears to be really easy, bravo!

The problem I'm running into is that php spits out a bunch of include warnings when I try to run from the command line... I've no idea why, though I'm pretty sure I've got it set up properly.

My config.php looks like:


define('ABSOLUTE_SCRIPT_PATH','/Library/WebServer/Documents/tools/phpdig');

if ((!isset($relative_script_path)) || (($relative_script_path != ".") &&
($relative_script_path != "tools/phpdig") && ($relative_script_path != "..") && ($relative_script_path != ABSOLUTE_SCRIPT_PATH)))


My search.php isn't located in my phpdig directory, obviously. Anyway, these settings have everything on the website working well. But when I try the following from the command line [yep, I know php's in a slightly unusual place]:


/usr/local/php/bin/php -f /Library/WebServer/Documents/tools/phpdig/admin/spider.php http://www.mydomain.com


I get the following output:


PHP Warning: main(../includes/config.php): failed to open stream: No such file or directory in /Library/WebServer/Documents/tools/phpdig/admin/spider.php on line 91
PHP Warning: main(): Failed opening '../includes/config.php' for inclusion (include_path='.:/usr/local/php/lib/php') in /Library/WebServer/Documents/tools/phpdig/admin/spider.php on line 91
PHP Notice: Use of undefined constant USE_RENICE_COMMAND - assumed 'USE_RENICE_COMMAND' in /Library/WebServer/Documents/tools/phpdig/admin/spider.php on line 93
PHP Warning: main(../admin/robot_functions.php): failed to open stream: No such file or directory in /Library/WebServer/Documents/tools/phpdig/admin/spider.php on line 112
PHP Warning: main(): Failed opening '../admin/robot_functions.php' for inclusion (include_path='.:/usr/local/php/lib/php') in /Library/WebServer/Documents/tools/phpdig/admin/spider.php on line 112
PHP Fatal error: Call to undefined function: phpdigprnmsg() in /Library/WebServer/Documents/tools/phpdig/admin/spider.php on line 128


Which seem like the kind of messages I might get if I had ABSOLUTE_SCRIPT_PATH incorrectly set. But I've looked at it a million times and retyped it and I swear it's correct. Any idea what I'm doing wrong here?

Thanks for your help.

Last edited by drywall; 01-13-2005 at 02:35 PM.
drywall is offline   Reply With Quote