PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Troubleshooting (http://www.phpdig.net/forum/forumdisplay.php?f=22)
-   -   config issue (http://www.phpdig.net/forum/showthread.php?t=1652)

baskamer 12-17-2004 03:10 AM

same issue here
 
hi,

i am having the same issue here after an upgrade from 1.8.0 to 1.8.6.

All works as expected when running the spider from the webbrowser, but when i try to run it from the commandline by cgi (something that was no problem using 1.8.0):

Ik think i know what the problem is but i am not sure and unfamiliar of how to fix it...

Code:

cd /path/to/phpdig-1.8.6/
/usr/local/bin/php -q -f admin/spider.php http://www.sitetoindex.com/

Warning: main(): Unable to access ../includes/config.php in /path/to/phpdig-1.8.6/admin/spider.php on line 90

and a bunch of other errors...

a related error occures on when i go the admin page with authorisation enabled. This what briefly flashes across the screen;

Code:

Warning: Cannot modify header information - headers already sent by (output started at /path/to/phpdig-1.8.6/includes/config.php:1) in /path/to/phpdig-1.8.6/libs/auth.php on line 62
I think this is due to the fact that in config strange characters are encoded in a non utf-8 format. BBEdit complains about this and offers to resave as utf-8. I think that the commandline does not like this...

I just did a test, by uploading an unmodified version of config.php, using pico to edit it via the shell works partially. (Other then anoying working with pico) The redrect (in auth) now works fine, but the running via cgi still produces the same errors.

ohh, phpdig is currently installed in just one directory (as downloaded) so i did not add a relative path in the config...

i hope this info helps... please contact me if you need more info, i really need this working via cron...

tanks

baskamer 12-17-2004 04:15 AM

solution
 
it seems that this was the culprit;
cd to the admin dir, instead of phpdig...

Code:

instead of
cd /path/to/phpdig/
use
cd /path/to/phpdig/admin/

/usr/local/bin/php -q -f ./spider.php http://www.yoursite.com


Slider 12-18-2004 12:33 PM

I was using a cron job and had to change the code on line 88 in spider.php

FROM
Code:

// echo $relative_script_path;
    $relative_script_path = '..';

TO
Code:

// echo $relative_script_path;
    $relative_script_path = '/home/username/www/phpdig';

It fixed the line 90 problem and the other lines in the warnings.


All times are GMT -8. The time now is 03:00 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.