Re: CAN'T connect to db when running PHP as Cron
| From: | infoz | Date: | Wed, 18 Jul 2001 13:27:53 +0000 |
| Subject: | Re: CAN'T connect to db when running PHP as Cron | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-58432@lists.php.net to get a copy of this message | ||
I would gather the output from phpinfo() for each case (web server & cron
job) and compare them. Often a path or environment variable will be
different. This is especially true of Oracle which is somewhat fussy about
having it's environment set properly in order to connect.
- Tim
http://www.phptemplates.org
>I have a php script that connect to database and retrieve something, or do
>something with the db.
>I can run the script from the command line, it works just fine.
>But when I run it as cron, it gives error cannot connect to the database.