note 63958 added to ref.pdo-oci.connection
| From: | crescentfreshpot at yahoo dot com | Date: | Tue, 04 Apr 2006 16:33:29 +0000 |
| Subject: | note 63958 added to ref.pdo-oci.connection | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-107301@lists.php.net to get a copy of this message | ||
The docs state "If you are connecting to a database defined in tnsnames.ora, append the name of
the database to the DSN prefix and your DSN is complete."
However on php 5.1.2 on windows i've had to append
'dbname=' first to get it to work.
E.g. (my database name is 'prod'):
<?php
// should work according to docs but fails
$dbh = new PDO('oci:prod', 'user', 'pass'); /* fails with ORA-12560:
TNS:protocol adapter error */
// This works:
$dbh = new PDO('oci:dbname=prod', 'user', 'pass');
?>
----
Server IP: 66.207.199.35
Probable Submitter: 216.183.8.3
----
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/ref.pdo-oci.connection.php
Edit -- http://master.php.net/note/edit/63958
Del: integrated -- http://master.php.net/note/delete/63958/integrated
Del: useless -- http://master.php.net/note/delete/63958/useless
Del: bad code -- http://master.php.net/note/delete/63958/bad+code
Del: spam -- http://master.php.net/note/delete/63958/spam
Del: non-english -- http://master.php.net/note/delete/63958/non-english
Del: in docs -- http://master.php.net/note/delete/63958/in+docs
Del: other reasons-- http://master.php.net/note/delete/63958
Reject -- http://master.php.net/note/reject/63958
Search -- http://master.php.net/manage/user-notes.php