Re: include_path problem in executing program from root folder
| From: | Greg Donald | Date: | Mon, 21 Jun 2004 15:42:32 +0000 |
| Subject: | Re: include_path problem in executing program from root folder | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-188745@lists.php.net to get a copy of this message | ||
On Mon, 21 Jun 2004 14:05:05 +0000, Sharat Hegde
<sharat_hegde@hotmail.com> wrote:
>
> Hello,
>
> One of my PHP programs called dailybatch.php3 includes a file in its parent
> directory. The link is
> ****
> include "../db_mysql.inc"
> ****
>
> dailybatch.php3 is invoked from the crontab command or run from the command
> line in the root /www folder, gives an error indicating that
> "../db_mysql.inc not found". However, when you change to the folder where
> dailybatch.php3 is present and execute the program, there are no errors and
> the program executes. The include_path has "." folder in it.
>
> What could possibly be the problem with executing the program from the /www
> folder?
Make the include call to db_mysql.inc a full path. Cron isn't aware
of much at all as far as system paths. ../ won't work obviously.
--
Greg Donald
http://destiney.com/