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 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:
MUST BE VALID
Solve the problem:
47 - 43 = ?
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:

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

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 06:01:29 2024 UTC