Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Strange problem connecting php to oracle db
A behaviour we don't understand:
+++
$user = 'xxx';
$password = 'xxx';
$database = 'xxx.xxx';
$query = 'SELECT 1 FROM DUAL';
$link = OCIlogon($user, $password, $database);
//$parse = OCIParse($link, $query);
unset($link);
$link = OCIlogon($user, $password, $database);
$parse = OCIParse($link, $query);
+++
-> "... is not a valid oci8 connection resource"
Everything works fine if the first line with $parse is not commented out. Everything also works fine if we do not unset $link.
This behaviour occurs with ocilogon(), not with either ociplogon() or ocinlogon().
Tested with PHP 4.3.11 on Linux, Apache 1.3.33 and Apache 1.3.34, OCI PECL extension 1.1.1, Oracle 10.2.01 and 10.1.0.3.
Best regards
Keith
Received on Mon Feb 20 2006 - 06:16:46 CST