DB_DataObject: extrange behaviour with odbc

From: Date: Mon, 12 May 2003 11:34:35 +0000
Subject: DB_DataObject: extrange behaviour with odbc
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5320@lists.php.net to get a copy of this message
Hi, I'm using DataObject to handle the database data for a small website. I've tested it with local mySQL databases, with very good results. However, I'm trying now to access database through ODBC (ODBC manager runs on Win2K), and I'm getting strange results. 1) First, I did not manage to run the createTables.php to build the initial table classes and the database definition .ini file. It worked fine with: mysql://user:password@localhost/databasename but when the DSN was: odbc://user:password@myodbc the files created were really odd: -6.php .ini .php 1.php 1024.php Array.php DB Error (empty file) The odbc DSN uses the mysql ODBC driver. I tried to autogenerate the configuration files with another ODBC driver (Client Access for AS/400), and I got exactly the same extrange filenames. 2) Next I typed manually the table.php and myodbc.ini files, and the DB_DataObject class worked fine (tried select and update) but it throws a warning: Warning: parse_ini_file() [function.parse-ini-file.html]: Cannot open 'D:/www/includes/DataObjects/.ini' for reading in c: \php\pear\DB\DataObject.php on line 1080 It looks for file .ini, when the file it should look for is (I guess) myodbc.ini. Renaming the myodbc.ini to .ini works. 3) Setting on the debug mode for the class shows that the queries and connections are successful. Any hints are appreciated ! -- Daniel

« previous php.pear.general (#5320) next »