PDA

View Full Version : shell indexing problem


simonced
08-04-2004, 01:39 AM
Hi everybody,

I encounter a small problem. It doesn"t seem to be difficult to solve, but I don't manage to find on my own.

Here's the problem.
I want to cron a daily indexing.
But, first, I try on command line :
---
$ php-cgi /[...absolute path...]/spider.php
Content-type: text/html
X-Powered-By: PHP/4.3.1

$
---
That's all !!! I get nothing else.
I watched into the spider.php and discovered that the auth is not used when in command line. But, I discovered that the script stops running at the line :
include "$relative_path/includes/config.php";.
So, I don't get what happen.

Thanks by advance for you help.

Charter
08-04-2004, 01:09 PM
Hi. You need to add the absolute path to the if statement in the config file. See this (http://www.phpdig.net/showthread.php?threadid=1106) for an example.

simonced
08-05-2004, 08:24 PM
Hi, Thanks for the answer.
I studied the case, but, the absolute path was right, so, I know it was nt from there.
To an other hand, I modified the if statement, and now, it's working.

I'm not at office right now, but if you're interrested, I can come back and write the modified line here for further assistance.

Thank you.

vinyl-junkie
08-06-2004, 03:26 AM
Please do post your modification. It might help the next person. :)

simonced
08-06-2004, 10:54 PM
OK,
I'll post it on Monday Morning.
Bye.

simonced
08-10-2004, 01:10 AM
Hi,
Oops, sorry, it's tuesday, but here is my modification :
//in the config.php file
if ((!isset($relative_script_path)) && ($relative_script_path != ".") && ($relative_script_path != "..")) {
print "Path not recognized";
exit();
}

;) bye, have nice indexing !

lighthouse
08-10-2004, 02:05 AM
Originally posted by simonced
OK,
I'll post it on Monday Morning.
Bye.


Can you post your fix...
I too am having the same issue.

Thanks
LH

lighthouse
08-10-2004, 05:06 AM
To confirm....
the only way i could get the cron working, was to remove the entire if statement altogether.....

Can anyone confirm if this will cause problems...? At the moment, everything seems to work fine !

LH

Charter
08-15-2004, 03:01 PM
Hi. It's not a good idea to remove the if statement. All you need to do is add to the if statement the path that is not there.