PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 04-29-2004, 08:31 AM   #1
digitalbart2k
Green Mole
 
Join Date: Jan 2004
Posts: 3
cmd line path?

I am unable to index from the command line unless I switch to the directory in which spider.php is contained

this will work when I am in the /search/admin/ directory:

php -f spider.php http://www.domainname.com >/tmp/output 2>/tmp/erroroutput


this won't

/usr/bin/php -f /web/servers/domainname.com/search/admin/spider.php http://www.domainname.com > /tmp/phpdigg.log 2>&1

or this

php -f /web/servers/domainname.com/search/admin/spider.php http://www.domainname.com >/tmp/output 2>/tmp/erroroutput

I want to schedule a cron job so I will need the full path I assume.
Any ideas?
digitalbart2k is offline   Reply With Quote
Old 05-01-2004, 07:59 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. If you wish to call spider.php from a directory other than the admin directory, you need to edit the first if statement in the config file so that it allows for the different path, that path being a relative and/or full path UP TO but NOT including the admin directory - no ending slash.
__________________
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 06-01-2004, 11:16 PM   #3
blowfish
Green Mole
 
blowfish's Avatar
 
Join Date: May 2004
Posts: 2
Quote:
Originally posted by Charter
Hi. If you wish to call spider.php from a directory other than the admin directory, you need to edit the first if statement in the config file so that it allows for the different path, that path being a relative and/or full path UP TO but NOT including the admin directory - no ending slash.
Ah, that did the trick!
I had the same prob, but after this config.php revision with adding the absolute path (RaQ 550 server running Linux), it now works from any dir I'm in via SSH.

This is what worked for the command line (all on one line),
[root admin]# php -f /home/.sites/28/site1/.users/91/lists/web/search/admin/spider.php /home/.sites/28/site1/.users/91/lists/web/search/admin/cronlist.txt >> /home/.sites/28/site1/.users/91/lists/web/search/admin/spider.log

Now will be checking out the cron by adding to the front:
2 3 * * *
so it'll update 3:02am every day, every week, every month
blowfish is offline   Reply With Quote
Old 08-03-2004, 06:51 AM   #4
lighthouse
Green Mole
 
Join Date: Mar 2004
Posts: 20
Quote:
Originally posted by Charter
Hi. If you wish to call spider.php from a directory other than the admin directory, you need to edit the first if statement in the config file so that it allows for the different path, that path being a relative and/or full path UP TO but NOT including the admin directory - no ending slash.

Charter - can you give an example of who you do this... I've tried - but getting no where... In the end I just commented out the first if statement altogether to get this to work, but I'm guessing this isnt advisable!

LH
lighthouse is offline   Reply With Quote
Old 08-03-2004, 11:31 AM   #5
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
http://www.phpdig.net/showthread.php?threadid=1106
__________________
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
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
Upgrade path not good for me. Dave A Troubleshooting 0 01-03-2006 08:21 AM
Excluding/Including by Path djwm How-to Forum 2 01-02-2005 04:13 AM
cmd line index error msg WebDiva 2.0 How-to Forum 4 08-25-2004 08:13 PM
Relative path Dave A Script Installation 9 08-18-2004 09:10 PM
can't exclude the path Psykotik How-to Forum 4 04-23-2004 02:30 PM


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


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