Edit report at http://bugs.php.net/bug.php?id=51300&edit=1
ID: 51300 User updated by: tanguy dot pruvot at gmail dot com Reported by: tanguy dot pruvot at gmail dot com Summary: SELECT * CRASH With LibMySQL > 5.0.51 Status: Bogus Type: Bug Package: PDO related Operating System: Windows 7 PHP Version: 5.2.13 New Comment: I'm sure, there is nothing in my PATH... i have posted the solution (working with all new versions....) Previous Comments: ------------------------------------------------------------------------ [2010-03-15 10:03:17] paj...@php.net We don't support external libmysql. They break the ABI, please be sur that the PHP directory (where the libmysql.dll and other php's released DLLs are present) is first in your PATH, for php.exe. ------------------------------------------------------------------------ [2010-03-15 04:08:42] tanguy dot pruvot at gmail dot com MySQL and MySQLi extensions are working, that only affects pdo_mysql extension... ------------------------------------------------------------------------ [2010-03-15 04:06:46] tanguy dot pruvot at gmail dot com Description: ------------ Since LibMySQL.dll 5.0.52 (and tested to 5.1.44) I ve the found why pdo_mysql is crashing... Here : http://github.com/php/php- src/blob/4f3e41e55dae1978487461d73805eaac8202aff8/ext/pdo_mysql/mysql_statement. c#L429 The struct pdo_column_data must be 0x54 (84.) bytes sized... Actually it is 0x50 (80.) bytes You can fix binary dll by replacing (with hex editor : 83 C3 50 by 83 C3 54) Test script: --------------- <?php $dbh = new PDO('mysql:host=127.0.0.1;port=3306;dbname=ubagestion_dev','root',''); echo "ok"; $dbh->exec('SET CHARACTER SET latin1'); echo "ok"; $stmt = $dbh->query("select ID_Utilisateur from utilisateurs"); echo "ok"; $stmt = $dbh->prepare("select * from utilisateurs"); echo "ok"; $results = $stmt->execute(); // CRASH HERE or on $dbh->query("SELECT * FROM ...") echo "NOT CRASHED"; foreach ($results as $id){ echo $results['ID_Utilisateur']; } Actual result: -------------- no trace, system crash (and apache too if apache2handler used) Crash on second column name ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51300&edit=1