php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #37110 Docs for PDO_OCI DSN
Submitted: 2006-04-17 19:03 UTC Modified: 2006-04-26 12:32 UTC
From: crescentfreshpot at yahoo dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.1.2 OS: Irrelevant
Private report: No CVE-ID: None
 [2006-04-17 19:03 UTC] 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');
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-17 19:04 UTC] crescentfreshpot at yahoo dot com
Referring to:
http://www.php.net/manual/en/ref.pdo-oci.connection.php
 [2006-04-17 19:06 UTC] crescentfreshpot at yahoo dot com
re-categorized: docs problem not pdo problem
 [2006-04-26 12:32 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Jun 15 19:00:01 2026 UTC