PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Troubleshooting (http://www.phpdig.net/forum/forumdisplay.php?f=22)
-   -   shell indexing problem (http://www.phpdig.net/forum/showthread.php?t=1154)

simonced 08-04-2004 01:39 AM

shell indexing problem
 
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 :
PHP Code:

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 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

Quote:

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.


All times are GMT -8. The time now is 06:52 AM.

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