PDA

View Full Version : PHPDIG_DIR & cron task


fziemke
09-08-2003, 09:21 AM
documentation:

#php -f [PHPDIG_DIR]/admin/spider.php http://host.mydomain.com

The [PHPDIG_DIR]/admin/spider.php can be launch by a cron task too, in order to auto update the index. The recommended periodicity is 7 days. The updated documents you want to see immediately in the searches can be updated manually.
Those pages can contain a "revisit-after" metatag with a short delay.


Two questions:

1.) What is PHPDIG_DIR in Windows ? I can't start this from DOS-Prompt.

I try:
"C:\php\php.exe -f D:\inetpub\wwwroot\phpdig\admin\spider.php http://host.mydomain.com"

(Error ...function not found). It seems it found no phpdig_functions.php.
(//test on cgi or http is in spider.php - Line 23 ff)

2.) If this works i will update my pages every night at 11pm. But recommended periodicity is 7 days ?? How can i index daily my new pages - this are 3 to 4 HTML-Pages generated by a content management system. I will not update this manually ??

Thanks
-Frank-

Charter
09-08-2003, 04:57 PM
Hi. Is DOCROOT=D:\data\inetpub\wwwroot or DOCROOT=D:\inetpub\wwwroot? What version of PHP do you have? In 4.3.0 you can pass the directory and file names, but that may not work with previous versions.

fziemke
09-10-2003, 12:02 PM
I have test today again:

PHP4 = C:\PHP
DOCRoot = D:\InetPub\wwwroot\web
PHPDig-Root = D:\InetPub\wwwroot\web\phpdig

I call from DOS prompt!

C:\PHP>
php.exe -f "D:\InetPub\wwwroot\web\phpdig\admin\spider.php" http://www.mydomain.ch
The instruction "renice" is either wrongly written or could not not be
found (linie 80).

<b>Fatal error</b>: Call to undefined function: phpdigprnmsg() in
<b>D:\InetPub\wwwroot\web\phpdig\admin\spider.php</b> on line
<b>110</b><br />

C:\PHP> press space to continue...

I have Print "$relative_script_path"; = . (one Point) ?!

I have also Test:
php.exe -f "D:\InetPub\wwwroot\web\phpdig\admin\spider.php http://www.mydomain.ch"
php.exe -f D:\InetPub\wwwroot\web\phpdig\admin\spider.php http://www.mydomain.ch

Any hint ?
FRANK

fziemke
09-12-2003, 07:51 AM
Please can anyone post the complete CALL for WIN command line spider complete Site !??

Thanks
Frank

Charter
09-14-2003, 10:13 AM
The instruction "renice" is either wrongly written or could not not be found (linie 80).

For the above, go to the renice line and try commenting it out.

<b>Fatal error</b>: Call to undefined function: phpdigprnmsg() in <b>D:\InetPub\wwwroot\web\phpdig\admin\spider.php</b> on line <b>110</b><br />

From the above error, this is what looks to be happening. The function phpdigPrnMsg is the first function called from the include files in spider.php and so the include files are not being found.

In the admin files, try $relative_script_path = '..'; (two dots) and leave $relative_script_path = '.'; (one dot) in the main search index file. One dot means go into the same directory, and two dots mean go back one directory.

If that doesn't work, try forcing the path by setting $relative_script_path = 'd:/InetPub/wwwroot/web/phpdig';

The win command you're using is working fine, as the fatal error happens when spider.php tries to call the phpdigPrnMsg function.

fziemke
09-18-2003, 08:25 AM
Okay thanks. i tried this today - it works:

spider.php
- comment Line 80 // print @exec('renice 18 '.getmypid()).$br;
- add in Line 93: $relative_script_path = '..'; // two dot

CALL
php.exe -f "D:\InetPub\wwwroot\web\phpdig\admin\spider.php" http://www.mydomain.ch

Is this a windows related Bug ? Fixed in next Version possible ?

FRANK

Charter
09-18-2003, 09:16 AM
Hi. I don't think they are bugs. My guess is that your machine doesn't have renice. The one dot versus two dots just indicates what directory to look in. Glad PhpDig is now working for you.

David J Harmon
09-26-2003, 08:16 PM
I would like to know (I'm new to php) how would I run a cron in linux apache 1.3. I also new to crons. can I have them look up more than one url?

David

Charter
09-27-2003, 05:13 PM
Hi. An example can be found here (http://www.phpdig.net/showthread.php?postid=293#post293).