I post this yesterday, but no one responds. Please someone help. I wonder if my problem is actually a bug in php or cron. ------------------------------------------ Hello, 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. Here is the script looks like: <? // script name: ora_test.php $conn = ora_logon("username@db", "password"); $cur = ora_open($conn); if (ora_parse($cur, "select something from table")) { ora_exec($cur); while(ora_fetch($cur)) { $something[] = ora_getcolumn($cur, 0); } print_r($something); $msg = ''; for ($i=0; $i<count($something); $i++) $msg .= $something[$i] ." "; mail ("me@localhost", "test", $msg); } ?> Here is the crontab entry: */1 * * * * /usr/local/bin/php ora_test.php >> /tmp/cron_oralog The error message from cron_oralog files is: X-Powered-By: PHP/4.0.3pl1 Content-type: text/html Warning: Oracle: Connection Failed: Error while trying to retrieve text for error ORA-12154 in ora_test.php on line 3 Warning</b>: Supplied argument is not a valid Oracle-Connection resource in <b>ora_test.php</b> on line <b>5</b> <br> <b>Warning</b>: Supplied argument is not a valid Oracle-Cursor resource in <b>ora_test.php</b> on line <b>7</b><br> Any help on this would be greatly appreciated. Thanks. Reuben D. Budiardja -- 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]