php.net |  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 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: chengpan at attbi dot com
New email:
PHP Version: OS:

 

 [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:

94c94
<     $database = $dsninfo['database'];
---
>     $hostspec = $dsninfo['hostspec'];
98,99c98,99
<     if ($database) {
<         $conn = @$connect_function($user,$pw,$database);
---
      if ($hostspec) {
>         $conn = @$connect_function($user,$pw,$hostspec);


Patches

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC