ID: 28307 Updated by: [EMAIL PROTECTED] Reported By: nick at careercast dot com -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: Linux PHP Version: 4.3.6 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php You need to use mysqli extensions if you want to communicate with MySQL 4.1+ Previous Comments: ------------------------------------------------------------------------ [2004-05-06 21:14:47] nick at careercast dot com Description: ------------ We recently recompiled php to upgrade the mysql client to what the same version as our mysql server (4.1.1-alpha-max-log) When we did, mysql_fetch_assoc started producing irratic characters for the column names (like "#B"). Problem is not limited to mysql_fetch_assoc, we also saw issues with mysql_fetch_object. Mysql via command line produces perfect results, it was only when the content was produced via php that there was a problem. We were running php 4.3.3, so we tried upgrading php to 4.3.6 and found that there was no difference. We were forced to revert back to compiling php with mysql client 4.0.13. Configure: ./configure' '--with-xmlrpc' '--enable-xslt' '--with-xslt-sablot=/usr/local/Sablot-1.0' '--with-zlib-dir=/usr/local/zlib-1.1.4/include' '--with-expat-dir=/usr/local/expat-1.95.5' '--with-iconv-dir=/usr/local/iconv-1.9.1' '--with-apxs=/usr/local/apache-1.3.27/bin/apxs' '--with-curl' '--with-mysql=/usr/local/mysql-max-4.1.1-alpha-pc-linux-i686' '--with-gd=/usr/local/gd-2.0.11' '--with-png' '--with-jpeg' '--with-ttf' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/freetype-2.1.3' '--with-gettext' Reproduce code: --------------- Specific code is difficult to produce, but it affected multiple applications, so I assume it will be easy to duplicate. For clarity of the problem, I'll provide untested sample code that should reproduce the issue. $dblink=mysql_connect('localhost', 'user', 'pass'); $result=mysql_query("select * from table limit 1", $dblink); $row=mysql_fetch_assoc($result); print_r($row); Expected result: ---------------- Array ( 'column1' => 'value1' 'column2' => 'value2' ... ) Actual result: -------------- Array ( '#B' => 'value1' ' ' => 'value1' ... ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28307&edit=1
