php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28307 Data returned malformed/irratic with mysql 4.1.1-alpha
Submitted: 2004-05-06 21:14 UTC Modified: 2004-05-07 17:53 UTC
From: nick at careercast dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.6 OS: Linux
Private report: No CVE-ID: None
 [2004-05-06 21:14 UTC] 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'
...
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-07 17:53 UTC] iliaa@php.net
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+ 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 23:01:28 2024 UTC