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.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to