From:             jjackson at medai dot com
Operating system: Linux
PHP version:      5.1.2
PHP Bug Type:     OCI8 related
Bug description:   oci_connect() is not returning a valid resource....?? 

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 bug report at http://bugs.php.net/?id=36827&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36827&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36827&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36827&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36827&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36827&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36827&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36827&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36827&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36827&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36827&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36827&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36827&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36827&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36827&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36827&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36827&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36827&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36827&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36827&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36827&r=mysqlcfg

Reply via email to