note 63489 deleted from function.oci-connect by bjori
| From: | bjori@php.net | Date: | Wed, 22 Mar 2006 22:21:26 +0000 |
| Subject: | note 63489 deleted from function.oci-connect by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106383@lists.php.net to get a copy of this message | ||
Note Submitter: jerry
----
The PHP documentation has led me to believe that "oci_connect() returns a connection identifier
needed for most other OCI calls" (verbatim from the docs). For the sake of simplicity in this
example, I just want to connect then close the connection. However, my call to oci_close()
doesn't like what oci_connect() returned.....thinking it's a boolean value instead of the
"resource" as shown at: http://us2.php.net/manual/en/function.oci-connect.php
Can anyone offer suggestions?
here's my code:
#!/usr/local/bin/php
<?
$conn = oci_connect('username', 'password', '//server:1521/dbname') ||
die("Could not connect to Oracle database");
var_dump($conn);
oci_close($conn);
?>
here's the output:
bool(true)
Warning: oci_close() expects parameter 1 to be resource, boolean given in /my/problem/script on line
5
I know it's actually talking to the server because it gives me a logon failure when use invalid
username/password..