note 63489 added to function.oci-connect

From: Date: Wed, 22 Mar 2006 21:26:24 +0000
Subject: note 63489 added to function.oci-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-106380@lists.php.net to get a copy of this message
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.. ---- Server IP: 64.71.164.2 Probable Submitter: 66.89.66.69 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.oci-connect.php Edit -- http://master.php.net/note/edit/63489 Del: integrated -- http://master.php.net/note/delete/63489/integrated Del: useless -- http://master.php.net/note/delete/63489/useless Del: bad code -- http://master.php.net/note/delete/63489/bad+code Del: spam -- http://master.php.net/note/delete/63489/spam Del: non-english -- http://master.php.net/note/delete/63489/non-english Del: in docs -- http://master.php.net/note/delete/63489/in+docs Del: other reasons-- http://master.php.net/note/delete/63489 Reject -- http://master.php.net/note/reject/63489 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#106380) next »