PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 02-03-2004, 11:58 PM   #1
Rolandks
Purple Mole
 
Rolandks's Avatar
 
Join Date: Sep 2003
Location: Kassel, Germany
Posts: 119
Spider cron Job with WIN in V1.8

I have a problem in V 1.8.0 - Spider cron Job under Windows:

Quote:
<b>Fatal error</b>: Call to undefined function: phpdigprnmsg() in <b>D:\InetPub\wwwroot\home\phpdig\admin\spider.php</b> on line <b>112</b><br />
The follow CGI Call has not changed and works with 1.6.x

Quote:
C:
Cd php
php.exe -f "D:\InetPub\wwwroot\home\phpdig\admin\spider.php" http://www.mx-domain.de/76.html >> spider.log
config: define('USE_IS_EXECUTABLE_COMMAND','0');

Spider works on Browser. Is there an other path set for cron jobs in v1.8.0 ?

-Roland-
Rolandks is offline   Reply With Quote
Old 02-05-2004, 08:39 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. The phpdigPrnMsg function is defined in the phpdig_functions.php file. The phpdig_functions.php file is included in the config.php file, and the config.php file is included in the spider.php file.

The include "$relative_script_path/includes/config.php"; line was moved inside the if-else at the top of the spider.php file to allow for the USE_RENICE_COMMAND option in the config.php file.

What do you get when you run the following code?
PHP Code:
<?php
$pwd 
dirname("D:\\InetPub\\wwwroot\\home\\phpdig\\admin\\spider.php");
echo 
$pwd "\n<br><br>\n";
if (!
$pwd || $pwd == '.') {
    
$relative_script_path '..';
}
else {
    
$path_part explode('/',$pwd);
    
array_pop($path_part);
    if (!
ereg('^/',$pwd)) {
        
array_unshift($path_part,'.');
    }
    
$relative_script_path implode('/',$path_part);
}
echo 
$relative_script_path;
?>
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 02-05-2004, 11:40 PM   #3
Rolandks
Purple Mole
 
Rolandks's Avatar
 
Join Date: Sep 2003
Location: Kassel, Germany
Posts: 119
Hi,
i put this script to the spider.php folder and call it with test.bat from C:\PHP:
Quote:
@echo off
C:\
CD php
php.exe "D:\InetPub\wwwroot\home\phpdig\admin\test.php"
Result:
Quote:
Content-type: text/html
X-Powered-By: PHP/4.3.1

D:\InetPub\wwwroot\home\phpdig\admin
<br><br>
.
One DOT - okay

-roland-
Rolandks is offline   Reply With Quote
Old 02-06-2004, 07:52 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. I agree that it should be two dots. It's weird that the code worked previously because that piece went unchanged between versions. Anyway, what happens if you modify the code in spider.php and force $relative_script_path = '..'; to be set?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 02-09-2004, 12:08 AM   #5
Rolandks
Purple Mole
 
Rolandks's Avatar
 
Join Date: Sep 2003
Location: Kassel, Germany
Posts: 119
Okay, i add $relative_script_path = '..'; to Line 75 in spider.php - it works.

For next Version i think there is it userfull to set a Variable in config for the OS:

Use_OS: 1/0 ; // 1 - Windows; 0 - Linux (2 MAC ?)

In the Scripts you can check which OS and write two codelines for diff. OS if needed, so you no errors.

-Roland-
Rolandks is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Baffled by Cron Job Slider How-to Forum 2 12-15-2004 10:34 PM
Reindex without cron job? ark2424 How-to Forum 8 12-09-2004 04:54 AM
cron job problems takpoli How-to Forum 3 05-12-2004 12:26 PM
Alternative to Cron job? jirving Troubleshooting 1 09-29-2003 04:07 PM
cron job David J Harmon How-to Forum 1 09-27-2003 06:20 AM


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


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