#36827 [Opn->Bgs]: oci_connect() is not returning a valid resource....??
| From: | tony2001@php.net | Date: | Wed, 22 Mar 2006 22:13:33 +0000 |
| Subject: | #36827 [Opn->Bgs]: oci_connect() is not returning a valid resource....?? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-94783@lists.php.net to get a copy of this message | ||
ID: 36827
Updated by: tony2001@php.net
Reported By: jjackson at medai dot com
-Status: Open
+Status: Bogus
Bug Type: OCI8 related
Operating System: Linux
PHP Version: 5.1.2
New Comment:
You must be doing something terribly wrong, because oci_connect() CAN'T
return true. It can return either false or valid connection.
And I'm definitely not able to reproduce it.
Previous Comments:
------------------------------------------------------------------------
[2006-03-22 23:04:57] jjackson at medai dot com
Description:
------------
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
I know it's actually talking to the server because it gives me a logon
failure when I use an invalid username/password.
Reproduce 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);
?>
Expected result:
----------------
to not get the warning I am seeing.
Actual result:
--------------
bool(true)
Warning: oci_close() expects parameter 1 to be resource, boolean given
in /my/problem/script on line 5
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36827&edit=1