Home » Database » MDB2_Driver_oci8 » Bug #7907
uses database as username
Details
| Submitted | 2006-06-15 15:45 UTC |
|---|---|
| From | ces dot fci at gmail dot com |
| Status | Wont fix |
| Package | MDB2_Driver_oci8 |
| PHP Version | 5.1.2 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[2006-06-15 15:45 UTC] ces dot fci at gmail dot com
Description:
------------
I receive this error when trying to connect:
"An error occured: MDB2 Error: connect failed [Native code: 1017] [Native message: ORA-01017: invalid username/password; logon denied]"
it appears to be setting the username to the database name when the undocumented emulate_database is on(default).
instead I set the dsn's database equal to the database name.
Test script:
---------------
--- oci8.php.orig 2006-06-15 10:24:25.368288912 -0500
+++ oci8.php 2006-06-15 10:36:02.844256448 -0500
@@ -338,7 +338,7 @@
function connect()
{
if ($this->database_name && $this->options['emulate_database']) {
- $this->dsn['username'] = $this->options['database_name_prefix'].$this->database_name;
+ $this->dsn['database'] = $this->options['database_name_prefix'].$this->database_name;
}
if (is_resource($this->connection)) {
if (count(array_diff($this->connected_dsn, $this->dsn)) == 0
Expected result:
----------------
connect to the db