#37110 [Opn]: Docs for PDO_OCI DSN
| From: | crescentfreshpot at yahoo dot com | Date: | Mon, 17 Apr 2006 19:04:44 +0000 |
| Subject: | #37110 [Opn]: Docs for PDO_OCI DSN | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95895@lists.php.net to get a copy of this message | ||
ID: 37110
User updated by: crescentfreshpot at yahoo dot com
Reported By: crescentfreshpot at yahoo dot com
Status: Open
Bug Type: PDO related
Operating System: Irrelevant
PHP Version: 5.1.2
New Comment:
Referring to:
http://www.php.net/manual/en/ref.pdo-oci.connection.php
Previous Comments:
------------------------------------------------------------------------
[2006-04-17 19:03:46] crescentfreshpot at yahoo dot com
Description:
------------
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 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');
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37110&edit=1