|
02-07-2004, 02:50 PM | #1 |
Orange Mole
Join Date: Feb 2004
Posts: 47
|
spider.php via bash
hello together,
i'm trying to start the spider-process via shell - but nothing happens - so i read all articles concerning this in the forum. but nothing works! /usr/local/bin/php4 -f /phpdig/admin/spider.php http://www.domain.com >> phpdigg.log when i take the -w switch(instead of -f) i see the code from spider.php => this tells me all paths are ok several other scripts run without problems from shell and cron but spider.php won't :-( sending the command=>new prompt=>but nothing happens please help :-) |
02-07-2004, 02:55 PM | #2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. Try this and then let me know what's in the phpdigg.log file:
Code:
/usr/local/bin/php4 -f /phpdig/admin/spider.php http://www.domain.com > phpdigg.log 2>&1
__________________
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. |
02-07-2004, 03:02 PM | #3 |
Orange Mole
Join Date: Feb 2004
Posts: 47
|
the same as it ever was :-)
hello charter,
this is the fastes response i ever got - thanks content of logfile: X-Powered-By: PHP/4.2.3 Content-type: text/html |
02-07-2004, 03:04 PM | #4 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. What does the following produce?
CD to the admin directory and then do the following: Code:
php -f spider.php http://www.domain.com > phpdigg.log 2>&1
__________________
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. |
02-07-2004, 03:11 PM | #5 |
Orange Mole
Join Date: Feb 2004
Posts: 47
|
you're the best !
hi charter,
great! no i hope it will run for the next 7 hours and index all sites. thanks in advance tomas from germany |
02-07-2004, 03:36 PM | #6 |
Orange Mole
Join Date: Feb 2004
Posts: 47
|
but one question remains,
when calling the script with cron i need the full path from root :-( |
02-07-2004, 03:43 PM | #7 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. If you are following this tutorial, and you place everything in the admin directory, then you can use the following to spider on the 1st and 15th of every month:
Code:
0 0 1,15 * * php -f spider.php cronlist.txt > phpdigg.log
__________________
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. |
02-07-2004, 03:49 PM | #8 |
Orange Mole
Join Date: Feb 2004
Posts: 47
|
hi charter,
ok - i try this out - but why does it not work with the full path - i do this with some other php scripts and they work fine??? |
02-07-2004, 03:54 PM | #9 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. Full path to PHP or other scripts?
Code:
0 0 1,15 * * /full/path/to/php -f /full/path/to/admin/spider.php cronlist.txt > phpdigg.log
__________________
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. |
02-07-2004, 04:00 PM | #10 |
Orange Mole
Join Date: Feb 2004
Posts: 47
|
full path to other scripts
debian won't i loose all other cronjobs in my crontab doing it like the tutorial? |
02-07-2004, 04:11 PM | #11 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. The command first posted was the following:
Code:
/usr/local/bin/php4 -f /phpdig/admin/spider.php http://www.domain.com >> phpdigg.log I'm not all that familiar with Debain, but with Linux you can set a number of cronjobs up to the limit imposed by a host. Perhaps try setting a test cronjob that prints some text to a file and see if it removes the PhpDig cronjob.
__________________
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. |
02-07-2004, 04:33 PM | #12 |
Orange Mole
Join Date: Feb 2004
Posts: 47
|
yes - as i thought this overwrites the existing crontab from the logged user -
but charter - why all this ??? a lot of other scripts called by crontab work fine why can't i call this from my user directory this way like all the others: 5 * * * 1,2,3,4,5 /usr/local/bin/php4 /homepages/22/d86961/htdocs/cron/rep_01.php > /dev/null |
02-07-2004, 04:42 PM | #13 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. How many other cronjobs do you have running? Maybe you are at your limit, but I'm guessing not. One thing is that the config.php file has the following code:
PHP Code:
__________________
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. |
02-07-2004, 04:58 PM | #14 |
Orange Mole
Join Date: Feb 2004
Posts: 47
|
gotcha -
this is the troublemaker: doing this: /* if ((isset($relative_script_path)) && ($relative_script_path != ".") && ($relative_script_path != "..")) { exit(); } if (eregi("config.php",$_SERVER['SCRIPT_FILENAME']) || eregi("config.php",$_SERVER['REQUEST_URI'])) { exit(); } */ now it runs |
02-07-2004, 05:11 PM | #15 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. Glad it's now working, but you don't want to comment that section out. It was added for security reasons, and unless you are running locally (no other person has access) then that is opening you up to a world of trouble! Rather you need to allow for the relative path in the code, the same as was done for dot and double dot.
__________________
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. |
Thread Tools | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
spider.php blocked when indexing | acti_dev | External Binaries | 9 | 12-09-2006 06:29 AM |
spider.php problem | digdug | Script Installation | 8 | 10-18-2006 08:25 AM |
autorefresh spider.php | zaartix | Mod Requests | 0 | 12-21-2005 10:11 PM |
I have one bug with spider.php | Booboo | Troubleshooting | 1 | 03-01-2005 02:46 AM |
sleep(5) in spider.php? | bsw114 | How-to Forum | 2 | 03-12-2004 02:31 PM |