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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 16:01:28 2024 UTC