#34625 [Bgs]: Scrollable cursor doesn't work with MySQL
ID: 34625 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca Status: Bogus Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5CVS-2005-09-25 (snap) Assigned To: wez New Comment: Ok. Perhaps you should throw an exception when we give a cursor attribute to a mysql pdo driver. This should also be doc'd. Previous Comments: [2005-10-12 14:36:17] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php MySQL does not support cursors and the driver cannot emulate them for you. [2005-09-24 23:46:32] stewey at ambitious dot ca Thanks for the info. Constant problem resolved, but the scrollable cursor problem remains. New repro code: $PDO = new PDO( "mysql:dbname=test;host=127.0.0.1", 'user', 'pass' ); $statement = $PDO->prepare("select id from table", array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL) ); $statement->execute(); print_r($statement->fetch( PDO::FETCH_ASSOC, PDO::FETCH_ORI_ABS, 1 )); print_r($statement->fetch( PDO::FETCH_ASSOC, PDO::FETCH_ORI_ABS, 1 )); exit; [2005-09-24 13:36:13] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ---------------- [2005-09-24 06:35:56] stewey at ambitious dot ca Description: Preparing a statement with the PDO_ATTR_CURSOR => PDO_CURSOR_SCROLL driver option doesn't work with MySQL. Reproduce code: --- $PDO = new PDO( "mysql:dbname=test;host=127.0.0.1", 'user', 'pass' ); $statement = $PDO->prepare("select id from table", array(PDO_ATTR_CURSOR => PDO_CURSOR_SCROLL) ); $statement->execute(); print_r($statement->fetch( PDO_FETCH_ASSOC, PDO_FETCH_ORI_ABS, 1 )); print_r($statement->fetch( PDO_FETCH_ASSOC, PDO_FETCH_ORI_ABS, 1 )); exit; Expected result: I would expect to see the same row output twice. If this is not a support driver option, then I would expect and error or exception thrown (yes, exceptions are enabled). Actual result: -- Two different rows. The PDO_FETCH_ORI_ABS arguments are seemingly ignored. -- Edit this bug report at http://bugs.php.net/?id=34625&edit=1
#34623 [Opn]: Segfault when selecting 'longtext' field with pdo/mysql
ID: 34623 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 -PHP Version: 5CVS-2005-09-27 (snap) +PHP Version: 5CVS-2005-09-29 (snap) New Comment: Problem persists with php5-200509290230. Previous Comments: [2005-09-29 05:23:49] stewey at ambitious dot ca Nope; I'm using: php5-200509271430. I'll test again with the latest snap and report back. [2005-09-29 03:59:27] [EMAIL PROTECTED] Are you certain that you are using the latest pdo and pdo_mysql extensions from the CVS? [2005-09-29 00:18:06] stewey at ambitious dot ca No valgrind on my system :( A brief look around suggests it isn't available (won't build?) on OS X. If you know otherwise, or if there's an alternative tool for OS X, please let me know. [2005-09-29 00:06:46] [EMAIL PROTECTED] And what does valgrind say about it? valgrind --tool=memcheck --leak-check=yes --num-callers=30 php /path/to/your/script.php ---- [2005-09-28 23:44:37] stewey at ambitious dot ca Hope this helps... (gdb) p *stmt $1 = { ce = 0x712f6461, properties = 0x74615f69, in_get = 0, in_set = 1, methods = 0x72697479, driver_data = 0x2f696e64, executed = 0, supports_placeholders = 3, _reserved = 91762280, column_count = 1953328163, columns = 0x646f776e, database_object_handle = { value = { lval = 1735549284, dval = 2.0473549222889057e+190, str = { val = 0x67726164 , len = 1696742984 }, ht = 0x67726164, obj = { handle = 1735549284, handlers = 0x65223e48 } }, refcount = 1870078052, type = 111 'o', is_ref = 32 ' ' }, dbh = 0x646f776e, bound_params = 0x67726164, bound_param_map = 0x65206120, bound_columns = 0x63686563, row_count = 1802530665, query_string = 0x6e742073 , query_stringlen = 1864397928, active_query_string = 0x61742061 , active_query_stringlen = 1847616865, error_code = "rlier ", lazy_object_ref = { value = { lval = 1920361842, dval = 2.3894187096828918e+243, str = { val = 0x72766572 , len = 537725472 }, ht = 0x72766572, obj = { handle = 1920361842, handlers = 0x200d0a20 } }, refcount = 538976355, type = 97 'a', is_ref = 110 'n' }, refcount = 1700881440, default_fetch_type = 1769226044, fetch = { column = 794902048, cls = { ce = 0x2f613e20, ctor_args = 0xd0a2020, retval_ptr = 0x3c6c693e, fci = { size = 1012998248, function_table = 0x7265663d, function_name = 0x22687474, symbol_table = 0x703a2f2f, retval_ptr_ptr = 0x636f6d70, param_count = 1970562418, params = 0x2f646570, object_pp = 0x6f742f69, no_separation = 110 'n' }, fcc = { initialized = 110 'n', function_handler = 0x74732f66, calling_scope = 0x61712f64, object_pp = 0x6174615f } }, func = { function = 0x2f613e20, fetch_args = 0xd0a2020, object = 0x3c6c693e, fci = { size = 1012998248, function_table = 0x7265663d, function_name = 0x22687474, symbol_table = 0x703a2f2f, retval_ptr_ptr = 0x636f6d70, param_count = 1970562418, params = 0x2f646570, object_pp = 0x6f742f69, no_separation = 110 'n' }, fcc = { initialized = 110 'n', function_handler = 0x74732f66, calling_scope = 0x61712f64, object_pp = 0x6174615f }, values = 0x696e7465 }, into = 0x2f613e20 }, named_rewrite_template = 0x67726974 } (gdb) p *stmt->methods Cannot access memory at address 0x72697479 The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/34623 -- Edit this bug report at http://bugs.php.net/?id=34623&edit=1
#34623 [Fbk->Opn]: Segfault when selecting 'longtext' field with pdo/mysql
ID: 34623 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca -Status: Feedback +Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5CVS-2005-09-27 (snap) New Comment: Nope; I'm using: php5-200509271430. I'll test again with the latest snap and report back. Previous Comments: [2005-09-29 03:59:27] [EMAIL PROTECTED] Are you certain that you are using the latest pdo and pdo_mysql extensions from the CVS? [2005-09-29 00:18:06] stewey at ambitious dot ca No valgrind on my system :( A brief look around suggests it isn't available (won't build?) on OS X. If you know otherwise, or if there's an alternative tool for OS X, please let me know. [2005-09-29 00:06:46] [EMAIL PROTECTED] And what does valgrind say about it? valgrind --tool=memcheck --leak-check=yes --num-callers=30 php /path/to/your/script.php ---- [2005-09-28 23:44:37] stewey at ambitious dot ca Hope this helps... (gdb) p *stmt $1 = { ce = 0x712f6461, properties = 0x74615f69, in_get = 0, in_set = 1, methods = 0x72697479, driver_data = 0x2f696e64, executed = 0, supports_placeholders = 3, _reserved = 91762280, column_count = 1953328163, columns = 0x646f776e, database_object_handle = { value = { lval = 1735549284, dval = 2.0473549222889057e+190, str = { val = 0x67726164 , len = 1696742984 }, ht = 0x67726164, obj = { handle = 1735549284, handlers = 0x65223e48 } }, refcount = 1870078052, type = 111 'o', is_ref = 32 ' ' }, dbh = 0x646f776e, bound_params = 0x67726164, bound_param_map = 0x65206120, bound_columns = 0x63686563, row_count = 1802530665, query_string = 0x6e742073 , query_stringlen = 1864397928, active_query_string = 0x61742061 , active_query_stringlen = 1847616865, error_code = "rlier ", lazy_object_ref = { value = { lval = 1920361842, dval = 2.3894187096828918e+243, str = { val = 0x72766572 , len = 537725472 }, ht = 0x72766572, obj = { handle = 1920361842, handlers = 0x200d0a20 } }, refcount = 538976355, type = 97 'a', is_ref = 110 'n' }, refcount = 1700881440, default_fetch_type = 1769226044, fetch = { column = 794902048, cls = { ce = 0x2f613e20, ctor_args = 0xd0a2020, retval_ptr = 0x3c6c693e, fci = { size = 1012998248, function_table = 0x7265663d, function_name = 0x22687474, symbol_table = 0x703a2f2f, retval_ptr_ptr = 0x636f6d70, param_count = 1970562418, params = 0x2f646570, object_pp = 0x6f742f69, no_separation = 110 'n' }, fcc = { initialized = 110 'n', function_handler = 0x74732f66, calling_scope = 0x61712f64, object_pp = 0x6174615f } }, func = { function = 0x2f613e20, fetch_args = 0xd0a2020, object = 0x3c6c693e, fci = { size = 1012998248, function_table = 0x7265663d, function_name = 0x22687474, symbol_table = 0x703a2f2f, retval_ptr_ptr = 0x636f6d70, param_count = 1970562418, params = 0x2f646570, object_pp = 0x6f742f69, no_separation = 110 'n' }, fcc = { initialized = 110 'n', function_handler = 0x74732f66, calling_scope = 0x61712f64, object_pp = 0x6174615f }, values = 0x696e7465 }, into = 0x2f613e20 }, named_rewrite_template = 0x67726974 } (gdb) p *stmt->methods Cannot access memory at address 0x72697479 [2005-09-28 23:36:56] [EMAIL PROTECTED] Still no luck in reproducing it. Please do the following in gdb (when you got the backtrace): gdb> p *stmt gdb> p *stmt->methods and paste results here. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/34623 -- Edit this bug report at http://bugs.php.net/?id=34623&edit=1
#34623 [Fbk->Opn]: Segfault when selecting 'longtext' field with pdo/mysql
ID: 34623 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca -Status: Feedback +Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5CVS-2005-09-27 (snap) New Comment: No valgrind on my system :( A brief look around suggests it isn't available (won't build?) on OS X. If you know otherwise, or if there's an alternative tool for OS X, please let me know. Previous Comments: [2005-09-29 00:06:46] [EMAIL PROTECTED] And what does valgrind say about it? valgrind --tool=memcheck --leak-check=yes --num-callers=30 php /path/to/your/script.php [2005-09-28 23:44:37] stewey at ambitious dot ca Hope this helps... (gdb) p *stmt $1 = { ce = 0x712f6461, properties = 0x74615f69, in_get = 0, in_set = 1, methods = 0x72697479, driver_data = 0x2f696e64, executed = 0, supports_placeholders = 3, _reserved = 91762280, column_count = 1953328163, columns = 0x646f776e, database_object_handle = { value = { lval = 1735549284, dval = 2.0473549222889057e+190, str = { val = 0x67726164 , len = 1696742984 }, ht = 0x67726164, obj = { handle = 1735549284, handlers = 0x65223e48 } }, refcount = 1870078052, type = 111 'o', is_ref = 32 ' ' }, dbh = 0x646f776e, bound_params = 0x67726164, bound_param_map = 0x65206120, bound_columns = 0x63686563, row_count = 1802530665, query_string = 0x6e742073 , query_stringlen = 1864397928, active_query_string = 0x61742061 , active_query_stringlen = 1847616865, error_code = "rlier ", lazy_object_ref = { value = { lval = 1920361842, dval = 2.3894187096828918e+243, str = { val = 0x72766572 , len = 537725472 }, ht = 0x72766572, obj = { handle = 1920361842, handlers = 0x200d0a20 } }, refcount = 538976355, type = 97 'a', is_ref = 110 'n' }, refcount = 1700881440, default_fetch_type = 1769226044, fetch = { column = 794902048, cls = { ce = 0x2f613e20, ctor_args = 0xd0a2020, retval_ptr = 0x3c6c693e, fci = { size = 1012998248, function_table = 0x7265663d, function_name = 0x22687474, symbol_table = 0x703a2f2f, retval_ptr_ptr = 0x636f6d70, param_count = 1970562418, params = 0x2f646570, object_pp = 0x6f742f69, no_separation = 110 'n' }, fcc = { initialized = 110 'n', function_handler = 0x74732f66, calling_scope = 0x61712f64, object_pp = 0x6174615f } }, func = { function = 0x2f613e20, fetch_args = 0xd0a2020, object = 0x3c6c693e, fci = { size = 1012998248, function_table = 0x7265663d, function_name = 0x22687474, symbol_table = 0x703a2f2f, retval_ptr_ptr = 0x636f6d70, param_count = 1970562418, params = 0x2f646570, object_pp = 0x6f742f69, no_separation = 110 'n' }, fcc = { initialized = 110 'n', function_handler = 0x74732f66, calling_scope = 0x61712f64, object_pp = 0x6174615f }, values = 0x696e7465 }, into = 0x2f613e20 }, named_rewrite_template = 0x67726974 } (gdb) p *stmt->methods Cannot access memory at address 0x72697479 [2005-09-28 23:36:56] [EMAIL PROTECTED] Still no luck in reproducing it. Please do the following in gdb (when you got the backtrace): gdb> p *stmt gdb> p *stmt->methods and paste results here. -------- [2005-09-28 23:13:47] stewey at ambitious dot ca Changing summary to read 'longtext'. [2005-09-28 23:11:46] stewey at ambitious dot ca It's actually a 'longtext'. I'm very sorry for the misinformation. To the obvious question: yes, this makes the difference. If it's 'text', no problem, longtext = segfault. Again, I'm sorry. Yes, I can repro via the CLI. Would you like a backtrace of that? CREATE TABLE `article` ( `articleId` int(10) unsigned NOT NULL auto_increment, `parentId` int(10) unsigned NOT NULL default '0', `templateId` int(10) unsigned NOT NULL default '0', `title` varchar(100) NOT NULL default '', `subTitle` varchar(255) default NULL, `text` longtext NO
#34623 [Fbk->Opn]: Segfault when selecting 'longtext' field with pdo/mysql
ID: 34623 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca -Status: Feedback +Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5CVS-2005-09-27 (snap) New Comment: Hope this helps... (gdb) p *stmt $1 = { ce = 0x712f6461, properties = 0x74615f69, in_get = 0, in_set = 1, methods = 0x72697479, driver_data = 0x2f696e64, executed = 0, supports_placeholders = 3, _reserved = 91762280, column_count = 1953328163, columns = 0x646f776e, database_object_handle = { value = { lval = 1735549284, dval = 2.0473549222889057e+190, str = { val = 0x67726164 , len = 1696742984 }, ht = 0x67726164, obj = { handle = 1735549284, handlers = 0x65223e48 } }, refcount = 1870078052, type = 111 'o', is_ref = 32 ' ' }, dbh = 0x646f776e, bound_params = 0x67726164, bound_param_map = 0x65206120, bound_columns = 0x63686563, row_count = 1802530665, query_string = 0x6e742073 , query_stringlen = 1864397928, active_query_string = 0x61742061 , active_query_stringlen = 1847616865, error_code = "rlier ", lazy_object_ref = { value = { lval = 1920361842, dval = 2.3894187096828918e+243, str = { val = 0x72766572 , len = 537725472 }, ht = 0x72766572, obj = { handle = 1920361842, handlers = 0x200d0a20 } }, refcount = 538976355, type = 97 'a', is_ref = 110 'n' }, refcount = 1700881440, default_fetch_type = 1769226044, fetch = { column = 794902048, cls = { ce = 0x2f613e20, ctor_args = 0xd0a2020, retval_ptr = 0x3c6c693e, fci = { size = 1012998248, function_table = 0x7265663d, function_name = 0x22687474, symbol_table = 0x703a2f2f, retval_ptr_ptr = 0x636f6d70, param_count = 1970562418, params = 0x2f646570, object_pp = 0x6f742f69, no_separation = 110 'n' }, fcc = { initialized = 110 'n', function_handler = 0x74732f66, calling_scope = 0x61712f64, object_pp = 0x6174615f } }, func = { function = 0x2f613e20, fetch_args = 0xd0a2020, object = 0x3c6c693e, fci = { size = 1012998248, function_table = 0x7265663d, function_name = 0x22687474, symbol_table = 0x703a2f2f, retval_ptr_ptr = 0x636f6d70, param_count = 1970562418, params = 0x2f646570, object_pp = 0x6f742f69, no_separation = 110 'n' }, fcc = { initialized = 110 'n', function_handler = 0x74732f66, calling_scope = 0x61712f64, object_pp = 0x6174615f }, values = 0x696e7465 }, into = 0x2f613e20 }, named_rewrite_template = 0x67726974 } (gdb) p *stmt->methods Cannot access memory at address 0x72697479 Previous Comments: [2005-09-28 23:36:56] [EMAIL PROTECTED] Still no luck in reproducing it. Please do the following in gdb (when you got the backtrace): gdb> p *stmt gdb> p *stmt->methods and paste results here. ------------ [2005-09-28 23:13:47] stewey at ambitious dot ca Changing summary to read 'longtext'. ------------ [2005-09-28 23:11:46] stewey at ambitious dot ca It's actually a 'longtext'. I'm very sorry for the misinformation. To the obvious question: yes, this makes the difference. If it's 'text', no problem, longtext = segfault. Again, I'm sorry. Yes, I can repro via the CLI. Would you like a backtrace of that? CREATE TABLE `article` ( `articleId` int(10) unsigned NOT NULL auto_increment, `parentId` int(10) unsigned NOT NULL default '0', `templateId` int(10) unsigned NOT NULL default '0', `title` varchar(100) NOT NULL default '', `subTitle` varchar(255) default NULL, `text` longtext NOT NULL, `creationTime` timestamp NULL default NULL, `modificationTime` timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `state` enum('Online','Offline') NOT NULL default 'Online', `audience` enum('Private','Public') NOT NULL default 'Private', `childSortOrder` enum ('Title','Date','Popularity','Arbitrary') NOT NULL default 'Title', `sortWeight` int(11) NOT NULL default '0', PRIMARY KEY (`articleId`), KEY `parent
#34623 [Opn]: Segfault when selecting 'longtext' field with pdo/mysql
ID: 34623 User updated by: stewey at ambitious dot ca -Summary: Segfault when selecting 'text' field with pdo/mysql Reported By: stewey at ambitious dot ca Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5CVS-2005-09-27 (snap) New Comment: Changing summary to read 'longtext'. Previous Comments: [2005-09-28 23:11:46] stewey at ambitious dot ca It's actually a 'longtext'. I'm very sorry for the misinformation. To the obvious question: yes, this makes the difference. If it's 'text', no problem, longtext = segfault. Again, I'm sorry. Yes, I can repro via the CLI. Would you like a backtrace of that? CREATE TABLE `article` ( `articleId` int(10) unsigned NOT NULL auto_increment, `parentId` int(10) unsigned NOT NULL default '0', `templateId` int(10) unsigned NOT NULL default '0', `title` varchar(100) NOT NULL default '', `subTitle` varchar(255) default NULL, `text` longtext NOT NULL, `creationTime` timestamp NULL default NULL, `modificationTime` timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `state` enum('Online','Offline') NOT NULL default 'Online', `audience` enum('Private','Public') NOT NULL default 'Private', `childSortOrder` enum ('Title','Date','Popularity','Arbitrary') NOT NULL default 'Title', `sortWeight` int(11) NOT NULL default '0', PRIMARY KEY (`articleId`), KEY `parentId` (`parentId`,`templateId`), FULLTEXT KEY `title` (`title`,`subTitle`,`text`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; [2005-09-28 22:03:52] [EMAIL PROTECTED] Can't reproduce. Please show your CREATE TABLE command. Also, are you able to replicate it using PHP CLI ? [2005-09-28 17:20:35] stewey at ambitious dot ca $ ./configure --with-apxs2=/usr/local/apache2/bin/apxs -- with-mysql=/usr/local/mysql --enable-pdo --prefix=/usr/ local/php5 --with-xmlrpc --with-pdo-mysql --enable-debug $ make $ make install Hope that helps! ---------------- [2005-09-28 13:03:04] [EMAIL PROTECTED] How did you compile/configure PHP? [2005-09-28 00:20:29] stewey at ambitious dot ca Bug has resurfaced. Tested with php5-200509271430. Reproduce code is the same as before. [Tue Sep 27 15:15:31 2005] [notice] child pid 15934 exit signal Segmentation fault (11) Here is the backtrace: (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X Reading symbols for shared libraries .+++ done Reading symbols for shared libraries done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x7269748d 0x020a1504 in dispatch_param_event (stmt=0x49ac08, event_type=PDO_PARAM_EVT_FETCH_POST) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:133 133 if (!stmt->methods->param_hook) { (gdb) bt #0 0x020a1504 in dispatch_param_event (stmt=0x49ac08, event_type=PDO_PARAM_EVT_FETCH_POST) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:133 #1 0x020a26b4 in do_fetch_common (stmt=0x49ac08, ori=PDO_FETCH_ORI_NEXT, offset=0, do_bind=1) at /Users/ stewey/Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:542 #2 0x020a36d8 in do_fetch (stmt=0x49ac08, do_bind=1, return_value=0x49fb78, how=PDO_FETCH_ASSOC, ori=PDO_FETCH_ORI_NEXT, offset=0, return_all=0x0) at /Users/ stewey/Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:754 #3 0x020a56e8 in zif_PDOStatement_fetchAll (ht=1, return_value=0x49bba8, return_value_ptr=0x0, this_ptr=0x49a7e8, return_value_used=1) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:1348 #4 0x0232daac in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffe578) at /Users/stewey/Desktop/ php5-200509271430/Zend/zend_vm_execute.h:187 #5 0x0232eca4 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfffe578) at /Users/stewey/Desktop/ php5-200509271430/Zend/zend_vm_execute.h:310 #6 0x0232d4e8 in execute (op_array=0x499678) at /Users/ stewey/Desktop/php5-200509271430/Zend/zend_vm_execute.h:88 #7 0x022ed6b0 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /Users/stewey/Desktop/php5-200509271430/ Zend/zend.c:1087 #8 0x02282420 in php_execute_script (primary_file=0xbfffef44) at /Users/stewey/Desktop/ php5-200509271430/main/main.c:1677 #9 0x023a2840 in php_handler (r=0x18bde50) at /Users/ stewey/Desktop/php5-200509271430/sapi/apache2handler/ sapi_apache2.c:568 #
#34623 [Fbk->Opn]: Segfault when selecting 'text' field with pdo/mysql
ID: 34623 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca -Status: Feedback +Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5CVS-2005-09-27 (snap) New Comment: It's actually a 'longtext'. I'm very sorry for the misinformation. To the obvious question: yes, this makes the difference. If it's 'text', no problem, longtext = segfault. Again, I'm sorry. Yes, I can repro via the CLI. Would you like a backtrace of that? CREATE TABLE `article` ( `articleId` int(10) unsigned NOT NULL auto_increment, `parentId` int(10) unsigned NOT NULL default '0', `templateId` int(10) unsigned NOT NULL default '0', `title` varchar(100) NOT NULL default '', `subTitle` varchar(255) default NULL, `text` longtext NOT NULL, `creationTime` timestamp NULL default NULL, `modificationTime` timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `state` enum('Online','Offline') NOT NULL default 'Online', `audience` enum('Private','Public') NOT NULL default 'Private', `childSortOrder` enum ('Title','Date','Popularity','Arbitrary') NOT NULL default 'Title', `sortWeight` int(11) NOT NULL default '0', PRIMARY KEY (`articleId`), KEY `parentId` (`parentId`,`templateId`), FULLTEXT KEY `title` (`title`,`subTitle`,`text`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; Previous Comments: [2005-09-28 22:03:52] [EMAIL PROTECTED] Can't reproduce. Please show your CREATE TABLE command. Also, are you able to replicate it using PHP CLI ? [2005-09-28 17:20:35] stewey at ambitious dot ca $ ./configure --with-apxs2=/usr/local/apache2/bin/apxs -- with-mysql=/usr/local/mysql --enable-pdo --prefix=/usr/ local/php5 --with-xmlrpc --with-pdo-mysql --enable-debug $ make $ make install Hope that helps! -------- [2005-09-28 13:03:04] [EMAIL PROTECTED] How did you compile/configure PHP? [2005-09-28 00:20:29] stewey at ambitious dot ca Bug has resurfaced. Tested with php5-200509271430. Reproduce code is the same as before. [Tue Sep 27 15:15:31 2005] [notice] child pid 15934 exit signal Segmentation fault (11) Here is the backtrace: (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X Reading symbols for shared libraries .+++ done Reading symbols for shared libraries done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x7269748d 0x020a1504 in dispatch_param_event (stmt=0x49ac08, event_type=PDO_PARAM_EVT_FETCH_POST) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:133 133 if (!stmt->methods->param_hook) { (gdb) bt #0 0x020a1504 in dispatch_param_event (stmt=0x49ac08, event_type=PDO_PARAM_EVT_FETCH_POST) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:133 #1 0x020a26b4 in do_fetch_common (stmt=0x49ac08, ori=PDO_FETCH_ORI_NEXT, offset=0, do_bind=1) at /Users/ stewey/Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:542 #2 0x020a36d8 in do_fetch (stmt=0x49ac08, do_bind=1, return_value=0x49fb78, how=PDO_FETCH_ASSOC, ori=PDO_FETCH_ORI_NEXT, offset=0, return_all=0x0) at /Users/ stewey/Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:754 #3 0x020a56e8 in zif_PDOStatement_fetchAll (ht=1, return_value=0x49bba8, return_value_ptr=0x0, this_ptr=0x49a7e8, return_value_used=1) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:1348 #4 0x0232daac in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffe578) at /Users/stewey/Desktop/ php5-200509271430/Zend/zend_vm_execute.h:187 #5 0x0232eca4 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfffe578) at /Users/stewey/Desktop/ php5-200509271430/Zend/zend_vm_execute.h:310 #6 0x0232d4e8 in execute (op_array=0x499678) at /Users/ stewey/Desktop/php5-200509271430/Zend/zend_vm_execute.h:88 #7 0x022ed6b0 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /Users/stewey/Desktop/php5-200509271430/ Zend/zend.c:1087 #8 0x02282420 in php_execute_script (primary_file=0xbfffef44) at /Users/stewey/Desktop/ php5-200509271430/main/main.c:1677 #9 0x023a2840 in php_handler (r=0x18bde50) at /Users/ stewey/Desktop/php5-200509271430/sapi/apache2handler/ sapi_apache2.c:568 #10 0x0003daf4 in ap_run_handler (r=0x18bde50) at config.c: 152 #11 0x0003e0bc in ap_invoke_handler (r=0x18bde50) at config.c:364 #12 0x0001203c in ap_process_request (r=0x18bde50) at http_request.c:249 #13 0xcc14 in ap_process_http_connect
#34623 [Fbk->Opn]: Segfault when selecting 'text' field with pdo/mysql
ID: 34623 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca -Status: Feedback +Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5CVS-2005-09-27 (snap) New Comment: $ ./configure --with-apxs2=/usr/local/apache2/bin/apxs -- with-mysql=/usr/local/mysql --enable-pdo --prefix=/usr/ local/php5 --with-xmlrpc --with-pdo-mysql --enable-debug $ make $ make install Hope that helps! Previous Comments: [2005-09-28 13:03:04] [EMAIL PROTECTED] How did you compile/configure PHP? [2005-09-28 00:20:29] stewey at ambitious dot ca Bug has resurfaced. Tested with php5-200509271430. Reproduce code is the same as before. [Tue Sep 27 15:15:31 2005] [notice] child pid 15934 exit signal Segmentation fault (11) Here is the backtrace: (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X Reading symbols for shared libraries .+++ done Reading symbols for shared libraries done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x7269748d 0x020a1504 in dispatch_param_event (stmt=0x49ac08, event_type=PDO_PARAM_EVT_FETCH_POST) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:133 133 if (!stmt->methods->param_hook) { (gdb) bt #0 0x020a1504 in dispatch_param_event (stmt=0x49ac08, event_type=PDO_PARAM_EVT_FETCH_POST) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:133 #1 0x020a26b4 in do_fetch_common (stmt=0x49ac08, ori=PDO_FETCH_ORI_NEXT, offset=0, do_bind=1) at /Users/ stewey/Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:542 #2 0x020a36d8 in do_fetch (stmt=0x49ac08, do_bind=1, return_value=0x49fb78, how=PDO_FETCH_ASSOC, ori=PDO_FETCH_ORI_NEXT, offset=0, return_all=0x0) at /Users/ stewey/Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:754 #3 0x020a56e8 in zif_PDOStatement_fetchAll (ht=1, return_value=0x49bba8, return_value_ptr=0x0, this_ptr=0x49a7e8, return_value_used=1) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:1348 #4 0x0232daac in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffe578) at /Users/stewey/Desktop/ php5-200509271430/Zend/zend_vm_execute.h:187 #5 0x0232eca4 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfffe578) at /Users/stewey/Desktop/ php5-200509271430/Zend/zend_vm_execute.h:310 #6 0x0232d4e8 in execute (op_array=0x499678) at /Users/ stewey/Desktop/php5-200509271430/Zend/zend_vm_execute.h:88 #7 0x022ed6b0 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /Users/stewey/Desktop/php5-200509271430/ Zend/zend.c:1087 #8 0x02282420 in php_execute_script (primary_file=0xbfffef44) at /Users/stewey/Desktop/ php5-200509271430/main/main.c:1677 #9 0x023a2840 in php_handler (r=0x18bde50) at /Users/ stewey/Desktop/php5-200509271430/sapi/apache2handler/ sapi_apache2.c:568 #10 0x0003daf4 in ap_run_handler (r=0x18bde50) at config.c: 152 #11 0x0003e0bc in ap_invoke_handler (r=0x18bde50) at config.c:364 #12 0x0001203c in ap_process_request (r=0x18bde50) at http_request.c:249 #13 0xcc14 in ap_process_http_connection (c=0x18b7f28) at http_core.c:251 #14 0x00044898 in ap_run_process_connection (c=0x18b7f28) at connection.c:43 #15 0x000298f8 in child_main (child_num_arg=4828168) at prefork.c:610 #16 0x000299dc in make_child (s=0x180ad58, slot=0) at prefork.c:650 #17 0x00029b14 in startup_children (number_to_start=5) at prefork.c:722 #18 0x00029fe0 in ap_mpm_run (_pconf=0x1806418, plog=0x5, s=0x180ad58) at prefork.c:941 #19 0x0002baf4 in main (argc=2, argv=0xbb20) at main.c: 618 [2005-09-24 06:03:28] stewey at ambitious dot ca Description: Selecting a text field using PDO and the PDO MySQL driver intermittently causes a seg fault. Occurs roughly one out of two times. If I don't select the text field, it runs fine. Possibly related to Bug #33533. Reproduce code: --- $PDO = new PDO( "mysql:dbname=test;host=127.0.0.1", 'user', 'pass' ); $statement = $PDO->prepare("select * from table"); $statement->execute(); $rows = $statement->fetchAll( PDO_FETCH_ASSOC ); print_r($rows); exit; Expected result: All columns of all rows of the table. Actual result: -- [Fri Sep 23 20:55:10 2005] [notice] child pid 12721 exit signal Segmentation fault (11) -- Edit this bug report at http://bugs.php.net/?id=34623&edit=1
#34623 [Csd->Opn]: Segfault when selecting 'text' field with pdo/mysql
ID: 34623 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca -Status: Closed +Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5.1.0RC1 New Comment: Bug has resurfaced. Tested with php5-200509271430. Reproduce code is the same as before. [Tue Sep 27 15:15:31 2005] [notice] child pid 15934 exit signal Segmentation fault (11) Here is the backtrace: (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X Reading symbols for shared libraries .+++ done Reading symbols for shared libraries done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x7269748d 0x020a1504 in dispatch_param_event (stmt=0x49ac08, event_type=PDO_PARAM_EVT_FETCH_POST) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:133 133 if (!stmt->methods->param_hook) { (gdb) bt #0 0x020a1504 in dispatch_param_event (stmt=0x49ac08, event_type=PDO_PARAM_EVT_FETCH_POST) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:133 #1 0x020a26b4 in do_fetch_common (stmt=0x49ac08, ori=PDO_FETCH_ORI_NEXT, offset=0, do_bind=1) at /Users/ stewey/Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:542 #2 0x020a36d8 in do_fetch (stmt=0x49ac08, do_bind=1, return_value=0x49fb78, how=PDO_FETCH_ASSOC, ori=PDO_FETCH_ORI_NEXT, offset=0, return_all=0x0) at /Users/ stewey/Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:754 #3 0x020a56e8 in zif_PDOStatement_fetchAll (ht=1, return_value=0x49bba8, return_value_ptr=0x0, this_ptr=0x49a7e8, return_value_used=1) at /Users/stewey/ Desktop/php5-200509271430/ext/pdo/pdo_stmt.c:1348 #4 0x0232daac in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffe578) at /Users/stewey/Desktop/ php5-200509271430/Zend/zend_vm_execute.h:187 #5 0x0232eca4 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfffe578) at /Users/stewey/Desktop/ php5-200509271430/Zend/zend_vm_execute.h:310 #6 0x0232d4e8 in execute (op_array=0x499678) at /Users/ stewey/Desktop/php5-200509271430/Zend/zend_vm_execute.h:88 #7 0x022ed6b0 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /Users/stewey/Desktop/php5-200509271430/ Zend/zend.c:1087 #8 0x02282420 in php_execute_script (primary_file=0xbfffef44) at /Users/stewey/Desktop/ php5-200509271430/main/main.c:1677 #9 0x023a2840 in php_handler (r=0x18bde50) at /Users/ stewey/Desktop/php5-200509271430/sapi/apache2handler/ sapi_apache2.c:568 #10 0x0003daf4 in ap_run_handler (r=0x18bde50) at config.c: 152 #11 0x0003e0bc in ap_invoke_handler (r=0x18bde50) at config.c:364 #12 0x0001203c in ap_process_request (r=0x18bde50) at http_request.c:249 #13 0xcc14 in ap_process_http_connection (c=0x18b7f28) at http_core.c:251 #14 0x00044898 in ap_run_process_connection (c=0x18b7f28) at connection.c:43 #15 0x000298f8 in child_main (child_num_arg=4828168) at prefork.c:610 #16 0x000299dc in make_child (s=0x180ad58, slot=0) at prefork.c:650 #17 0x00029b14 in startup_children (number_to_start=5) at prefork.c:722 #18 0x00029fe0 in ap_mpm_run (_pconf=0x1806418, plog=0x5, s=0x180ad58) at prefork.c:941 #19 0x0002baf4 in main (argc=2, argv=0xbb20) at main.c: 618 Previous Comments: [2005-09-25 00:29:21] [EMAIL PROTECTED] Marking as closed then. [2005-09-25 00:20:59] stewey at ambitious dot ca Confirmed fixed in latest! That's an amazing turn-around time. You rock! [2005-09-24 20:31:06] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2005-09-24 19:24:50] stewey at ambitious dot ca I'm not sure why there is an absolute path to my compile directory in this backtrace. Please let me know if this is indicative of a problem. (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X Reading symbols for shared libraries .+++ done Reading symbols for shared libraries done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x21007665 0x02199bf8 in _efree (ptr=0x4967d0) at /Users/stewey/ Desktop/php-5.1.0RC1/Zend/zend_alloc.c:302 302 REMOVE_POINTER_FROM_LIST(p); (gdb) bt #0 0x02199bf8 in _efree (ptr=0x4967d0) at /Users/stewey/ Desktop/php-5.1.0RC1/Zend/zend_alloc.c:302 #1 0x02064e08 in pdo_mysql_stmt_dtor (stmt=0x496380) at / Users/stewey/Desktop/php-5.1.0RC1/ext/pdo_mysql/ mysql_statement.c:62 #2 0x0205f22c in free_statement (stmt=0x496380) at /Users/ stewey/Desktop/php-5.1.0RC1/ext/pdo/pdo_stmt.c:1977 #3 0x021cba6c in zend_objects_store_del_ref (zobject=0x495800)
#34623 [Fbk->Opn]: Segfault when selecting 'text' field with pdo/mysql
ID: 34623 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca -Status: Feedback +Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5.1.0RC1 New Comment: Confirmed fixed in latest! That's an amazing turn-around time. You rock! Previous Comments: [2005-09-24 20:31:06] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2005-09-24 19:24:50] stewey at ambitious dot ca I'm not sure why there is an absolute path to my compile directory in this backtrace. Please let me know if this is indicative of a problem. (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X Reading symbols for shared libraries .+++ done Reading symbols for shared libraries done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x21007665 0x02199bf8 in _efree (ptr=0x4967d0) at /Users/stewey/ Desktop/php-5.1.0RC1/Zend/zend_alloc.c:302 302 REMOVE_POINTER_FROM_LIST(p); (gdb) bt #0 0x02199bf8 in _efree (ptr=0x4967d0) at /Users/stewey/ Desktop/php-5.1.0RC1/Zend/zend_alloc.c:302 #1 0x02064e08 in pdo_mysql_stmt_dtor (stmt=0x496380) at / Users/stewey/Desktop/php-5.1.0RC1/ext/pdo_mysql/ mysql_statement.c:62 #2 0x0205f22c in free_statement (stmt=0x496380) at /Users/ stewey/Desktop/php-5.1.0RC1/ext/pdo/pdo_stmt.c:1977 #3 0x021cba6c in zend_objects_store_del_ref (zobject=0x495800) at /Users/stewey/Desktop/php-5.1.0RC1/ Zend/zend_objects_API.c:161 #4 0x021a59d0 in _zval_ptr_dtor (zval_ptr=0x4964ec) at / Users/stewey/Desktop/php-5.1.0RC1/Zend/zend_variables.h:35 #5 0x021babd4 in zend_hash_apply_deleter (ht=0x22eb550, p=0x4964e0) at /Users/stewey/Desktop/php-5.1.0RC1/Zend/ zend_hash.c:574 #6 0x021bad98 in zend_hash_graceful_reverse_destroy (ht=0x22eb550) at /Users/stewey/Desktop/php-5.1.0RC1/Zend/ zend_hash.c:640 #7 0x021a5644 in shutdown_executor () at /Users/stewey/ Desktop/php-5.1.0RC1/Zend/zend_execute_API.c:216 #8 0x021b23cc in zend_deactivate () at /Users/stewey/ Desktop/php-5.1.0RC1/Zend/zend.c:823 #9 0x02173e20 in php_request_shutdown (dummy=0x4967d0) at / Users/stewey/Desktop/php-5.1.0RC1/main/main.c:1238 #10 0x022388c0 in php_handler (r=0x18c2fc8) at /Users/ stewey/Desktop/php-5.1.0RC1/sapi/apache2handler/ sapi_apache2.c:443 #11 0x0003daf4 in ap_run_handler (r=0x18c2fc8) at config.c: 152 #12 0x0003e0bc in ap_invoke_handler (r=0x18c2fc8) at config.c:364 #13 0x00011d28 in ap_internal_redirect (new_uri=0x4967d0 "-00-00 00:00:00", r=0x4966a0) at http_request.c:465 #14 0x00012060 in ap_process_request (r=0x18bde50) at http_request.c:262 #15 0xcc14 in ap_process_http_connection (c=0x18b7f28) at http_core.c:251 #16 0x00044898 in ap_run_process_connection (c=0x18b7f28) at connection.c:43 #17 0x000298f8 in child_main (child_num_arg=4810704) at prefork.c:610 #18 0x000299dc in make_child (s=0x180ad58, slot=0) at prefork.c:650 #19 0x00029b14 in startup_children (number_to_start=5) at prefork.c:722 #20 0x00029fe0 in ap_mpm_run (_pconf=0x1806418, plog=0x4966a0, s=0x180ad58) at prefork.c:941 #21 0x0002baf4 in main (argc=2, argv=0xbb60) at main.c: 618 [2005-09-24 11:44:48] [EMAIL PROTECTED] 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 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. ---- [2005-09-24 06:03:28] stewey at ambitious dot ca Description: Selecting a text field using PDO and the PDO MySQL driver intermittently causes a seg fault. Occurs roughly one out of two times. If I don't select the text field, it runs fine. Possibly related to Bug #33533. Reproduce code: --- $PDO = new PDO( "mysql:dbname=test;host=127.0.0.1", 'user', 'pass' ); $statement = $PDO->prepare("select * from table"); $statement->execute(); $rows = $statement->fetchAll( PDO_FETCH_ASSOC ); print_r($rows); exit; Expected result: All columns of all rows of the table. Actual result: -- [Fri Sep 23 20:55:10 2005] [notice] child pid 12721 exit signal Segmentation fault (11) -- Edit this bug report at http://bugs.php.net/?id=34623&edit=1
#34625 [Bgs->Opn]: Scrollable cursor doesn't work with MySQL
ID: 34625 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca -Status: Bogus +Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5.1.0RC1 New Comment: Thanks for the info. Constant problem resolved, but the scrollable cursor problem remains. New repro code: $PDO = new PDO( "mysql:dbname=test;host=127.0.0.1", 'user', 'pass' ); $statement = $PDO->prepare("select id from table", array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL) ); $statement->execute(); print_r($statement->fetch( PDO::FETCH_ASSOC, PDO::FETCH_ORI_ABS, 1 )); print_r($statement->fetch( PDO::FETCH_ASSOC, PDO::FETCH_ORI_ABS, 1 )); exit; Previous Comments: [2005-09-24 20:34:24] [EMAIL PROTECTED] All of those are expected behaviour. (constants are now defined as class constants) ---------------- [2005-09-24 20:28:10] stewey at ambitious dot ca With php5-200509241630, I'm seeing a new problem that prevents me from testing the previous problem: PHP Warning: PDOStatement::fetch() expects parameter 1 to be long, string given ... The reproduce code is the same as above. I'm also seeing the same error for calls to PDO::setAttribute. It seems there might be a problem with the PDO constants in this build. Suggestions? Next steps? [2005-09-24 13:36:13] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip -------------------- [2005-09-24 06:35:56] stewey at ambitious dot ca Description: Preparing a statement with the PDO_ATTR_CURSOR => PDO_CURSOR_SCROLL driver option doesn't work with MySQL. Reproduce code: --- $PDO = new PDO( "mysql:dbname=test;host=127.0.0.1", 'user', 'pass' ); $statement = $PDO->prepare("select id from table", array(PDO_ATTR_CURSOR => PDO_CURSOR_SCROLL) ); $statement->execute(); print_r($statement->fetch( PDO_FETCH_ASSOC, PDO_FETCH_ORI_ABS, 1 )); print_r($statement->fetch( PDO_FETCH_ASSOC, PDO_FETCH_ORI_ABS, 1 )); exit; Expected result: I would expect to see the same row output twice. If this is not a support driver option, then I would expect and error or exception thrown (yes, exceptions are enabled). Actual result: -- Two different rows. The PDO_FETCH_ORI_ABS arguments are seemingly ignored. -- Edit this bug report at http://bugs.php.net/?id=34625&edit=1
#34625 [Fbk->Opn]: Scrollable cursor doesn't work with MySQL
ID: 34625 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca -Status: Feedback +Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5.1.0RC1 New Comment: With php5-200509241630, I'm seeing a new problem that prevents me from testing the previous problem: PHP Warning: PDOStatement::fetch() expects parameter 1 to be long, string given ... The reproduce code is the same as above. I'm also seeing the same error for calls to PDO::setAttribute. It seems there might be a problem with the PDO constants in this build. Suggestions? Next steps? Previous Comments: [2005-09-24 13:36:13] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2005-09-24 06:35:56] stewey at ambitious dot ca Description: Preparing a statement with the PDO_ATTR_CURSOR => PDO_CURSOR_SCROLL driver option doesn't work with MySQL. Reproduce code: --- $PDO = new PDO( "mysql:dbname=test;host=127.0.0.1", 'user', 'pass' ); $statement = $PDO->prepare("select id from table", array(PDO_ATTR_CURSOR => PDO_CURSOR_SCROLL) ); $statement->execute(); print_r($statement->fetch( PDO_FETCH_ASSOC, PDO_FETCH_ORI_ABS, 1 )); print_r($statement->fetch( PDO_FETCH_ASSOC, PDO_FETCH_ORI_ABS, 1 )); exit; Expected result: I would expect to see the same row output twice. If this is not a support driver option, then I would expect and error or exception thrown (yes, exceptions are enabled). Actual result: -- Two different rows. The PDO_FETCH_ORI_ABS arguments are seemingly ignored. -- Edit this bug report at http://bugs.php.net/?id=34625&edit=1
#34626 [Csd]: Can't extend PDO because __construct is final.
ID: 34626 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca Status: Closed Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5.1.0RC1 New Comment: Confirmed fixed in latest. Yay!!! Previous Comments: [2005-09-24 11:01:44] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. [2005-09-24 07:08:33] stewey at ambitious dot ca Description: Unable to extend the PDO class because __construct is final. Reproduce code: --- class MyPDO extends PDO { function __construct($dsn, $user, $pass) { parent::__construct($dsn, $user, $pass); } } $PDO = new MyPDO($dsn, $user, $pass); Expected result: I would expect to be able to extend PDO. I realize that this is intended behavior to avoid a SEGV, but I think that there are legitimate reasons why people would want to extend PDO. Is it possible to address this a different way? Actual result: -- Fatal error: Cannot override final method PDO::__construct() in myfile on line myline -- Edit this bug report at http://bugs.php.net/?id=34626&edit=1
#34623 [Fbk->Opn]: Segfault when selecting 'text' field with pdo/mysql
ID: 34623 User updated by: stewey at ambitious dot ca Reported By: stewey at ambitious dot ca -Status: Feedback +Status: Open Bug Type: PDO related Operating System: Mac OS X 10.4.2 PHP Version: 5.1.0RC1 New Comment: I'm not sure why there is an absolute path to my compile directory in this backtrace. Please let me know if this is indicative of a problem. (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X Reading symbols for shared libraries .+++ done Reading symbols for shared libraries done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x21007665 0x02199bf8 in _efree (ptr=0x4967d0) at /Users/stewey/ Desktop/php-5.1.0RC1/Zend/zend_alloc.c:302 302 REMOVE_POINTER_FROM_LIST(p); (gdb) bt #0 0x02199bf8 in _efree (ptr=0x4967d0) at /Users/stewey/ Desktop/php-5.1.0RC1/Zend/zend_alloc.c:302 #1 0x02064e08 in pdo_mysql_stmt_dtor (stmt=0x496380) at / Users/stewey/Desktop/php-5.1.0RC1/ext/pdo_mysql/ mysql_statement.c:62 #2 0x0205f22c in free_statement (stmt=0x496380) at /Users/ stewey/Desktop/php-5.1.0RC1/ext/pdo/pdo_stmt.c:1977 #3 0x021cba6c in zend_objects_store_del_ref (zobject=0x495800) at /Users/stewey/Desktop/php-5.1.0RC1/ Zend/zend_objects_API.c:161 #4 0x021a59d0 in _zval_ptr_dtor (zval_ptr=0x4964ec) at / Users/stewey/Desktop/php-5.1.0RC1/Zend/zend_variables.h:35 #5 0x021babd4 in zend_hash_apply_deleter (ht=0x22eb550, p=0x4964e0) at /Users/stewey/Desktop/php-5.1.0RC1/Zend/ zend_hash.c:574 #6 0x021bad98 in zend_hash_graceful_reverse_destroy (ht=0x22eb550) at /Users/stewey/Desktop/php-5.1.0RC1/Zend/ zend_hash.c:640 #7 0x021a5644 in shutdown_executor () at /Users/stewey/ Desktop/php-5.1.0RC1/Zend/zend_execute_API.c:216 #8 0x021b23cc in zend_deactivate () at /Users/stewey/ Desktop/php-5.1.0RC1/Zend/zend.c:823 #9 0x02173e20 in php_request_shutdown (dummy=0x4967d0) at / Users/stewey/Desktop/php-5.1.0RC1/main/main.c:1238 #10 0x022388c0 in php_handler (r=0x18c2fc8) at /Users/ stewey/Desktop/php-5.1.0RC1/sapi/apache2handler/ sapi_apache2.c:443 #11 0x0003daf4 in ap_run_handler (r=0x18c2fc8) at config.c: 152 #12 0x0003e0bc in ap_invoke_handler (r=0x18c2fc8) at config.c:364 #13 0x00011d28 in ap_internal_redirect (new_uri=0x4967d0 "-00-00 00:00:00", r=0x4966a0) at http_request.c:465 #14 0x00012060 in ap_process_request (r=0x18bde50) at http_request.c:262 #15 0xcc14 in ap_process_http_connection (c=0x18b7f28) at http_core.c:251 #16 0x00044898 in ap_run_process_connection (c=0x18b7f28) at connection.c:43 #17 0x000298f8 in child_main (child_num_arg=4810704) at prefork.c:610 #18 0x000299dc in make_child (s=0x180ad58, slot=0) at prefork.c:650 #19 0x00029b14 in startup_children (number_to_start=5) at prefork.c:722 #20 0x00029fe0 in ap_mpm_run (_pconf=0x1806418, plog=0x4966a0, s=0x180ad58) at prefork.c:941 #21 0x0002baf4 in main (argc=2, argv=0xbb60) at main.c: 618 Previous Comments: [2005-09-24 11:44:48] [EMAIL PROTECTED] 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 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. ---- [2005-09-24 06:03:28] stewey at ambitious dot ca Description: Selecting a text field using PDO and the PDO MySQL driver intermittently causes a seg fault. Occurs roughly one out of two times. If I don't select the text field, it runs fine. Possibly related to Bug #33533. Reproduce code: --- $PDO = new PDO( "mysql:dbname=test;host=127.0.0.1", 'user', 'pass' ); $statement = $PDO->prepare("select * from table"); $statement->execute(); $rows = $statement->fetchAll( PDO_FETCH_ASSOC ); print_r($rows); exit; Expected result: All columns of all rows of the table. Actual result: -- [Fri Sep 23 20:55:10 2005] [notice] child pid 12721 exit signal Segmentation fault (11) -- Edit this bug report at http://bugs.php.net/?id=34623&edit=1
#34626 [NEW]: Can't extend PDO because __construct is final.
From: stewey at ambitious dot ca Operating system: Mac OS X 10.4.2 PHP version: 5.1.0RC1 PHP Bug Type: PDO related Bug description: Can't extend PDO because __construct is final. Description: Unable to extend the PDO class because __construct is final. Reproduce code: --- class MyPDO extends PDO { function __construct($dsn, $user, $pass) { parent::__construct($dsn, $user, $pass); } } $PDO = new MyPDO($dsn, $user, $pass); Expected result: I would expect to be able to extend PDO. I realize that this is intended behavior to avoid a SEGV, but I think that there are legitimate reasons why people would want to extend PDO. Is it possible to address this a different way? Actual result: -- Fatal error: Cannot override final method PDO::__construct() in myfile on line myline -- Edit bug report at http://bugs.php.net/?id=34626&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34626&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34626&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34626&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=34626&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=34626&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34626&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34626&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34626&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34626&r=support Expected behavior: http://bugs.php.net/fix.php?id=34626&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34626&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34626&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=34626&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34626&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=34626&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34626&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34626&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34626&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34626&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34626&r=mysqlcfg
#34625 [NEW]: Scrollable cursor doesn't work with MySQL
From: stewey at ambitious dot ca Operating system: Mac OS X 10.4.2 PHP version: 5.1.0RC1 PHP Bug Type: PDO related Bug description: Scrollable cursor doesn't work with MySQL Description: Preparing a statement with the PDO_ATTR_CURSOR => PDO_CURSOR_SCROLL driver option doesn't work with MySQL. Reproduce code: --- $PDO = new PDO( "mysql:dbname=test;host=127.0.0.1", 'user', 'pass' ); $statement = $PDO->prepare("select id from table", array(PDO_ATTR_CURSOR => PDO_CURSOR_SCROLL) ); $statement->execute(); print_r($statement->fetch( PDO_FETCH_ASSOC, PDO_FETCH_ORI_ABS, 1 )); print_r($statement->fetch( PDO_FETCH_ASSOC, PDO_FETCH_ORI_ABS, 1 )); exit; Expected result: I would expect to see the same row output twice. If this is not a support driver option, then I would expect and error or exception thrown (yes, exceptions are enabled). Actual result: -- Two different rows. The PDO_FETCH_ORI_ABS arguments are seemingly ignored. -- Edit bug report at http://bugs.php.net/?id=34625&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34625&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34625&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34625&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=34625&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=34625&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34625&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34625&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34625&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34625&r=support Expected behavior: http://bugs.php.net/fix.php?id=34625&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34625&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34625&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=34625&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34625&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=34625&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34625&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34625&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34625&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34625&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34625&r=mysqlcfg
#34623 [NEW]: Segfault when selecting 'text' field with pdo/mysql
From: stewey at ambitious dot ca Operating system: Mac OS X 10.4.2 PHP version: 5.1.0RC1 PHP Bug Type: PDO related Bug description: Segfault when selecting 'text' field with pdo/mysql Description: Selecting a text field using PDO and the PDO MySQL driver intermittently causes a seg fault. Occurs roughly one out of two times. If I don't select the text field, it runs fine. Possibly related to Bug #33533. Reproduce code: --- $PDO = new PDO( "mysql:dbname=test;host=127.0.0.1", 'user', 'pass' ); $statement = $PDO->prepare("select * from table"); $statement->execute(); $rows = $statement->fetchAll( PDO_FETCH_ASSOC ); print_r($rows); exit; Expected result: All columns of all rows of the table. Actual result: -- [Fri Sep 23 20:55:10 2005] [notice] child pid 12721 exit signal Segmentation fault (11) -- Edit bug report at http://bugs.php.net/?id=34623&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34623&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34623&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34623&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=34623&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=34623&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34623&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34623&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34623&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34623&r=support Expected behavior: http://bugs.php.net/fix.php?id=34623&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34623&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34623&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=34623&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34623&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=34623&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34623&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34623&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34623&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34623&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34623&r=mysqlcfg