On 5/30/06, womble <[EMAIL PROTECTED]> wrote:
Hi Ive just converted a script from mysql to sqlite using php 5.1.4. Running the script like.. php script.php works fine but I need it run from cron, if I do.. 10 14 * * * php -q /var/www/html/script.php It cant find the db file errors like... Warning: sqlite_query(): no such table: *** in /var/www/htmlscript.php on line 36 Is there a way to hard code the path to the db file or is there another way I can write the cron task.
cron probably has a different run time environment than the shell. You might try running a shell script which sets the environment (default directory and such) and then invokes the php script. Or, modify your php to set the directory itself.

