|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-07 17:53 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 17:00:01 2025 UTC |
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' ... )