Bug #52162 [Opn]: for NSAPI module, custom request header variables with numbers are removed
Edit report at http://bugs.php.net/bug.php?id=52162&edit=1 ID: 52162 User updated by: srina...@php.net Reported by: srina...@php.net -Summary: custom request header variables with numbers are removed +Summary: for NSAPI module, custom request header variables with numbers are removed Status: Open Type: Bug Package: iPlanet related Operating System: Linux PHP Version: 5.3.2 New Comment: mark the bug as specific to a given SAPI only. Previous Comments: [2010-06-23 20:04:46] srina...@php.net here is the suggested patch to address this issue [sn123...@mbelshe]'PHP_5_3'>svn diff sapi/nsapi/nsapi.c Index: sapi/nsapi/nsapi.c === --- sapi/nsapi/nsapi.c (revision 300702) +++ sapi/nsapi/nsapi.c (working copy) @@ -687,7 +687,7 @@ if (value) { for(p = value + pos; *p; p++) { *p = toupper(*p); - if (*p < 'A' || *p > 'Z') { + if (!isalnum(*p)) { *p = '_'; } } if no one has any issues, i can commit this patch.. -------- [2010-06-23 19:02:30] srina...@php.net Description: for example, if u try to request print-header.php (which contains the following) $v) { print " $k = $v\n"; } print "\n"; ?> by doing some thing like $ telnet localhost 80 Trying 192.168.20.126... Connected to s10u7x. Escape character is '^]'. GET /print-header.php HTTP/1.0 X-T3crawler: foobar u get output as HTTP_X_T_CRAWLER = foobar -> unexpected result what do u expect is HTTP_X_T3_CRAWLER = foobar -> expected result Expected result: HTTP_X_T3_CRAWLER = foobar -> expected result Actual result: -- u get output as HTTP_X_T_CRAWLER = foobar -> unexpected result -- Edit this bug report at http://bugs.php.net/bug.php?id=52162&edit=1
[PHP-BUG] Bug #52162 [NEW]: custom request header variables with numbers are removed
From: Operating system: Linux PHP version: 5.3.2 Package: iPlanet related Bug Type: Bug Bug description:custom request header variables with numbers are removed Description: for example, if u try to request print-header.php (which contains the following) $v) { print " $k = $v\n"; } print "\n"; ?> by doing some thing like $ telnet localhost 80 Trying 192.168.20.126... Connected to s10u7x. Escape character is '^]'. GET /print-header.php HTTP/1.0 X-T3crawler: foobar u get output as HTTP_X_T_CRAWLER = foobar -> unexpected result what do u expect is HTTP_X_T3_CRAWLER = foobar -> expected result Expected result: HTTP_X_T3_CRAWLER = foobar -> expected result Actual result: -- u get output as HTTP_X_T_CRAWLER = foobar -> unexpected result -- Edit bug report at http://bugs.php.net/bug.php?id=52162&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52162&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52162&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52162&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52162&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52162&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52162&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52162&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52162&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52162&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52162&r=support Expected behavior: http://bugs.php.net/fix.php?id=52162&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52162&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52162&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52162&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52162&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=52162&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52162&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52162&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52162&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52162&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52162&r=mysqlcfg
#50497 [NEW]: php 5.3.2 requires ANSI C99 compliant compiler
From: srina...@php.net Operating system: linux, solaris PHP version: 5.3SVN-2009-12-16 (SVN) PHP Bug Type: *Compile Issues Bug description: php 5.3.2 requires ANSI C99 compliant compiler Description: php 5.3.x requires ANSIC 99 compliant complier options. php configure options can check for this and enable this option accordingly Reproduce code: --- if we try compile php 5.3.x on gcc 2.96 or other compilers which do not enable ansi c 99 standard and its extensions by default, php build will fail. this is because php now includes such extensions internally. for example, within configure.in , we could add the following macro AC_PROG_CC_C99 to ensure that the compiler can support ansi c 99 standard. (need to check if this macro is available in autoconf 2.13 - the officially supported macro for php 5.3) Expected result: build passes successfully or fails at the configure state Actual result: -- configure passes successfully and fails while compiling some programs causing confusion to the customers -- Edit bug report at http://bugs.php.net/?id=50497&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50497&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50497&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50497&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50497&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50497&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50497&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50497&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50497&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50497&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50497&r=support Expected behavior: http://bugs.php.net/fix.php?id=50497&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50497&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50497&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50497&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50497&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50497&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50497&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50497&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50497&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50497&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50497&r=mysqlcfg
#50145 [Fbk->Opn]: crash while running bug35634.phpt
ID: 50145 User updated by: srina...@php.net Reported By: srina...@php.net -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: solaris, linux PHP Version: 5.3.1RC3 Assigned To: srinatar New Comment: looking at the source of the crash and that it happens only when used with --enable-zend-multibyte , i think, this issue has nothing to do with phar is enabled or not. (yes, it happens even if it is disabled). i think, my gut feeling it that this issue has some thing to do how to memory is allocated / reallocated when the file is being parsed with zend-multi-byte mode is enabled. just a theory at this point. i need to debug more though. any useful pointers will be much appreciated .. with respect to the platform,if you notice closely, you will notice that the bug report mentions both solaris and linux. yes, i do luv and Linux and valgrind.. unfortunately, i didn't get time to look into this last thursday and friday as I had to deal with some urgent family matters but i hope to look into this more on monday (it is still sunday for me here .. :-) ) Previous Comments: [2009-11-15 21:54:52] ka...@php.net Just wondering, does --disable-phar change anything here? How about on other systems than Solaris? [2009-11-11 08:33:23] srina...@php.net af course, this issue is not reproduced when used with USE_ZEND_ALLOC=0. this can be a temporary work around until this issue is further investigated. [2009-11-11 08:26:55] srina...@php.net Description: with recent php 5.3.1 RC3, i noticed a crash when compiled with mbstring and zend-multibyte and running the bug35634.phpt script found under Zend/tests Reproduce code: --- './configure' \ '--enable-cli' \ '--enable-mbstring' \ '--enable-zend-multibyte' while running the test script Zend/tests/bug35634.phpt __construct(); } } } else { function errorHandler($errorNumber, $errorMessage, $fileName, $lineNumber) { define("pass3", 1); include(__FILE__); die("Error: $errorMessage ($fileName:$lineNumber)\n"); } set_error_handler('errorHandler'); define("pass2", 1); include(__FILE__); } ?> Expected result: Error: Redefining already defined constructor for class TestClass (/tmp/c.php:12) Actual result: -- here is the stack trace of this crash.. @1 (l...@1) program terminated by signal SEGV (no mapping at the fault address) Current function is _zend_mm_alloc_int 1892 ZEND_MM_CHECK_BLOCK_LINKAGE(best_fit); (dbx 1) where current thread: t...@1 =>[1] _zend_mm_alloc_int(heap = 0x8b7f2f0, size = 496U), line 1892 in "zend_alloc.c" [2] _emalloc(size = 496U), line 2295 in "zend_alloc.c" [3] open_file_for_scanning(file_handle = 0x80454f8), line 272 in "zend_language_scanner.l" [4] compile_file(file_handle = 0x80454f8, type = 2), line 331 in "zend_language_scanner.l" [5] phar_compile_file(file_handle = 0x80454f8, type = 2), line 3390 in "phar.c" [6] compile_filename(type = 2, filename = 0x8b910b8), line 386 in "zend_language_scanner.l" [7] ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(execute_data = 0x8cd6560), line 1915 in "zend_vm_execute.h" [8] execute(op_array = 0x8cd4438), line 104 in "zend_vm_execute.h" [9] zend_call_function(fci = 0x80456a8, fci_cache = 0x8045608), line 942 in "zend_execute_API.c" [10] call_user_function_ex(function_table = 0x8bbf5a0, object_pp = (nil), function_name = 0x8b8db78, retval_ptr_ptr = 0x804572c, param_count = 5U, params = 0x8b906d0, no_separation = 1, symbol_table = (nil)), line 734 in "zend_execute_API.c" [11] zend_error(type = 2048, format = 0x8b145e8 "Redefining already defined constructor for class %s", ... = 0x8b8e730, ...), line 1101 in "zend.c" [12] zend_do_begin_function_declaration(function_token = 0x8045b00, function_name = 0x8045b28, is_method = 1, return_reference = 0, fn_flags_znode = 0x8045aec), line 1289 in "zend_compile.c" [13] zendparse(), line 4082 in "zend_language_parser.c" [14] compile_file(file_handle = 0x8046da8, type = 2), line 343 in "zend_language_scanner.l" [15] phar_compile_file(file_handle = 0x8046da8, type = 2), line 3390 in "phar.c" [16] compile_filename(type = 2, filename = 0x8b8e4b4), line 386 in "zend_language_scanner.l" [17] ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(execute_data = 0x8cd6440), line 1915 in "zend_vm_execute.h" [18] exec
#50145 [Fbk->Opn]: crash while running bug35634.phpt
ID: 50145 User updated by: srina...@php.net -Summary: srinatar Reported By: srina...@php.net -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: solaris, linux PHP Version: 5.3.1RC3 New Comment: updated bug summary - accidentally had my name as summary ! Previous Comments: [2009-11-11 08:52:54] j...@php.net Please fix "Summary". [2009-11-11 08:33:23] srina...@php.net af course, this issue is not reproduced when used with USE_ZEND_ALLOC=0. this can be a temporary work around until this issue is further investigated. [2009-11-11 08:26:55] srina...@php.net Description: with recent php 5.3.1 RC3, i noticed a crash when compiled with mbstring and zend-multibyte and running the bug35634.phpt script found under Zend/tests Reproduce code: --- './configure' \ '--enable-cli' \ '--enable-mbstring' \ '--enable-zend-multibyte' while running the test script Zend/tests/bug35634.phpt __construct(); } } } else { function errorHandler($errorNumber, $errorMessage, $fileName, $lineNumber) { define("pass3", 1); include(__FILE__); die("Error: $errorMessage ($fileName:$lineNumber)\n"); } set_error_handler('errorHandler'); define("pass2", 1); include(__FILE__); } ?> Expected result: Error: Redefining already defined constructor for class TestClass (/tmp/c.php:12) Actual result: -- here is the stack trace of this crash.. @1 (l...@1) program terminated by signal SEGV (no mapping at the fault address) Current function is _zend_mm_alloc_int 1892 ZEND_MM_CHECK_BLOCK_LINKAGE(best_fit); (dbx 1) where current thread: t...@1 =>[1] _zend_mm_alloc_int(heap = 0x8b7f2f0, size = 496U), line 1892 in "zend_alloc.c" [2] _emalloc(size = 496U), line 2295 in "zend_alloc.c" [3] open_file_for_scanning(file_handle = 0x80454f8), line 272 in "zend_language_scanner.l" [4] compile_file(file_handle = 0x80454f8, type = 2), line 331 in "zend_language_scanner.l" [5] phar_compile_file(file_handle = 0x80454f8, type = 2), line 3390 in "phar.c" [6] compile_filename(type = 2, filename = 0x8b910b8), line 386 in "zend_language_scanner.l" [7] ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(execute_data = 0x8cd6560), line 1915 in "zend_vm_execute.h" [8] execute(op_array = 0x8cd4438), line 104 in "zend_vm_execute.h" [9] zend_call_function(fci = 0x80456a8, fci_cache = 0x8045608), line 942 in "zend_execute_API.c" [10] call_user_function_ex(function_table = 0x8bbf5a0, object_pp = (nil), function_name = 0x8b8db78, retval_ptr_ptr = 0x804572c, param_count = 5U, params = 0x8b906d0, no_separation = 1, symbol_table = (nil)), line 734 in "zend_execute_API.c" [11] zend_error(type = 2048, format = 0x8b145e8 "Redefining already defined constructor for class %s", ... = 0x8b8e730, ...), line 1101 in "zend.c" [12] zend_do_begin_function_declaration(function_token = 0x8045b00, function_name = 0x8045b28, is_method = 1, return_reference = 0, fn_flags_znode = 0x8045aec), line 1289 in "zend_compile.c" [13] zendparse(), line 4082 in "zend_language_parser.c" [14] compile_file(file_handle = 0x8046da8, type = 2), line 343 in "zend_language_scanner.l" [15] phar_compile_file(file_handle = 0x8046da8, type = 2), line 3390 in "phar.c" [16] compile_filename(type = 2, filename = 0x8b8e4b4), line 386 in "zend_language_scanner.l" [17] ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(execute_data = 0x8cd6440), line 1915 in "zend_vm_execute.h" [18] execute(op_array = 0x8b8d970), line 104 in "zend_vm_execute.h" [19] zend_execute_scripts(type = 8, retval = (nil), file_count = 3, ... = (nil), ...), line 1194 in "zend.c" [20] php_execute_script(primary_file = 0x8047850), line 2225 in "main.c" [21] main(argc = 2, argv = 0x80478c4), line 1190 in "php_cli.c" and here looks like best_fit seems to have been corrupted.. (dbx 2) p *best_fit dbx: cannot access address 0x66690a70 (dbx 3) p *heap *heap = { use_zend_alloc = 1 _malloc= (nil) _free = (nil) _realloc = (nil) free_bitmap= 1073741824U large_free_bitmap = 133376U block_size = 262144U compact_size = 2097152U segments_list = 0x8cd6410 storage= 0x8b7eef0 real_size = 524288U real_peak = 5
#50145 [NEW]: srinatar
From: srina...@php.net Operating system: solaris, linux PHP version: 5.3.1RC3 PHP Bug Type: Reproducible crash Bug description: srinatar Description: with recent php 5.3.1 RC3, i noticed a crash when compiled with mbstring and zend-multibyte and running the bug35634.phpt script found under Zend/tests Reproduce code: --- './configure' \ '--enable-cli' \ '--enable-mbstring' \ '--enable-zend-multibyte' while running the test script Zend/tests/bug35634.phpt __construct(); } } } else { function errorHandler($errorNumber, $errorMessage, $fileName, $lineNumber) { define("pass3", 1); include(__FILE__); die("Error: $errorMessage ($fileName:$lineNumber)\n"); } set_error_handler('errorHandler'); define("pass2", 1); include(__FILE__); } ?> Expected result: Error: Redefining already defined constructor for class TestClass (/tmp/c.php:12) Actual result: -- here is the stack trace of this crash.. @1 (l...@1) program terminated by signal SEGV (no mapping at the fault address) Current function is _zend_mm_alloc_int 1892 ZEND_MM_CHECK_BLOCK_LINKAGE(best_fit); (dbx 1) where current thread: t...@1 =>[1] _zend_mm_alloc_int(heap = 0x8b7f2f0, size = 496U), line 1892 in "zend_alloc.c" [2] _emalloc(size = 496U), line 2295 in "zend_alloc.c" [3] open_file_for_scanning(file_handle = 0x80454f8), line 272 in "zend_language_scanner.l" [4] compile_file(file_handle = 0x80454f8, type = 2), line 331 in "zend_language_scanner.l" [5] phar_compile_file(file_handle = 0x80454f8, type = 2), line 3390 in "phar.c" [6] compile_filename(type = 2, filename = 0x8b910b8), line 386 in "zend_language_scanner.l" [7] ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(execute_data = 0x8cd6560), line 1915 in "zend_vm_execute.h" [8] execute(op_array = 0x8cd4438), line 104 in "zend_vm_execute.h" [9] zend_call_function(fci = 0x80456a8, fci_cache = 0x8045608), line 942 in "zend_execute_API.c" [10] call_user_function_ex(function_table = 0x8bbf5a0, object_pp = (nil), function_name = 0x8b8db78, retval_ptr_ptr = 0x804572c, param_count = 5U, params = 0x8b906d0, no_separation = 1, symbol_table = (nil)), line 734 in "zend_execute_API.c" [11] zend_error(type = 2048, format = 0x8b145e8 "Redefining already defined constructor for class %s", ... = 0x8b8e730, ...), line 1101 in "zend.c" [12] zend_do_begin_function_declaration(function_token = 0x8045b00, function_name = 0x8045b28, is_method = 1, return_reference = 0, fn_flags_znode = 0x8045aec), line 1289 in "zend_compile.c" [13] zendparse(), line 4082 in "zend_language_parser.c" [14] compile_file(file_handle = 0x8046da8, type = 2), line 343 in "zend_language_scanner.l" [15] phar_compile_file(file_handle = 0x8046da8, type = 2), line 3390 in "phar.c" [16] compile_filename(type = 2, filename = 0x8b8e4b4), line 386 in "zend_language_scanner.l" [17] ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(execute_data = 0x8cd6440), line 1915 in "zend_vm_execute.h" [18] execute(op_array = 0x8b8d970), line 104 in "zend_vm_execute.h" [19] zend_execute_scripts(type = 8, retval = (nil), file_count = 3, ... = (nil), ...), line 1194 in "zend.c" [20] php_execute_script(primary_file = 0x8047850), line 2225 in "main.c" [21] main(argc = 2, argv = 0x80478c4), line 1190 in "php_cli.c" and here looks like best_fit seems to have been corrupted.. (dbx 2) p *best_fit dbx: cannot access address 0x66690a70 (dbx 3) p *heap *heap = { use_zend_alloc = 1 _malloc= (nil) _free = (nil) _realloc = (nil) free_bitmap= 1073741824U large_free_bitmap = 133376U block_size = 262144U compact_size = 2097152U segments_list = 0x8cd6410 storage= 0x8b7eef0 real_size = 524288U real_peak = 524288U limit = 134217728U size = 341616U peak = 342120U reserve_size = 8192U reserve= 0x8b7f560 overflow = 0 internal = 0 cached = 456U cache = (0x8b90590, 0x8b90700, 0x8b90718, 0x8b90558, 0x8b90918, (nil), (nil), (nil), (nil), (nil), 0x8b8faa0, (nil), (nil), (nil), (nil), 0x8b8c1e8, (nil), (nil), (nil), (nil), (nil), (nil), (nil), (nil), (nil), (nil), (nil), (nil), (nil), (nil), (nil), (nil)) free_buckets = (0x8b7f3b8, 0x8b7f3b8, 0x8b7f3c0, 0x8b7f3c0, 0x8b7f3c8, 0x8b7f3c8, 0x8b7f3d0, 0x8b7f3d0, 0x8b7f3d8, 0x8b7f3d8, 0x8b7f3e0, 0x8b7f3e0, 0x8b7f3e8, 0x8b7f3e8, 0x8b7f3f0, 0x8b7f3f0,