Home » Database » DB_DataObject » Bug #4193
sqlite dsn causes invalid _database
Details
| Submitted | 2005-04-20 22:18 UTC |
|---|---|
| From | randy at rcs-comp dot com |
| Assigned | alan_k |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | 5.0.2 |
| Roadmaps | (Not assigned) |
Comments
[2005-04-20 22:18 UTC] randy at rcs-comp dot com
Description:
------------
I was getting errors in the generator because the _database value was the full path of the sqlite database. That meant that line 236 of generator.php was creating a bade $file value.
I changed line 107 to this:
$t->_database = is_file($databasename) ? basename( $databasename) : $databasename;
Not sure about other implications with this change.
There is a similiar problem in dataObject.php in the _connect method when _database gets assigned a value.
Reproduce code:
---------------
Connect to a sqlite database and run the generator
Expected result:
----------------
$file =
c:/htdocs/ocfair2/configuration/classes/db/ocfair.db.ini
Actual result:
--------------
$file =
c:/htdocs/ocfair2/configuration/classes/db/c:/htdocs/ocfair2/configuration/db/ocfair.db.ini