|
01-31-2005, 10:21 AM | #1 | ||
Green Mole
Join Date: Jan 2005
Posts: 6
|
command line exec() pulls wrong file (php as cgi?)
Hi. Thanks for a great product, and for such a helpful forum. I've got phpdig up and running. Instead of running the indexer for the whole site, I want to index each document as it is added/edited to the site by a web-based administrator.
As such, I'd like to use the exec() command within php and index the file as its edited or added. I've tested the following command via shell and it worked beautifully. Quote:
However, when I call from a php script as such: Quote:
My php is set to run as cgi - I'm sure this has something to do with it and there is some environment variable that I'm missing. Any advice is appreciated. Thanks. |
||
01-31-2005, 11:53 AM | #2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Perhaps try one of the following...
Code:
// save output in spider.log exec("/usr/bin/php -f /path/to/admin/spider.php http://www.site.com/document.doc >> /path/to/spider.log"); // save output in $out variable exec("/usr/bin/php -f /path/to/admin/spider.php http://www.site.com/document.doc",$out);
__________________
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-01-2005, 08:14 AM | #3 | |
Green Mole
Join Date: Jan 2005
Posts: 6
|
oy
okay, well fixed that. but its still digging the upload/edit script page and not the document that's being uploaded.
Quote:
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to add a site from the command line or with a php script | ciaran@clissman | How-to Forum | 1 | 07-18-2005 04:59 PM |
PHP as CGI | Edomondo | Troubleshooting | 3 | 02-05-2005 02:32 AM |
spider from command line | twanoo | Troubleshooting | 3 | 01-14-2005 11:04 AM |
Spider.php is killed at the command line | bforsyth | Troubleshooting | 2 | 12-05-2004 02:09 PM |
indexing from command line with text file | Wayne McBryde | Troubleshooting | 8 | 01-12-2004 06:56 PM |