|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-03-05 00:29 UTC] johannes@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: mysql
[2012-03-05 00:29 UTC] johannes@php.net
[2012-03-07 00:38 UTC] uabitesoj at gmail dot com
[2012-03-20 11:56 UTC] mj@php.net
[2012-03-27 00:41 UTC] uabitesoj at gmail dot com
-Status: Feedback
+Status: Assigned
[2012-03-27 00:41 UTC] uabitesoj at gmail dot com
[2012-04-26 06:10 UTC] uabitesoj at gmail dot com
-Status: Assigned
+Status: Closed
[2012-04-26 06:10 UTC] uabitesoj at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 09:00:01 2025 UTC |
Description: ------------ Now I'm using php-5.3.10. Executing a prepared sql statemente with pdo-mysql produces a "Segmento Fault" error. The configure line used to compile php is: ./configure \ --prefix=/usr/lib/php-5.3.10 \ --exec-prefix=/usr/lib/php-5.3.10 \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-config-file-path=/etc \ --enable-zip \ --enable-debug \ --with-curl=/usr/local \ --with-readline \ --enable-mbstring \ --with-mysqli=mysqlnd \ --with-pdo-mysql \ --with-mysql-sock=/var/lib/mysql/mysqld.sock \ --with-openssl \ --with-zlib \ --with-gd Test script: --------------- <?php $dbh = new PDO('mysql:host=localhost;dbname=acceso', 'dbuser', 'dbpass'); $sql = 'INSERT INTO user (id, nombre, login, passwd) VALUES (?, ?, ?, ?)'; $stm = $dbh->prepare($sql); $stm->bindValue(1, 0); $stm->bindValue(2, 'Name, Last Name, etc. etc.'); $stm->bindValue(3, 'log_name'); $stm->bindValue(4, SHA1('log_name', FALSE)); $stm->execute(); echo 'New user record saved in DB'; ?> Expected result: ---------------- Echoed 'New user record saved in DB' and a new record in "user" table. Actual result: -------------- GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-37.el5_7.1) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/php...done. (gdb) run ExecutePrepared.php Starting program: /usr/bin/php ExecutePrepared.php warning: .dynamic section for "/lib/libc.so.6" is not at the expected address warning: difference appears to be caused by prelink, adjusting expectations [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x08325563 in mysqlnd_cset_escape_slashes (cset=0x0, newstr=0x89db217 "p", escapestr=0x89dca6c "Name, Last name, etc., etc.", escapestr_len=27) at /d/software/Php/php-5.3.10/ext/mysqlnd/mysqlnd_charset.c:718 718 if (cset->char_maxlen > 1 && (len = cset->mb_valid(escapestr, end))) { (gdb) bt #0 0x08325563 in mysqlnd_cset_escape_slashes (cset=0x0, newstr=0x89db217 "p", escapestr=0x89dca6c "Name, Last name, etc., etc.", escapestr_len=27) at /d/software/Php/php-5.3.10/ext/mysqlnd/mysqlnd_charset.c:718 #1 0x081f6a55 in mysql_handle_quoter (dbh=0x89dc118, unquoted=0x89dca6c "Name, Last name, etc., etc.", unquotedlen=27, quoted=0x89de1a0, quotedlen=0x89de19c, paramtype=PDO_PARAM_STR) at /d/software/Php/php-5.3.10/ext/pdo_mysql/mysql_driver.c:337 #2 0x081f5f89 in pdo_parse_params (stmt=0x89ddbec, inquery=0x89ddd0c "INSERT INTO user (id, nombre, login, passwd) VALUES (?, ?, ?, ?)", inquery_len=64, outquery=0x89ddc38, outquery_len=0x89ddc3c) at /d/software/Php/php-5.3.10/ext/pdo/pdo_sql_parser.c:585 #3 0x081f2d59 in zim_PDOStatement_execute (ht=0, return_value=0x89ddeec, return_value_ptr=0x0, this_ptr=0x89dc1ec, return_value_used=0) at /d/software/Php/php-5.3.10/ext/pdo/pdo_stmt.c:497 #4 0x083b2619 in zend_do_fcall_common_helper_SPEC (execute_data=0x8a0dcc8) at /d/software/Php/php-5.3.10/Zend/zend_vm_execute.h:320 #5 0x083b1ca8 in execute (op_array=0x89db224) at /d/software/Php/php-5.3.10/Zend/zend_vm_execute.h:107 #6 0x0838ced7 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /d/software/Php/php-5.3.10/Zend/zend.c:1236 #7 0x0833b5de in php_execute_script (primary_file=0xbfffe5ac) at /d/software/Php/php-5.3.10/main/main.c:2308 #8 0x0840f37b in main (argc=2, argv=0xbfffe714) at /d/software/Php/php-5.3.10/sapi/cli/php_cli.c:1184