php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49262 PDO MySQL crashes on STRING params
Submitted: 2009-08-14 20:23 UTC Modified: 2010-01-04 10:56 UTC
From: grzegorz at heex dot pl Assigned:
Status: Closed Package: PDO related
PHP Version: 5.3.0 OS: Win XP Sp3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: grzegorz at heex dot pl
New email:
PHP Version: OS:

 

 [2009-08-14 20:23 UTC] grzegorz at heex dot pl
Description:
------------
Now, PDO in PHP 5.3 is usless.

Reproduce code:
---------------
$name = 'same_name';
$pdo= new PDO("mysql:host=localhost;dbname=[base];",'[user]','[pass]');
$sth = $pdo->prepare("SELECT * FROM lng WHERE lng_name=:Name");
$sth->bindValue(':Name',$name,PDO::PARAM_STR);
$sth->execute();
die('OK');

Expected result:
----------------
OK

Actual result:
--------------
PHP CGI / FastCGI crash

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-24 19:55 UTC] sjoerd@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2009-08-25 07:57 UTC] grzegorz at heex dot pl
Function	    Arg 1	    Arg 2	    Arg 3	  Source
php5ts!mysqlnd_cset_escape_slashes+30	    00000000	    05652000	    0565fb58	  
php_pdo_mysql!_pdo_mysql_error+6f7	    0565f588	    0565fb58	    00000006	  
php5ts!pdo_parse_params+394	    05662d50	    05662e78	    00000026	  
php5ts!pdo_stmt_describe_columns+772	    00000000	    0565f638	    00000000	  
php5ts!execute+10b9	    05690070	    015e5801	    007f66b8	  
php5ts!execute+156d	    015e5858	    03e8fbe0	    00000000	  
php5ts!execute+298	    0565dbf0	    015e5800	    015e5858	  
php5ts!zend_execute_scripts+fe	    00000008	    015e5858	    00000000	  
php5ts!php_execute_script+231	    03e8fe6c	    015e5858	    00000005	  
php5apache2_2!zm_info_apache+1744	    007aa760	    0073a400	    007aa760	  
libhttpd!ap_run_handler+21	    007aa760	    007aa760	    007aa760	  
libhttpd!ap_invoke_handler+ae	    00000000	    007a7718	    03e8ff38	  
libhttpd!ap_die+24e	    007aa760	    00000000	    0073aac8	  
libhttpd!ap_get_request_note+1c6c	    007a7718	    007a7718	    007a7718	  
libhttpd!ap_run_process_connection+21	    007a7718	    0074a198	    03e8ff80	  
libhttpd!ap_process_connection+33	    007a7718	    007a26d8	    0006fb80	  
libhttpd!ap_regkey_value_remove+c0c	    007a7710	    0006fb80	    00eb0650	  
msvcrt!_endthreadex+a9	    0079ef88	    0006fb80	    00eb0650	  
kernel32!BaseThreadStart+37	    77c2a341	    0079ef88	    00000000	  



PHP5TS!MYSQLND_CSET_ESCAPE_SLASHES+30In httpd__PID__4604__Date__08_25_2009__Time_09_37_39AM__46__Second_Chance_Exception_C0000005.dmp the assembly instruction at php5ts!mysqlnd_cset_escape_slashes+30 in C:\php5\php5ts.dll from The PHP Group has caused an access violation exception (0xC0000005) when trying to read from memory location 0x00000010 on thread 157
 [2009-09-18 08:39 UTC] uw@php.net
Can you say anything about the character sets you are using?
 [2009-09-20 22:44 UTC] grzegorz at heex dot pl
Column lng_name and a whole table they have utf8_general_ci charset.
 [2009-09-22 13:53 UTC] uw@php.net
Ok, great. Your character set is uft8 (uft8_general_ci is the collation). 

Can you paste "SHOW VARIABLES LIKE '%character%'" to give details about your MySQL settings?

Thanks!
 [2009-09-22 16:35 UTC] grzegorz at heex dot pl
Variable_name 	Value
character_set_client 	utf8
character_set_connection 	utf8
character_set_database 	utf8
character_set_filesystem 	binary
character_set_results 	utf8
character_set_server 	utf8
character_set_system 	utf8
character_sets_dir 	C:\Program Files\MySQL\MySQL Server 6.0\share\char..
 [2009-09-22 17:00 UTC] uw@php.net
Thanks again, utf8 everywhere. We guessed so. 

I don't know if its of much relevance but one last question: what version of MySQL 6.0 are you using?

.oO( MySQL 6.0 is something I don't like to see here. I wouldn't want to debug a non-GA server, if I had a choice. )

Thanks!
 [2009-09-22 18:58 UTC] grzegorz at heex dot pl
It's 6.0.5-alpha-community
 [2009-11-04 17:11 UTC] uw@php.net
If its not crashing with MySQL 5.1, I strongly believe this is a MySQL matter not a PHP problem. Can you try 5.1? 

Thanks
 [2009-11-12 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-12-22 13:02 UTC] grzegorz at heex dot pl
OK, I've downgraded my MySQL to 5.5 and now it's fine.
But bug of PHP 5.3 and MySQL 6  is still open.
 [2010-01-04 10:56 UTC] uw@php.net
MySQL 6 is not GA, MySQL 6 bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 04:01:34 2024 UTC