Changing the directory that PHP runs from (CLI)
| From: | Phil Ewington - 43 Plc | Date: | Fri, 11 Jun 2004 12:56:06 +0000 |
| Subject: | Changing the directory that PHP runs from (CLI) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-188100@lists.php.net to get a copy of this message | ||
Hi All,
I have read the manual page for 'Using PHP from the command line' thoroughly
and cannot find the answer to my problem. I have a script that needs to be
accessed from both the command line and from web browsers. I tested the
script from the command line and all worked well. As soon as I set the
script to run from the crontab, all my includes fail because of paths. I
believe the manual tries to cover forcing PHP to run from an alternative
location but makes no sense to me. Can anyone tell me what changes I need to
make to the following crontab entry...
0 23 * * * /usr/bin/php /path/to/my/script.php arg1 arg2 arg3 > /dev/null
TIA
- Phil.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004