PHP 4.0 Bug #6294: Strange behaviour when using DB2

From: Date: Tue, 22 Aug 2000 13:34:14 +0000
Subject: PHP 4.0 Bug #6294: Strange behaviour when using DB2
Groups: php.dev 
Request: Send a blank email to php-dev+get-30191@lists.php.net to get a copy of this message
From: ltning@anduin.net Operating system: RedHat Linux 6.2 PHP version: 4.0.1pl2 PHP Bug Type: ODBC related Bug description: Strange behaviour when using DB2 Hi! Having installed DB2 and compiled PHP with --with-ibm-db2 option, set the environment properly and started apache/php, I have the following situation: Connecting to the database works fine. Inserting data into tables in a database works fine, it seems. I can view the data using the command line interface to DB2 or any other tool. Selecting from a table, however, is rather flakey, at best. In my case, doing a "SELECT * FROM bar" seems to work, but when using odbc_result_all() to print the result set, the first field (an ID field, CHAR(13) BIT DATA) shows as either empty or with strange data. This strange data is, in this case, either "ml>" (part of "<html>"??) or "/usr/bin:/usr/sbin:/usr/local/bin:"........ .. Seems to be a environment variable on my system. When running it through PHP4 for OS/2 instead, these "strange data" are either "ml>" or parts of the SQL statement. Doing a "SELECT foo FROM bar" returns nothing at all, even though the exact same statement returns the data I want in any other tool I use to manage the database. This sounds to me like a nasty bug - pointer problems or something? - in your code.. Either that, or it's something stupid I've done. ;) Hope this can be resolved as soon as possible, since we're about to do a company-wide transition from MySQL to DB2 these days. This encounter is a serious set-back .. Best regards, Eirik Overby Freepoint Networks GmbH Haburg, Germany

« previous php.dev (#30191) next »