#31600 [NEW]: mysql_fetch_assoc returns strange chars as result indexes
| From: | mveutner at iptel-ulm dot de | Date: | Tue, 18 Jan 2005 16:57:50 +0000 |
| Subject: | #31600 [NEW]: mysql_fetch_assoc returns strange chars as result indexes | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-72405@lists.php.net to get a copy of this message | ||
From: mveutner at iptel-ulm dot de
Operating system: Windows 2000 SP4
PHP version: 5.0.3
PHP Bug Type: MySQL related
Bug description: mysql_fetch_assoc returns strange chars as result indexes
Description:
------------
Hello,
searched the web, google, faqs, and lot more.
No result.
The problem:
Updated php4 last stable to php5 last stable.
Now every mysql_fetch_assoc($result) returns strange characters as array
index.
Tried to change libmysql.dll which was packed with php5 to the version
packed with mysql.
No result.
This problem does NOT happen when I execute a query with named columns
(SELECT
Name, Surname From customers).
My Configuration:
PHP 5.0.3
Apache Version Apache/1.3.33 (Win32) mod_ssl/2.8.22 OpenSSL/0.9.7e
Mysql Server: 4.1.7-nt
The complete environment (output of phpinfo()) can be found at:
http://paracom.iptel-online.de/info.php
Reproduce code:
---------------
$str_sql="SELECT * FROM customers";
$rs_res = mysql_query($str_sql, $conn) or die("Error in query 2 $str_sql"
. mysql_error($conn));
$ln_res = mysql_fetch_assoc($rs_res)
Expected result:
----------------
print_r($ln_res) should look like:
array(Name=>value,Surname=>value ...)
Actual result:
--------------
Array ( [B] => 1 [@] => 99999 [] => 1 [] => 0000-00-00 )
This means: resulting array from mysql_fetch_assoc returns no more any
valid column names. Instead returning strange characters.
--
Edit bug report at http://bugs.php.net/?id=31600&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31600&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31600&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31600&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31600&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31600&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31600&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31600&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31600&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31600&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31600&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31600&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31600&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31600&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31600&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31600&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31600&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31600&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31600&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31600&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31600&r=mysqlcfg