Bug #64966 [Asn]: segfault in zend_do_fcall_common_helper_SPEC
Edit report at https://bugs.php.net/bug.php?id=64966edit=1 ID: 64966 User updated by:bfra...@php.net Reported by:bfra...@php.net Summary:segfault in zend_do_fcall_common_helper_SPEC Status: Assigned Type: Bug Package:Scripting Engine problem PHP Version:Irrelevant Assigned To:laruence Block user comment: N Private report: N New Comment: Your patch fixes the core dump and is cleaner, thanks! What are your thoughts on: Major Compatible Change or Simple Bug fix? http://marc.info/?l=php-internalsm=137066248125910w=2 Your phpunit test does have a warning removed from 5.4.13/5.3.23: % php test.php Warning: iterator_apply() expects at least 2 parameters, 1 given in /home/bfrance/test.php on line 6 Fatal error: Uncaught exception 'Exception' in /home/bfrance/test.php:3 Stack trace: #0 [internal function]: {closure}(4096, 'Argument 1 pass...', '/home/bfrance/t...', 6, Array) #1 /home/bfrance/test.php(6): iterator_apply('') #2 /home/bfrance/test.php(12): test('iterator_apply') #3 /home/bfrance/test.php(17): A-b() #4 {main} thrown in /home/bfrance/test.php on line 3 compared to 5.4.14/5.2.24 (with this patch): % php test.php Fatal error: Uncaught exception 'Exception' in /home/bfrance/test.php:3 Stack trace: #0 [internal function]: {closure}(4096, 'Argument 1 pass...', '/home/bfrance/t...', 6, Array) #1 /home/bfrance/test.php(6): iterator_apply(NULL) #2 /home/bfrance/test.php(12): test('iterator_apply') #3 /home/bfrance/test.php(17): A-b() #4 {main} thrown in /home/bfrance/test.php on line 3 But the bigger change is in the email thread. Previous Comments: [2013-06-08 09:19:19] larue...@php.net The following patch has been added/updated: Patch Name: bug64966.phpt Revision: 1370683159 URL: https://bugs.php.net/patch-display.php?bug=64966patch=bug64966.phptrevision=1370683159 [2013-06-08 09:19:01] larue...@php.net The following patch has been added/updated: Patch Name: bug64966.patch Revision: 1370683141 URL: https://bugs.php.net/patch-display.php?bug=64966patch=bug64966.patchrevision=1370683141 [2013-06-08 09:15:03] larue...@php.net change summary, since not reflection specific bug [2013-06-08 08:39:25] larue...@php.net here is a small reproduce script, if no segfault, run with valgrind: ?php error_reporting(E_ALL | E_STRICT); set_error_handler(function($error) { throw new Exception(); }, E_RECOVERABLE_ERROR); function test($func) { $a = $func(); return true; } class A { public function b() { test(strlen); test(iterator_apply); } } $a = new A(); $a-b(); [2013-06-08 06:37:10] larue...@php.net A more simple fix might be like: diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 02566f3..d471f39 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2327,6 +2327,8 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY) if (!RETURN_VALUE_USED(opline)) { zval_ptr_dtor(EX_T(opline- result.u.var).var.ptr); } + } else if (RETURN_VALUE_USED(opline)) { + EX_T(opline-result.u.var).var.ptr = NULL; } } else if (EX(function_state).function-type == ZEND_USER_FUNCTION) { EX(original_return_value) = EG(return_value_ptr_ptr); 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 https://bugs.php.net/bug.php?id=64966 -- Edit this bug report at https://bugs.php.net/bug.php?id=64966edit=1
Bug #64966 [Opn]: reflection_method_invokeArgs core dump
Edit report at https://bugs.php.net/bug.php?id=64966edit=1 ID: 64966 User updated by:bfra...@php.net Reported by:bfra...@php.net Summary:reflection_method_invokeArgs core dump Status: Open Type: Bug Package:Scripting Engine problem PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Just to give another update, 5.4.13 works -- 5.4.13 -- % php -dopen_basedir= /usr/local/bin/phpunit --log-junit results.xml phpIntlTest02.php PHPUnit 3.7.21 by Sebastian Bergmann. . Time: 0 seconds, Memory: 2.50Mb OK (1 test, 116 assertions) -- Where 5.4.14 fails: -- 5.4.14 -- php -dopen_basedir= /usr/local/bin/phpunit --log-junit results.xml phpIntlTest02.php PHPUnit 3.7.21 by Sebastian Bergmann. F Time: 0 seconds, Memory: 3.50Mb There was 1 failure: 1) YPHPINTLTest::test_collator_sort Wrong type of arguments Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'collator_sort_internal: unable to parse input params: U_ILLEGAL_ARGUMENT_ERROR' +'U_USING_FALLBACK_WARNING' /home/bfrance/php-5.4.14/ext/intl/tests/phpIntlTest02.php:33 FAILURES! Tests: 1, Assertions: 2, Failures: 1. -- So while 5.4 doesn't core dump, that patch from 63914 really changed the execution path to the point it breaks the test. Previous Comments: [2013-06-04 16:43:17] bfra...@php.net #0 _zval_ptr_dtor (zval_ptr=0x77ebfe70) at php-5.3.24/Zend/zend_execute_API.c:441 zv = 0x6 #1 0x007038a6 in zend_do_fcall_common_helper_SPEC (execute_data=0x77ebfa98) at php-5.3.24/Zend/zend_vm_execute.h:418 opline = value optimized out should_change_scope = 3 '\003' #2 0x006dc948 in execute (op_array=0xfb6510) at php-5.3.24/Zend/zend_vm_execute.h:107 ret = value optimized out execute_data = 0x77ebfa98 nested = 1 '\001' original_in_execution = 1 '\001' #3 0x006ae1b0 in zend_call_function (fci=0x7fffaaa0, fci_cache=value optimized out) at php-5.3.24/Zend/zend_execute_API.c:969 i = value optimized out original_return_value = 0x77ebdc60 calling_symbol_table = 0x0 original_op_array = 0x10f1548 original_opline_ptr = 0x77ebed68 current_scope = 0x0 current_called_scope = 0xe67b90 calling_scope = 0x115e0a8 called_scope = value optimized out current_this = 0x115e0a8 execute_data = {opline = 0x0, function_state = {function = 0xfb6510, arguments = 0x77ebfa90}, fbc = 0x0, called_scope = 0x0, op_array = 0x0, object = 0x1191d08, Ts = 0x77ebee70, CVs = 0x77ebee00, symbol_table = 0x0, prev_execute_data = 0x77ebed68, old_error_reporting = 0x0, nested = 1 '\001', original_return_value = 0x0, current_scope = 0xfb84e0, current_called_scope = 0xfb60c8, current_this = 0x1191d08, current_object = 0x0, call_opline = 0xfe1e98} #4 0x00583a8a in zim_reflection_method_invokeArgs (ht=value optimized out, return_value=0x115deb8, return_value_ptr=value optimized out, this_ptr=value optimized out, return_value_used=value optimized out) at php-5.3.24/ext/reflection/php_reflection.c:2753 retval_ptr = value optimized out params = 0x123a3a8 object = 0x1191d08 intern = 0x1166fe0 mptr = 0xfb6510 argc = 0 result = value optimized out fci = {size = 72, function_table = 0x0, function_name = 0x0, symbol_table = 0x0, retval_ptr_ptr = 0x7fffab38, param_count = 0, params = 0x123a3a8, object_ptr = 0x1191d08, no_separation = 1 '\001'} fcc = {initialized = 1 '\001', function_handler = 0xfb6510, calling_scope = 0xfb60c8, called_scope = 0xfb60c8, object_ptr = 0x1191d08} obj_ce = 0xfb60c8 param_array = 0x115de58 #5 0x00703d37 in zend_do_fcall_common_helper_SPEC (execute_data=0x77ebed68) at php-5.3.24/Zend/zend_vm_execute.h:322 opline = value optimized out should_change_scope = 1 '\001' #6 0x006dc948 in execute (op_array=0x10f1548) at php-5.3.24/Zend/zend_vm_execute.h:107 ret = value optimized out execute_data = 0x77ebed68 nested = 1 '\001' original_in_execution = 0 '\000' #7 0x006b758a in zend_execute_scripts (type=8, retval=0x0, file_count=3) at php-5.3.24/Zend/zend.c:1259 files = {{gp_offset = 40, fp_offset = 0, overflow_arg_area = 0x7fffad50, reg_save_area = 0x7ffface0}} i = value optimized out file_handle = 0x7fffe160 orig_op_array = 0x0 orig_retval_ptr_ptr = 0x0 #8 0x00666ace in php_execute_script (primary_file=0x7fffe160) at php-5.3.24/main/main.c:2316 realfile = /usr/local/bin/phpunit\000\000\210\341\377\367\377\177, '\000' repeats 42
Bug #64966 [Opn]: reflection_method_invokeArgs core dump
Edit report at https://bugs.php.net/bug.php?id=64966edit=1 ID: 64966 User updated by:bfra...@php.net Reported by:bfra...@php.net Summary:reflection_method_invokeArgs core dump Status: Open Type: Bug Package:Scripting Engine problem PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Sorry, this is for work and I am pretty sure the wouldn't let me give you access to a internal machine. See if this helps: sudo pear config-set auto_discover 1 sudo pear channel-discover pear.phpunit.de sudo pear install pear.phpunit.de/PHPUnit That worked for me for two clean installs this morning (5.4.13 and 5.4.14). So I think have figured out what is happening, at least with 5.4 and why it changed. Code in question is this: http://git.php.net/?p=php-src.git;a=blob;f=Zend/zend_vm_execute.h;h=bb50b4803f7143acff1c15647f5f45807d7ced16;hb=HEAD#l525 I can't figure out how to get git to let me show 5.3.13 and 5.2.14 diff, so here is a clean diff: http://www.brianfrance.com/php/5.4.14.txt The issue in 5.4.14 is that zend_verify_arg_type is throwing an exception, this means that the real function will never be called as it is now wrapped in a: if (EXPECTED(EG(exception) == NULL)) { } In 5.4.13 there wasn't an exception check, so it would call the function regardless of the zend_verify_arg_type checks (would still have a warning printed). If this is now the normal flow, I can go back to the intl our team and tell them they need to fix there test cases (in 5.4). Granted this doesn't fix 5.3 core dump, which is what I am digging into again today. Previous Comments: [2013-06-07 15:58:24] larue...@php.net is there any chance you can give me a access to your box? I get some problems to setup the PHPUNIT here [2013-06-07 15:02:40] bfra...@php.net Just to give another update, 5.4.13 works -- 5.4.13 -- % php -dopen_basedir= /usr/local/bin/phpunit --log-junit results.xml phpIntlTest02.php PHPUnit 3.7.21 by Sebastian Bergmann. . Time: 0 seconds, Memory: 2.50Mb OK (1 test, 116 assertions) -- Where 5.4.14 fails: -- 5.4.14 -- php -dopen_basedir= /usr/local/bin/phpunit --log-junit results.xml phpIntlTest02.php PHPUnit 3.7.21 by Sebastian Bergmann. F Time: 0 seconds, Memory: 3.50Mb There was 1 failure: 1) YPHPINTLTest::test_collator_sort Wrong type of arguments Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'collator_sort_internal: unable to parse input params: U_ILLEGAL_ARGUMENT_ERROR' +'U_USING_FALLBACK_WARNING' /home/bfrance/php-5.4.14/ext/intl/tests/phpIntlTest02.php:33 FAILURES! Tests: 1, Assertions: 2, Failures: 1. -- So while 5.4 doesn't core dump, that patch from 63914 really changed the execution path to the point it breaks the test. [2013-06-04 16:43:17] bfra...@php.net #0 _zval_ptr_dtor (zval_ptr=0x77ebfe70) at php-5.3.24/Zend/zend_execute_API.c:441 zv = 0x6 #1 0x007038a6 in zend_do_fcall_common_helper_SPEC (execute_data=0x77ebfa98) at php-5.3.24/Zend/zend_vm_execute.h:418 opline = value optimized out should_change_scope = 3 '\003' #2 0x006dc948 in execute (op_array=0xfb6510) at php-5.3.24/Zend/zend_vm_execute.h:107 ret = value optimized out execute_data = 0x77ebfa98 nested = 1 '\001' original_in_execution = 1 '\001' #3 0x006ae1b0 in zend_call_function (fci=0x7fffaaa0, fci_cache=value optimized out) at php-5.3.24/Zend/zend_execute_API.c:969 i = value optimized out original_return_value = 0x77ebdc60 calling_symbol_table = 0x0 original_op_array = 0x10f1548 original_opline_ptr = 0x77ebed68 current_scope = 0x0 current_called_scope = 0xe67b90 calling_scope = 0x115e0a8 called_scope = value optimized out current_this = 0x115e0a8 execute_data = {opline = 0x0, function_state = {function = 0xfb6510, arguments = 0x77ebfa90}, fbc = 0x0, called_scope = 0x0, op_array = 0x0, object = 0x1191d08, Ts = 0x77ebee70, CVs = 0x77ebee00, symbol_table = 0x0, prev_execute_data = 0x77ebed68, old_error_reporting = 0x0, nested = 1 '\001', original_return_value = 0x0, current_scope = 0xfb84e0, current_called_scope = 0xfb60c8, current_this = 0x1191d08, current_object = 0x0, call_opline = 0xfe1e98} #4 0x00583a8a in zim_reflection_method_invokeArgs (ht=value optimized out, return_value=0x115deb8, return_value_ptr=value optimized out, this_ptr=value optimized out, return_value_used=value optimized out) at php-5.3.24/ext/reflection/php_reflection.c:2753
Bug #64966 [Opn]: reflection_method_invokeArgs core dump
Edit report at https://bugs.php.net/bug.php?id=64966edit=1 ID: 64966 User updated by:bfra...@php.net Reported by:bfra...@php.net Summary:reflection_method_invokeArgs core dump Status: Open Type: Bug Package:Scripting Engine problem PHP Version:Irrelevant Block user comment: N Private report: N New Comment: 5.3.24 is blank as it core dumps and 5.4.14 is blank because it fails. 5.3.23: ?xml version=1.0 encoding=UTF-8? testsuites testsuite name=YPHPINTLTest file=/home/bfrance/php-5.3.23/ext/intl/tests/phpIntlTest02.php tests=1 assertions=116 failures=0 errors=0 time=0.010190 testcase name=test_collator_sort class=YPHPINTLTest file=/home/bfrance/php-5.3.23/ext/intl/tests/phpIntlTest02.php line=7 assertions=116 time=0.010190/ /testsuite /testsuites and 5.4.13: ?xml version=1.0 encoding=UTF-8? testsuites testsuite name=YPHPINTLTest file=/home/bfrance/php-5.4.13/ext/intl/tests/phpIntlTest03.php tests=1 assertions=2 failures=0 errors=0 time=22.547478 testcase name=test_collator_sort class=YPHPINTLTest file=/home/bfrance/php-5.4.13/ext/intl/tests/phpIntlTest03.php line=7 assertions=2 time=22.547478/ /testsuite /testsuites I created a phpIntlTest03.php from phpIntlTest02.php that is only line 1-33, then } } ? Previous Comments: [2013-06-07 17:06:38] larue...@php.net where can I get the results.xml? [2013-06-07 16:40:04] bfra...@php.net Sorry, this is for work and I am pretty sure the wouldn't let me give you access to a internal machine. See if this helps: sudo pear config-set auto_discover 1 sudo pear channel-discover pear.phpunit.de sudo pear install pear.phpunit.de/PHPUnit That worked for me for two clean installs this morning (5.4.13 and 5.4.14). So I think have figured out what is happening, at least with 5.4 and why it changed. Code in question is this: http://git.php.net/?p=php-src.git;a=blob;f=Zend/zend_vm_execute.h;h=bb50b4803f7143acff1c15647f5f45807d7ced16;hb=HEAD#l525 I can't figure out how to get git to let me show 5.3.13 and 5.2.14 diff, so here is a clean diff: http://www.brianfrance.com/php/5.4.14.txt The issue in 5.4.14 is that zend_verify_arg_type is throwing an exception, this means that the real function will never be called as it is now wrapped in a: if (EXPECTED(EG(exception) == NULL)) { } In 5.4.13 there wasn't an exception check, so it would call the function regardless of the zend_verify_arg_type checks (would still have a warning printed). If this is now the normal flow, I can go back to the intl our team and tell them they need to fix there test cases (in 5.4). Granted this doesn't fix 5.3 core dump, which is what I am digging into again today. [2013-06-07 15:58:24] larue...@php.net is there any chance you can give me a access to your box? I get some problems to setup the PHPUNIT here [2013-06-07 15:02:40] bfra...@php.net Just to give another update, 5.4.13 works -- 5.4.13 -- % php -dopen_basedir= /usr/local/bin/phpunit --log-junit results.xml phpIntlTest02.php PHPUnit 3.7.21 by Sebastian Bergmann. . Time: 0 seconds, Memory: 2.50Mb OK (1 test, 116 assertions) -- Where 5.4.14 fails: -- 5.4.14 -- php -dopen_basedir= /usr/local/bin/phpunit --log-junit results.xml phpIntlTest02.php PHPUnit 3.7.21 by Sebastian Bergmann. F Time: 0 seconds, Memory: 3.50Mb There was 1 failure: 1) YPHPINTLTest::test_collator_sort Wrong type of arguments Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'collator_sort_internal: unable to parse input params: U_ILLEGAL_ARGUMENT_ERROR' +'U_USING_FALLBACK_WARNING' /home/bfrance/php-5.4.14/ext/intl/tests/phpIntlTest02.php:33 FAILURES! Tests: 1, Assertions: 2, Failures: 1. -- So while 5.4 doesn't core dump, that patch from 63914 really changed the execution path to the point it breaks the test. [2013-06-04 16:43:17] bfra...@php.net #0 _zval_ptr_dtor (zval_ptr=0x77ebfe70) at php-5.3.24/Zend/zend_execute_API.c:441 zv = 0x6 #1 0x007038a6 in zend_do_fcall_common_helper_SPEC (execute_data=0x77ebfa98) at php-5.3.24/Zend/zend_vm_execute.h:418 opline = value optimized out should_change_scope = 3 '\003' #2 0x006dc948 in execute (op_array=0xfb6510) at php-5.3.24/Zend/zend_vm_execute.h:107 ret = value optimized out execute_data = 0x77ebfa98 nested = 1 '\001' original_in_execution = 1 '\001' #3 0x006ae1b0 in zend_call_function (fci=0x7fffaaa0, fci_cache=value optimized
Bug #64966 [Opn]: reflection_method_invokeArgs core dump
Edit report at https://bugs.php.net/bug.php?id=64966edit=1 ID: 64966 User updated by:bfra...@php.net Reported by:bfra...@php.net Summary:reflection_method_invokeArgs core dump Status: Open Type: Bug Package:Scripting Engine problem PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Here is the patch that was applied to 5.3.23: http://www.brianfrance.com/php/5.3.24.txt If I keep this line: ALLOC_INIT_ZVAL(EX_T(opline-result.u.var).var.ptr); then the core dump goes away and a get the same test failure, like in 5.4.14+. And that can be explain by the: if (EXPECTED(EG(exception) == NULL)) { } from the comment above. I can't explain why yet, but working on seeing if I can found who uses that value or who might expect it to be allocated. Previous Comments: [2013-06-07 17:14:49] bfra...@php.net 5.3.24 is blank as it core dumps and 5.4.14 is blank because it fails. 5.3.23: ?xml version=1.0 encoding=UTF-8? testsuites testsuite name=YPHPINTLTest file=/home/bfrance/php-5.3.23/ext/intl/tests/phpIntlTest02.php tests=1 assertions=116 failures=0 errors=0 time=0.010190 testcase name=test_collator_sort class=YPHPINTLTest file=/home/bfrance/php-5.3.23/ext/intl/tests/phpIntlTest02.php line=7 assertions=116 time=0.010190/ /testsuite /testsuites and 5.4.13: ?xml version=1.0 encoding=UTF-8? testsuites testsuite name=YPHPINTLTest file=/home/bfrance/php-5.4.13/ext/intl/tests/phpIntlTest03.php tests=1 assertions=2 failures=0 errors=0 time=22.547478 testcase name=test_collator_sort class=YPHPINTLTest file=/home/bfrance/php-5.4.13/ext/intl/tests/phpIntlTest03.php line=7 assertions=2 time=22.547478/ /testsuite /testsuites I created a phpIntlTest03.php from phpIntlTest02.php that is only line 1-33, then } } ? [2013-06-07 17:06:38] larue...@php.net where can I get the results.xml? [2013-06-07 16:40:04] bfra...@php.net Sorry, this is for work and I am pretty sure the wouldn't let me give you access to a internal machine. See if this helps: sudo pear config-set auto_discover 1 sudo pear channel-discover pear.phpunit.de sudo pear install pear.phpunit.de/PHPUnit That worked for me for two clean installs this morning (5.4.13 and 5.4.14). So I think have figured out what is happening, at least with 5.4 and why it changed. Code in question is this: http://git.php.net/?p=php-src.git;a=blob;f=Zend/zend_vm_execute.h;h=bb50b4803f7143acff1c15647f5f45807d7ced16;hb=HEAD#l525 I can't figure out how to get git to let me show 5.3.13 and 5.2.14 diff, so here is a clean diff: http://www.brianfrance.com/php/5.4.14.txt The issue in 5.4.14 is that zend_verify_arg_type is throwing an exception, this means that the real function will never be called as it is now wrapped in a: if (EXPECTED(EG(exception) == NULL)) { } In 5.4.13 there wasn't an exception check, so it would call the function regardless of the zend_verify_arg_type checks (would still have a warning printed). If this is now the normal flow, I can go back to the intl our team and tell them they need to fix there test cases (in 5.4). Granted this doesn't fix 5.3 core dump, which is what I am digging into again today. [2013-06-07 15:58:24] larue...@php.net is there any chance you can give me a access to your box? I get some problems to setup the PHPUNIT here [2013-06-07 15:02:40] bfra...@php.net Just to give another update, 5.4.13 works -- 5.4.13 -- % php -dopen_basedir= /usr/local/bin/phpunit --log-junit results.xml phpIntlTest02.php PHPUnit 3.7.21 by Sebastian Bergmann. . Time: 0 seconds, Memory: 2.50Mb OK (1 test, 116 assertions) -- Where 5.4.14 fails: -- 5.4.14 -- php -dopen_basedir= /usr/local/bin/phpunit --log-junit results.xml phpIntlTest02.php PHPUnit 3.7.21 by Sebastian Bergmann. F Time: 0 seconds, Memory: 3.50Mb There was 1 failure: 1) YPHPINTLTest::test_collator_sort Wrong type of arguments Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'collator_sort_internal: unable to parse input params: U_ILLEGAL_ARGUMENT_ERROR' +'U_USING_FALLBACK_WARNING' /home/bfrance/php-5.4.14/ext/intl/tests/phpIntlTest02.php:33 FAILURES! Tests: 1, Assertions: 2, Failures: 1. -- So while 5.4 doesn't core dump, that patch from 63914 really changed the execution path to the point it breaks the test. The remainder of the comments for this report are too long. To view the rest of the comments, please
Bug #64966 [PATCH]: reflection_method_invokeArgs core dump
Edit report at https://bugs.php.net/bug.php?id=64966edit=1 ID: 64966 Patch added by: bfra...@php.net Reported by:bfra...@php.net Summary:reflection_method_invokeArgs core dump Status: Open Type: Bug Package:Scripting Engine problem PHP Version:Irrelevant Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: exception.diff Revision: 1370634825 URL: https://bugs.php.net/patch-display.php?bug=64966patch=exception.diffrevision=1370634825 Previous Comments: [2013-06-07 17:29:56] bfra...@php.net Here is the patch that was applied to 5.3.23: http://www.brianfrance.com/php/5.3.24.txt If I keep this line: ALLOC_INIT_ZVAL(EX_T(opline-result.u.var).var.ptr); then the core dump goes away and a get the same test failure, like in 5.4.14+. And that can be explain by the: if (EXPECTED(EG(exception) == NULL)) { } from the comment above. I can't explain why yet, but working on seeing if I can found who uses that value or who might expect it to be allocated. [2013-06-07 17:14:49] bfra...@php.net 5.3.24 is blank as it core dumps and 5.4.14 is blank because it fails. 5.3.23: ?xml version=1.0 encoding=UTF-8? testsuites testsuite name=YPHPINTLTest file=/home/bfrance/php-5.3.23/ext/intl/tests/phpIntlTest02.php tests=1 assertions=116 failures=0 errors=0 time=0.010190 testcase name=test_collator_sort class=YPHPINTLTest file=/home/bfrance/php-5.3.23/ext/intl/tests/phpIntlTest02.php line=7 assertions=116 time=0.010190/ /testsuite /testsuites and 5.4.13: ?xml version=1.0 encoding=UTF-8? testsuites testsuite name=YPHPINTLTest file=/home/bfrance/php-5.4.13/ext/intl/tests/phpIntlTest03.php tests=1 assertions=2 failures=0 errors=0 time=22.547478 testcase name=test_collator_sort class=YPHPINTLTest file=/home/bfrance/php-5.4.13/ext/intl/tests/phpIntlTest03.php line=7 assertions=2 time=22.547478/ /testsuite /testsuites I created a phpIntlTest03.php from phpIntlTest02.php that is only line 1-33, then } } ? [2013-06-07 17:06:38] larue...@php.net where can I get the results.xml? [2013-06-07 16:40:04] bfra...@php.net Sorry, this is for work and I am pretty sure the wouldn't let me give you access to a internal machine. See if this helps: sudo pear config-set auto_discover 1 sudo pear channel-discover pear.phpunit.de sudo pear install pear.phpunit.de/PHPUnit That worked for me for two clean installs this morning (5.4.13 and 5.4.14). So I think have figured out what is happening, at least with 5.4 and why it changed. Code in question is this: http://git.php.net/?p=php-src.git;a=blob;f=Zend/zend_vm_execute.h;h=bb50b4803f7143acff1c15647f5f45807d7ced16;hb=HEAD#l525 I can't figure out how to get git to let me show 5.3.13 and 5.2.14 diff, so here is a clean diff: http://www.brianfrance.com/php/5.4.14.txt The issue in 5.4.14 is that zend_verify_arg_type is throwing an exception, this means that the real function will never be called as it is now wrapped in a: if (EXPECTED(EG(exception) == NULL)) { } In 5.4.13 there wasn't an exception check, so it would call the function regardless of the zend_verify_arg_type checks (would still have a warning printed). If this is now the normal flow, I can go back to the intl our team and tell them they need to fix there test cases (in 5.4). Granted this doesn't fix 5.3 core dump, which is what I am digging into again today. [2013-06-07 15:58:24] larue...@php.net is there any chance you can give me a access to your box? I get some problems to setup the PHPUNIT 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 https://bugs.php.net/bug.php?id=64966 -- Edit this bug report at https://bugs.php.net/bug.php?id=64966edit=1
Bug #64966 [Opn]: reflection_method_invokeArgs core dump
Edit report at https://bugs.php.net/bug.php?id=64966edit=1 ID: 64966 User updated by:bfra...@php.net Reported by:bfra...@php.net Summary:reflection_method_invokeArgs core dump Status: Open Type: Bug Package:Scripting Engine problem PHP Version:Irrelevant Block user comment: N Private report: N New Comment: I just added a patch that make 5.3.24+ not core dump, but I want somebody to review it. http://git.php.net/?p=php-src.git;a=blob;f=Zend/zend_vm_execute.h;h=f6220b0f5305924afd7f480f321cae8075b46ab2;hb=refs/heads/PHP-5.3#l303 The issue is allocate for EX_T(opline-result.u.var).var.ptr was moved to line 316 and inside the: if (EXPECTED(EG(exception) == NULL)) { } block. The problem with this is that on line 417, it calls: zval_ptr_dtor(EX_T(opline-result.u.var).var.ptr); but without allocating it. May be the other option would be to add a else option at line 330 to either null the value or set: RETURN_VALUE_USED(opline) to false instead of true (no idea how to do that), which it currently is. Thoughts? Previous Comments: [2013-06-07 19:53:45] bfra...@php.net The following patch has been added/updated: Patch Name: exception.diff Revision: 1370634825 URL: https://bugs.php.net/patch-display.php?bug=64966patch=exception.diffrevision=1370634825 [2013-06-07 17:29:56] bfra...@php.net Here is the patch that was applied to 5.3.23: http://www.brianfrance.com/php/5.3.24.txt If I keep this line: ALLOC_INIT_ZVAL(EX_T(opline-result.u.var).var.ptr); then the core dump goes away and a get the same test failure, like in 5.4.14+. And that can be explain by the: if (EXPECTED(EG(exception) == NULL)) { } from the comment above. I can't explain why yet, but working on seeing if I can found who uses that value or who might expect it to be allocated. [2013-06-07 17:14:49] bfra...@php.net 5.3.24 is blank as it core dumps and 5.4.14 is blank because it fails. 5.3.23: ?xml version=1.0 encoding=UTF-8? testsuites testsuite name=YPHPINTLTest file=/home/bfrance/php-5.3.23/ext/intl/tests/phpIntlTest02.php tests=1 assertions=116 failures=0 errors=0 time=0.010190 testcase name=test_collator_sort class=YPHPINTLTest file=/home/bfrance/php-5.3.23/ext/intl/tests/phpIntlTest02.php line=7 assertions=116 time=0.010190/ /testsuite /testsuites and 5.4.13: ?xml version=1.0 encoding=UTF-8? testsuites testsuite name=YPHPINTLTest file=/home/bfrance/php-5.4.13/ext/intl/tests/phpIntlTest03.php tests=1 assertions=2 failures=0 errors=0 time=22.547478 testcase name=test_collator_sort class=YPHPINTLTest file=/home/bfrance/php-5.4.13/ext/intl/tests/phpIntlTest03.php line=7 assertions=2 time=22.547478/ /testsuite /testsuites I created a phpIntlTest03.php from phpIntlTest02.php that is only line 1-33, then } } ? [2013-06-07 17:06:38] larue...@php.net where can I get the results.xml? [2013-06-07 16:40:04] bfra...@php.net Sorry, this is for work and I am pretty sure the wouldn't let me give you access to a internal machine. See if this helps: sudo pear config-set auto_discover 1 sudo pear channel-discover pear.phpunit.de sudo pear install pear.phpunit.de/PHPUnit That worked for me for two clean installs this morning (5.4.13 and 5.4.14). So I think have figured out what is happening, at least with 5.4 and why it changed. Code in question is this: http://git.php.net/?p=php-src.git;a=blob;f=Zend/zend_vm_execute.h;h=bb50b4803f7143acff1c15647f5f45807d7ced16;hb=HEAD#l525 I can't figure out how to get git to let me show 5.3.13 and 5.2.14 diff, so here is a clean diff: http://www.brianfrance.com/php/5.4.14.txt The issue in 5.4.14 is that zend_verify_arg_type is throwing an exception, this means that the real function will never be called as it is now wrapped in a: if (EXPECTED(EG(exception) == NULL)) { } In 5.4.13 there wasn't an exception check, so it would call the function regardless of the zend_verify_arg_type checks (would still have a warning printed). If this is now the normal flow, I can go back to the intl our team and tell them they need to fix there test cases (in 5.4). Granted this doesn't fix 5.3 core dump, which is what I am digging into again today. 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 https://bugs.php.net/bug.php?id=64966 -- Edit this bug report at https://bugs.php.net/bug.php?id=64966edit=1
Bug #64966 [Fbk-Opn]: reflection_method_invokeArgs core dump
Edit report at https://bugs.php.net/bug.php?id=64966edit=1 ID: 64966 User updated by:bfra...@php.net Reported by:bfra...@php.net Summary:reflection_method_invokeArgs core dump -Status: Feedback +Status: Open Type: Bug Package:Scripting Engine problem PHP Version:Irrelevant Block user comment: N Private report: N New Comment: #0 _zval_ptr_dtor (zval_ptr=0x77ebfe70) at php-5.3.24/Zend/zend_execute_API.c:441 zv = 0x6 #1 0x007038a6 in zend_do_fcall_common_helper_SPEC (execute_data=0x77ebfa98) at php-5.3.24/Zend/zend_vm_execute.h:418 opline = value optimized out should_change_scope = 3 '\003' #2 0x006dc948 in execute (op_array=0xfb6510) at php-5.3.24/Zend/zend_vm_execute.h:107 ret = value optimized out execute_data = 0x77ebfa98 nested = 1 '\001' original_in_execution = 1 '\001' #3 0x006ae1b0 in zend_call_function (fci=0x7fffaaa0, fci_cache=value optimized out) at php-5.3.24/Zend/zend_execute_API.c:969 i = value optimized out original_return_value = 0x77ebdc60 calling_symbol_table = 0x0 original_op_array = 0x10f1548 original_opline_ptr = 0x77ebed68 current_scope = 0x0 current_called_scope = 0xe67b90 calling_scope = 0x115e0a8 called_scope = value optimized out current_this = 0x115e0a8 execute_data = {opline = 0x0, function_state = {function = 0xfb6510, arguments = 0x77ebfa90}, fbc = 0x0, called_scope = 0x0, op_array = 0x0, object = 0x1191d08, Ts = 0x77ebee70, CVs = 0x77ebee00, symbol_table = 0x0, prev_execute_data = 0x77ebed68, old_error_reporting = 0x0, nested = 1 '\001', original_return_value = 0x0, current_scope = 0xfb84e0, current_called_scope = 0xfb60c8, current_this = 0x1191d08, current_object = 0x0, call_opline = 0xfe1e98} #4 0x00583a8a in zim_reflection_method_invokeArgs (ht=value optimized out, return_value=0x115deb8, return_value_ptr=value optimized out, this_ptr=value optimized out, return_value_used=value optimized out) at php-5.3.24/ext/reflection/php_reflection.c:2753 retval_ptr = value optimized out params = 0x123a3a8 object = 0x1191d08 intern = 0x1166fe0 mptr = 0xfb6510 argc = 0 result = value optimized out fci = {size = 72, function_table = 0x0, function_name = 0x0, symbol_table = 0x0, retval_ptr_ptr = 0x7fffab38, param_count = 0, params = 0x123a3a8, object_ptr = 0x1191d08, no_separation = 1 '\001'} fcc = {initialized = 1 '\001', function_handler = 0xfb6510, calling_scope = 0xfb60c8, called_scope = 0xfb60c8, object_ptr = 0x1191d08} obj_ce = 0xfb60c8 param_array = 0x115de58 #5 0x00703d37 in zend_do_fcall_common_helper_SPEC (execute_data=0x77ebed68) at php-5.3.24/Zend/zend_vm_execute.h:322 opline = value optimized out should_change_scope = 1 '\001' #6 0x006dc948 in execute (op_array=0x10f1548) at php-5.3.24/Zend/zend_vm_execute.h:107 ret = value optimized out execute_data = 0x77ebed68 nested = 1 '\001' original_in_execution = 0 '\000' #7 0x006b758a in zend_execute_scripts (type=8, retval=0x0, file_count=3) at php-5.3.24/Zend/zend.c:1259 files = {{gp_offset = 40, fp_offset = 0, overflow_arg_area = 0x7fffad50, reg_save_area = 0x7ffface0}} i = value optimized out file_handle = 0x7fffe160 orig_op_array = 0x0 orig_retval_ptr_ptr = 0x0 #8 0x00666ace in php_execute_script (primary_file=0x7fffe160) at php-5.3.24/main/main.c:2316 realfile = /usr/local/bin/phpunit\000\000\210\341\377\367\377\177, '\000' repeats 42 times\340, \344\377\367\377\177\000\000p\276\377\377\377\177\000\000\000\000\000\000\000\000\000\000Xù\364\377\177\000\000\230\331\374\367\377\177\000\000\000\000\000\000\000\000\000\000\377\377\377\377, '\000' repeats 12 times, \001\000\000\000\000\000\000\000p^\317, '\000' repeats 13 times\213, \322\321\000\000\000\000\000\r, '\000' repeats 15 times, ï\336\367\377\177\000\000\001, '\000' repeats 23 times, Xù\364\377\177\000\000\210\343\271\364\377\177\000\000\270\356\317\000\000\000\000\000@\317\377\377\377\177\000\000p\374\317\000\000\000\000\000\r\000\000\000\000\000\000\000\225\026\337\367\377\177\000\000\002\000\000\000\000\000\000\000`\201\322\000\000\000\000\000\034\000\000\000\000\000\000\000\200\355\206\353\326O9\253\200g\362\364\377\177\000\000\000\000\000\000\000\000\000\000\200g\362\364\377\177... __orig_bailout = 0x7fffdff0 __bailout = {{__jmpbuf = {15446400, 1175243881897479723, 140737488348848, 0, 140737488348136, 0, 1175243883034136107, -1175244725073261013}, __mask_was_saved = 0, __saved_mask = {__val
[PHP-BUG] Bug #64966 [NEW]: reflection_method_invokeArgs core dump
From: bfra...@php.net Operating system: PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Bug Bug description:reflection_method_invokeArgs core dump Description: I don't think this is reflection related, as the issue started with this Exception patch: zend_do_fcall_common_helper_SPEC does not handle exceptions properly https://bugs.php.net/bug.php?id=63914 but have do not have a good way to describe this bug, so I used the backtrace info. 5.3.24+ : core dumps 5.4.15+ : doesn't execute the code right (same with 5.5.0RC2) Build and install either version of php with pear and intl support. You will need icu installed (pkg: icu, libicu, libicu-devel) for intl support. Install phpunit: pear config-set auto_discover 1 pear install pear.phpunit.de/PHPUnit cd php-5.x.x/ext/intl/tests setup env: % export TZ=US/Pacific % export LANG=en_US.UTF-8 % export LC_ALL= Copy test case: curl -O http://www.brianfrance.com/php/phpIntlTest02.txt mv phpIntlTest02.txt phpIntlTest02.php php -dopen_basedir= /usr/local/bin/phpunit --log-junit results.xml phoIntlTest02.php For 5.3.24+ you will get a core dump with the following backtrace: #0 _zval_ptr_dtor (zval_ptr=0x77ebfe70) at php-5.3.24/Zend/zend_execute_API.c:441 #1 0x007038a6 in zend_do_fcall_common_helper_SPEC (execute_data=0x77ebfa98) at php-5.3.24/Zend/zend_vm_execute.h:418 #2 0x006dc948 in execute (op_array=0xfb6508) at php-5.3.24/Zend/zend_vm_execute.h:107 #3 0x006ae1b0 in zend_call_function (fci=0x7fffaab0, fci_cache=value optimized out) at php-5.3.24/Zend/zend_execute_API.c:969 #4 0x00583a8a in zim_reflection_method_invokeArgs (ht=value optimized out, return_value=0x115dab0, return_value_ptr=value optimized out, this_ptr=value optimized out, return_value_used=value optimized out) at php-5.3.24/ext/reflection/php_reflection.c:2753 #5 0x00703d37 in zend_do_fcall_common_helper_SPEC (execute_data=0x77ebed68) at php-5.3.24/Zend/zend_vm_execute.h:322 #6 0x006dc948 in execute (op_array=0x10f0d48) at php-5.3.24/Zend/zend_vm_execute.h:107 #7 0x006b758a in zend_execute_scripts (type=8, retval=0x0, file_count=3) at php-5.3.24/Zend/zend.c:1259 #8 0x00666ace in php_execute_script (primary_file=0x7fffe170) at php-5.3.24/main/main.c:2316 #9 0x0073de34 in main (argc=6, argv=0x7fffe3e8) at php-5.3.24/sapi/cli/php_cli.c:1189 For 5.4.15+ you get a weird code execution happening. collator_sort is never called on line 17. You can test this by gdb'ing and setting a break point on zif_collator_sort, it will never hit. It is like something triggered the exception before collator_sort is called. This means that callator_sort didn't setup intl_get_error_message() error message about the bad param, so then the test fails on line 33. This test works with 5.3.23 with no core dump and works with 5.3.24 if you revert the bug #63914 patch. Test script: --- http://www.brianfrance.com/php/phpIntlTest02.txt -- Edit bug report at https://bugs.php.net/bug.php?id=64966edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64966r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64966r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64966r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64966r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64966r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64966r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64966r=needscript Try newer version: https://bugs.php.net/fix.php?id=64966r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=64966r=support Expected behavior: https://bugs.php.net/fix.php?id=64966r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64966r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64966r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64966r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64966r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64966r=dst IIS Stability: https://bugs.php.net/fix.php?id=64966r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=64966r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64966r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64966r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64966r=mysqlcfg
[PHP-BUG] Bug #60860 [NEW]: session.save_handler=user without defined function core dumps
From: Operating system: Fedora, RHEL, OS X PHP version: 5.3.9 Package: Session related Bug Type: Bug Bug description:session.save_handler=user without defined function core dumps Description: The following script will core dump because the save_handlers have not been defined, but the session extension is not checking to make sure the functions are not null before trying to call them. I would expect an error, but not a core dump. I think the fix would be in mod_user.c to add a check in PS_OPEN_FUNC, PS_CLOSE_FUNC, PS_READ_FUNC, PS_WRITE_FUNC, PS_DESTROY_FUNC, PS_GC_FUNC with something like this: if (PSF(open) == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, user session handler open not found); return FAILURE; } Or maybe the error User session functions not configured or something. The problem I have with the patch is that it needs TSRMLS_CC, which the PS function don't pass in and I don't know enough about the threading stuff to fix. Test script: --- % php -d session.save_handler=user ?PHP session_start(); var_dump($_SESSION); ? Expected result: Expecting a warning about how the user session function are not defined/set. Actual result: -- This is a backtrace from running under Apache 2.x #0 zend_is_callable_ex (callable=0x0, object_ptr=0x0, check_flags=8, callable_name=0xaf48, callable_name_len=0xae8c, fcc=0xaf50, error=0xaf4c) at php-5.3.9/Zend/zend_API.c:2718 #1 0xf72e150a in zend_call_function (fci=0xaff0, fci_cache=0xaf50) at php-5.3.9/Zend/zend_execute_API.c:817 #2 0xf72e21c1 in call_user_function_ex (function_table=0x81f43f8, object_pp=0x0, function_name=0xaf4c, retval_ptr_ptr=0xaf4c, param_count=4294946636, params=0xaf4c, no_separation=-20660, symbol_table=0xaf4c) at php-5.3.9/Zend/zend_execute_API.c:758 #3 0xf72e2235 in call_user_function (function_table=0x81f43f8, object_pp=0x0, function_name=0x0, retval_ptr=0xf6cc7d10, param_count=2, params=0xb0c0) at php-5.3.9/Zend/zend_execute_API.c:731 #4 0xf6a35fcf in ps_call_handler (func=0x0, argc=2, argv=0xb0c0) at php-5.3.9/ext/session/mod_user.c:53 #5 0xf6a360e7 in ps_open_user (mod_data=0xaf4c, save_path=0xf6a36a49 , session_name=0xf6a3675f YBY) at php-5.3.9/ext/session/mod_user.c:93 #6 0xf6a32951 in php_session_start () at php-5.3.9/ext/session/session.c:512 #7 0xf6a34784 in zif_session_start (ht=0, return_value=0xf6cc7b00, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at php-5.3.9/ext/session/session.c:1911 #8 0xf7315474 in zend_do_fcall_common_helper_SPEC (execute_data=0xf654f028) at php-5.3.9/Zend/zend_vm_execute.h:320 #9 0xf73144ba in execute (op_array=0xf6cc7a1c) at php-5.3.9/Zend/zend_vm_execute.h:107 #10 0xf72f0e31 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at php-5.3.9/Zend/zend.c:1237 #11 0xf7294be4 in php_execute_script (primary_file=0xd5d0) at php-5.3.9/main/main.c:2343 #12 0xf737ae3d in php_handler (r=0x82c6588) at php-5.3.9/sapi/apache2handler/sapi_apache2.c:685 #13 0x08074ddd in ap_run_handler (r=0x82c6588) at config.c:157 #14 0x080751c1 in ap_invoke_handler (r=0x82c6588) at config.c:376 #15 0x08081d22 in ap_process_request (r=0x82c6588) at http_request.c:282 #16 0x0807f31a in ap_process_http_connection (c=0x82c23b8) at http_core.c:190 #17 0x0807b971 in ap_run_process_connection (c=0x82c23b8) at connection.c:43 #18 0x080868b7 in child_main (child_num_arg=Variable child_num_arg is not available. ) at prefork.c:667 #19 0x08086ab1 in make_child (s=0x80aafd0, slot=0) at prefork.c:712 #20 0x08087153 in ap_mpm_run (_pconf=0x80a90d8, plog=0x80d7190, s=0x80aafd0) at prefork.c:990 #21 0x08063047 in main (argc=2, argv=0xdb74) at main.c:739 -- Edit bug report at https://bugs.php.net/bug.php?id=60860edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60860r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60860r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60860r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60860r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60860r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60860r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60860r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60860r=needscript Try newer version: https://bugs.php.net/fix.php?id=60860r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60860r=support Expected behavior: https://bugs.php.net/fix.php?id=60860r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60860r=notenoughinfo Submitted twice:
Bug #50976 [Com]: Soap headers Authorization not allowed
Edit report at http://bugs.php.net/bug.php?id=50976edit=1 ID: 50976 Comment by: bfra...@php.net Reported by: bfra...@php.net Summary: Soap headers Authorization not allowed Status: Assigned Type:Bug Package: SOAP related PHP Version: 5.3.1 Assigned To: dmitry New Comment: I am removing oauthsoapsample.php.txt as there was bad code in that and mail asked me to remove it. I have added: http://www.brianfrance.com/software/php/soap_http_headers/phpsample.zip which has multiple scripts that show the problem. Previous Comments: [2010-02-09 17:08:24] bfra...@php.net Description: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/soap/php_http.c?r1=266886r2=266885pathrev=266886 This patch adds support to add headers into the http context, but doesn't allow the Authorization header for some reason. I added a patch to our 5.2 build that would add all headers in the http context and remove that patch in 5.3 because I noticed the above patch. Somebody at work is needing to add Authorization header to get OAuth stuff working, but for some reason it is not allowed. Here is a patch that will allow the Authorization header: http://www.brianfrance.com/software/php/soap_http_headers/soap_http_headers.diff Reproduce code: --- Here is an example script that requires the Authorization when used for the OAuth stuff. http://www.brianfrance.com/software/php/soap_http_headers/oauthsoapsample.php.txt -- Edit this bug report at http://bugs.php.net/bug.php?id=50976edit=1
#51063 [NEW]: Add getimagesizefromstring
From: bfra...@php.net Operating system: PHP version: 5.3.1 PHP Bug Type: Feature/Change Request Bug description: Add getimagesizefromstring Description: It would be nice to be able to pass in a string to getimagesize. Here is a patch that takes the original getimagesize function and turns it into php_getimagesize_from_stream. Then getimagesize and a new function getimagesizefromstring can use the function once a stream is created. http://www.brianfrance.com/software/php/getimagesizefromstring.diff Reproduce code: --- ?PHP $img = 'test.gif'; var_dump(getimagesize($img)); $data = file_get_contents($img); var_dump(getimagesizefromstring($data)); ? -- Edit bug report at http://bugs.php.net/?id=51063edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51063r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51063r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51063r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51063r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51063r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51063r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51063r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51063r=needscript Try newer version: http://bugs.php.net/fix.php?id=51063r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51063r=support Expected behavior: http://bugs.php.net/fix.php?id=51063r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51063r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51063r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51063r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51063r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=51063r=dst IIS Stability: http://bugs.php.net/fix.php?id=51063r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51063r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51063r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51063r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51063r=mysqlcfg
#51063 [Opn]: Add getimagesizefromstring
ID: 51063 User updated by: bfra...@php.net Reported By: bfra...@php.net Status: Open Bug Type:Feature/Change Request PHP Version: 5.3.1 New Comment: Here is a test for the new function: http://www.brianfrance.com/software/php/getimagesizefromstring/001.phpt and the required test.gif (php logo image): http://static.php.net/www.php.net/images/php.gif Previous Comments: [2010-02-16 21:54:26] bfra...@php.net Description: It would be nice to be able to pass in a string to getimagesize. Here is a patch that takes the original getimagesize function and turns it into php_getimagesize_from_stream. Then getimagesize and a new function getimagesizefromstring can use the function once a stream is created. http://www.brianfrance.com/software/php/getimagesizefromstring.diff Reproduce code: --- ?PHP $img = 'test.gif'; var_dump(getimagesize($img)); $data = file_get_contents($img); var_dump(getimagesizefromstring($data)); ? -- Edit this bug report at http://bugs.php.net/?id=51063edit=1
#50976 [NEW]: Soap headers Authorization not allowed
From: bfra...@php.net Operating system: PHP version: 5.3.1 PHP Bug Type: SOAP related Bug description: Soap headers Authorization not allowed Description: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/soap/php_http.c?r1=266886r2=266885pathrev=266886 This patch adds support to add headers into the http context, but doesn't allow the Authorization header for some reason. I added a patch to our 5.2 build that would add all headers in the http context and remove that patch in 5.3 because I noticed the above patch. Somebody at work is needing to add Authorization header to get OAuth stuff working, but for some reason it is not allowed. Here is a patch that will allow the Authorization header: http://www.brianfrance.com/software/php/soap_http_headers/soap_http_headers.diff Reproduce code: --- Here is an example script that requires the Authorization when used for the OAuth stuff. http://www.brianfrance.com/software/php/soap_http_headers/oauthsoapsample.php.txt -- Edit bug report at http://bugs.php.net/?id=50976edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50976r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50976r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50976r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50976r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50976r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50976r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50976r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50976r=needscript Try newer version: http://bugs.php.net/fix.php?id=50976r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50976r=support Expected behavior: http://bugs.php.net/fix.php?id=50976r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50976r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50976r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50976r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50976r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50976r=dst IIS Stability: http://bugs.php.net/fix.php?id=50976r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50976r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50976r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50976r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50976r=mysqlcfg
#50940 [NEW]: All Apache SAPI sets content length wrong
From: bfra...@php.net Operating system: PHP version: 5.3.1 PHP Bug Type: Apache2 related Bug description: All Apache SAPI sets content length wrong Description: The following SAPI that handle Apache are doing the content length setting wrong: apache, apache2handler, apache2filter The problems when you do: header(Content-Length: 20); the SAPI module would just set the header doing a table set on r-headers_out, but not update r-clength. Instead of doing a table set it should be calling ap_set_content_length, which sets clength and does the table set for you. I found this in Apache 2.x because we have a filter that appends data to the end of the content. It uses r-clength and updates with the additionally data value, but it doesn't work correctly if you use the above header PHP call. The following patch fixes the problem: http://www.brianfrance.com/software/php/sapi_content_length.txt Let me know if you have any questions. -- Edit bug report at http://bugs.php.net/?id=50940edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50940r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50940r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50940r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50940r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50940r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50940r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50940r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50940r=needscript Try newer version: http://bugs.php.net/fix.php?id=50940r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50940r=support Expected behavior: http://bugs.php.net/fix.php?id=50940r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50940r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50940r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50940r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50940r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50940r=dst IIS Stability: http://bugs.php.net/fix.php?id=50940r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50940r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50940r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50940r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50940r=mysqlcfg