[nycphp-talk] PEAR DB ODBC broken after 5.0.4 -> 5.1.1
Daniel Krook
krook at us.ibm.com
Wed Jan 18 16:13:13 EST 2006
Hey folks,
A site of mine has not been able to connect to DB2 with PEAR since I
upgraded to PHP 5.1.1 from 5.0.4. I upgraded a similar machine with the
same versions of all software and its DB2 connection works as expected.
Both machines had PHP compiled with '--with-ibm-db2=/home/db2inst1/sqllib'
and have the same ODBC settings in php.ini.
This code:
include_once('DB.php');
$db =& DB::connect('odbc://' . DB_USER . ':' . DB_PASS . '@' . DB_HOST .
'/' . DB_NAME);
if (DB::isError($db)) die($db->toString());
Returns:
[db_error: message="DB Error: connect failed" code=-24 mode=return
level=notice prefix="" info=" [nativecode=ýÿÿÿä~ \%ÈAÛ.] **
odbc://username:password@127.0.0.1/database"]
The database server is up, and I can connect to it on the command line and
select rows. I've also tried setting the port number explicitly.
Here's the output of print_r($db), though it's not giving me anything more
detailed than "DB Error: connect failed"
http://krook.org/etc/print_r.txt
Even more interesting, if I refresh the page a few times, the load average
steadily increases and the processor is eventually consumed by httpd
processes to the point where I have to restart Apache.
Any thoughts on where I might be going wrong?
Thanks in advance,
-Dan
Daniel Krook, Content Tools Developer
Global Production Services - Tools, ibm.com
http://bluepages.redirect.webahead.ibm.com/
http://blogpages.redirect.webahead.ibm.com/
http://bookmarks.redirect.webahead.ibm.com/
More information about the talk
mailing list