Bug #16431: DB::connect() fails with Oracle, fix found
| From: | chengpan at attbi dot com | Date: | Thu, 04 Apr 2002 17:17:57 +0000 |
| Subject: | Bug #16431: DB::connect() fails with Oracle, fix found | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-5189@lists.php.net to get a copy of this message | ||
From: chengpan@attbi.com
Operating system: Linux 2.4
PHP version: 4.1.2
PHP Bug Type: PEAR related
Bug description: DB::connect() fails with Oracle, fix found
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);
--
Edit bug report at http://bugs.php.net/?id=16431&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16431&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16431&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16431&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16431&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16431&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16431&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16431&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16431&r=submittedtwice