Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #7907 uses database as username
Submitted: 2006-06-15 15:45 UTC
From: ces dot fci at gmail dot com Assigned:
Status: Wont fix Package: MDB2_Driver_oci8 (version 0.3.0)
PHP Version: 5.1.2 OS: linux
Roadmaps: (Not assigned)    
Subscription  


 [2006-06-15 15:45 UTC] ces dot fci at gmail dot com (Clayton Smith)
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

Comments

 [2006-06-15 16:08 UTC] lsmith (Lukas Smith)
This is not a bug. You can control this behaviour using the "emulate_database" option which defaults to true. Set it to false if you do not want to emulate a concept of a database similar to other RDBMS.