|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-03-15 04:06 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 04:00:02 2025 UTC |
The new field of structure is : void *extension; at the end of the record... That should not change anymore... typedef struct st_mysql_field { char *name; /* Name of column */ char *org_name; /* Original column name, if an alias */ char *table; /* Table of column if column was a field */ char *org_table; /* Org table name, if table was an alias */ char *db; /* Database for table */ char *catalog; /* Catalog for table */ char *def; /* Default value (set by mysql_list_fields) */ unsigned long length; /* Width of column (create length) */ unsigned long max_length; /* Max width for selected set */ unsigned int name_length; unsigned int org_name_length; unsigned int table_length; unsigned int org_table_length; unsigned int db_length; unsigned int catalog_length; unsigned int def_length; unsigned int flags; /* Div flags */ unsigned int decimals; /* Number of decimals in field */ unsigned int charsetnr; /* Character set */ enum enum_field_types type; /* Type of field. See mysql_com.h for types */ void *extension; } MYSQL_FIELD;