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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: crescentfreshpot at yahoo dot com
New email:
PHP Version: OS:

 

 [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: Thu Jun 25 01:00:02 2026 UTC