|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16431 DB::connect() fails with Oracle, fix found
Submitted: 2002-04-04 12:17 UTC Modified: 2002-04-04 16:26 UTC
From: chengpan at attbi dot com Assigned:
Status: Not a bug Package: PEAR related
PHP Version: 4.1.2 OS: Linux 2.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
34 + 3 = ?
Subscribe to this entry?

 [2002-04-04 12:17 UTC] chengpan at attbi dot com
The DB::connect() function in file pear/DB/oci8.php in php-4.1.2 and php-4.2.0RC2 cannot connect to an Oracle database if one follows the order for the arguments for this function.  In this function, $dsninfo['hostspec'] is passed into OCILogon().  The correct parameter should be $dsninfo['database'].

The following output of diff shows a fix:

<     $database = $dsninfo['database'];
>     $hostspec = $dsninfo['hostspec'];
<     if ($database) {
<         $conn = @$connect_function($user,$pw,$database);
      if ($hostspec) {
>         $conn = @$connect_function($user,$pw,$hostspec);


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 11:01:37 2024 UTC