[PHP-BUG] Bug #63737 [NEW]: json_decode does not properly decode with options parameter
From: google...@php.net Operating system: PHP version: 5.4.9 Package: JSON related Bug Type: Bug Bug description:json_decode does not properly decode with options parameter Description: json_decode does not properly decode JSON strings using options parameter. Test script: --- json_decode('12345678901234567890', false, 512, JSON_BIGINT_AS_STRING); // this won't work However this will json_decode('[12345678901234567890]', false, 512, JSON_BIGINT_AS_STRING); Expected result: string(20) "12345678901234567890" Actual result: -- float(1.2345678901235E+19) -- Edit bug report at https://bugs.php.net/bug.php?id=63737&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63737&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63737&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63737&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63737&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63737&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63737&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63737&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63737&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63737&r=support Expected behavior: https://bugs.php.net/fix.php?id=63737&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63737&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63737&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63737&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63737&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63737&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63737&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63737&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63737&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63737&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63737&r=mysqlcfg
Bug #63737 [Opn->Ana]: json_decode does not properly decode with options parameter
Edit report at https://bugs.php.net/bug.php?id=63737&edit=1 ID: 63737 Updated by: ahar...@php.net Reported by:google...@php.net Summary:json_decode does not properly decode with options parameter -Status: Open +Status: Analyzed Type: Bug Package:JSON related PHP Version:5.4.9 -Assigned To: +Assigned To:aharvey Block user comment: N Private report: N New Comment: Our code path for bare integer literals is different to the one we use for literals within objects and arrays. Should be an easy fix. Previous Comments: [2012-12-11 11:03:24] google...@php.net Description: json_decode does not properly decode JSON strings using options parameter. Test script: --- json_decode('12345678901234567890', false, 512, JSON_BIGINT_AS_STRING); // this won't work However this will json_decode('[12345678901234567890]', false, 512, JSON_BIGINT_AS_STRING); Expected result: string(20) "12345678901234567890" Actual result: -- float(1.2345678901235E+19) -- Edit this bug report at https://bugs.php.net/bug.php?id=63737&edit=1
Bug #63737 [Ana->Csd]: json_decode does not properly decode with options parameter
Edit report at https://bugs.php.net/bug.php?id=63737&edit=1 ID: 63737 Updated by: ahar...@php.net Reported by:google...@php.net Summary:json_decode does not properly decode with options parameter -Status: Analyzed +Status: Closed Type: Bug Package:JSON related PHP Version:5.4.9 Assigned To:aharvey Block user comment: N Private report: N New Comment: The fix for this bug has been committed. 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/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Fixed on 5.4, 5.5 and master. Previous Comments: [2012-12-11 11:04:55] ahar...@php.net Our code path for bare integer literals is different to the one we use for literals within objects and arrays. Should be an easy fix. [2012-12-11 11:03:24] google...@php.net Description: json_decode does not properly decode JSON strings using options parameter. Test script: --- json_decode('12345678901234567890', false, 512, JSON_BIGINT_AS_STRING); // this won't work However this will json_decode('[12345678901234567890]', false, 512, JSON_BIGINT_AS_STRING); Expected result: string(20) "12345678901234567890" Actual result: -- float(1.2345678901235E+19) -- Edit this bug report at https://bugs.php.net/bug.php?id=63737&edit=1
[PHP-BUG] Bug #63738 [NEW]: unpack string behavior change
From: remi Operating system: GNU/Linux (Fedora 17) PHP version: 5.5Git-2012-12-11 (snap) Package: Unknown/Other Function Bug Type: Bug Bug description:unpack string behavior change Description: Seems a regression between 5.4.9 and 5.5.0-dev This breaks Archive_Tar Test script: --- string(2) "AB" } Actual result: -- With php 5.5.0-dev: string(4) "AB^@^@" array(1) { ["foo"]=> string(4) "AB^@^@" } -- Edit bug report at https://bugs.php.net/bug.php?id=63738&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63738&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63738&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63738&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63738&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63738&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63738&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63738&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63738&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63738&r=support Expected behavior: https://bugs.php.net/fix.php?id=63738&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63738&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63738&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63738&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63738&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63738&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63738&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63738&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63738&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63738&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63738&r=mysqlcfg
Bug #63738 [Opn->Nab]: unpack string behavior change
Edit report at https://bugs.php.net/bug.php?id=63738&edit=1 ID: 63738 Updated by: r...@php.net Reported by:r...@php.net Summary:unpack string behavior change -Status: Open +Status: Not a bug Type: Bug Package:Unknown/Other Function Operating System: GNU/Linux (Fedora 17) PHP Version:5.5Git-2012-12-11 (snap) Block user comment: N Private report: N New Comment: 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 Sorry, haven't read carefully UPGRADING - pack()/unpack() had the following changes, which bring it more in line with Perl's behavior: - Implemented format character "Z": NUL-padded string - "a" now does not remove trailing NUL characters on unpack() anymore - "A" will now strip all trailing ASCII whitespace on unpack() (it used to remove only trailing spaces). Previous Comments: [2012-12-11 13:51:09] r...@php.net Description: Seems a regression between 5.4.9 and 5.5.0-dev This breaks Archive_Tar Test script: --- string(2) "AB" } Actual result: -- With php 5.5.0-dev: string(4) "AB^@^@" array(1) { ["foo"]=> string(4) "AB^@^@" } -- Edit this bug report at https://bugs.php.net/bug.php?id=63738&edit=1
Bug #63738 [Nab]: unpack string behavior change
Edit report at https://bugs.php.net/bug.php?id=63738&edit=1 ID: 63738 Updated by: ahar...@php.net Reported by:r...@php.net Summary:unpack string behavior change Status: Not a bug Type: Bug -Package:Unknown/Other Function +Package:Strings related Operating System: GNU/Linux (Fedora 17) PHP Version:5.5Git-2012-12-11 (snap) Block user comment: N Private report: N New Comment: This was intentional â specifically, it was to fix bug #61038. Copy-pasting from the migration guide (http://php.net/manual/en/migration55.changed-functions.php): "unpack()'s a format no longer strips trailing null bytes, bringing it into line with Perl's behaviour." Previous Comments: [2012-12-11 13:57:30] r...@php.net 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 Sorry, haven't read carefully UPGRADING - pack()/unpack() had the following changes, which bring it more in line with Perl's behavior: - Implemented format character "Z": NUL-padded string - "a" now does not remove trailing NUL characters on unpack() anymore - "A" will now strip all trailing ASCII whitespace on unpack() (it used to remove only trailing spaces). [2012-12-11 13:51:09] r...@php.net Description: Seems a regression between 5.4.9 and 5.5.0-dev This breaks Archive_Tar Test script: --- string(2) "AB" } Actual result: -- With php 5.5.0-dev: string(4) "AB^@^@" array(1) { ["foo"]=> string(4) "AB^@^@" } -- Edit this bug report at https://bugs.php.net/bug.php?id=63738&edit=1
Bug #63738 [Nab]: unpack string behavior change
Edit report at https://bugs.php.net/bug.php?id=63738&edit=1 ID: 63738 Updated by: ahar...@php.net Reported by:r...@php.net Summary:unpack string behavior change Status: Not a bug Type: Bug Package:Strings related Operating System: GNU/Linux (Fedora 17) PHP Version:5.5Git-2012-12-11 (snap) Block user comment: N Private report: N New Comment: Snap. :) Previous Comments: [2012-12-11 13:57:35] ahar...@php.net This was intentional â specifically, it was to fix bug #61038. Copy-pasting from the migration guide (http://php.net/manual/en/migration55.changed-functions.php): "unpack()'s a format no longer strips trailing null bytes, bringing it into line with Perl's behaviour." [2012-12-11 13:57:30] r...@php.net 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 Sorry, haven't read carefully UPGRADING - pack()/unpack() had the following changes, which bring it more in line with Perl's behavior: - Implemented format character "Z": NUL-padded string - "a" now does not remove trailing NUL characters on unpack() anymore - "A" will now strip all trailing ASCII whitespace on unpack() (it used to remove only trailing spaces). [2012-12-11 13:51:09] r...@php.net Description: Seems a regression between 5.4.9 and 5.5.0-dev This breaks Archive_Tar Test script: --- string(2) "AB" } Actual result: -- With php 5.5.0-dev: string(4) "AB^@^@" array(1) { ["foo"]=> string(4) "AB^@^@" } -- Edit this bug report at https://bugs.php.net/bug.php?id=63738&edit=1
Bug #63738 [Nab->Opn]: unpack string behavior change
Edit report at https://bugs.php.net/bug.php?id=63738&edit=1 ID: 63738 Updated by: r...@php.net Reported by:r...@php.net Summary:unpack string behavior change -Status: Not a bug +Status: Open Type: Bug Package:Strings related Operating System: GNU/Linux (Fedora 17) PHP Version:5.5Git-2012-12-11 (snap) Block user comment: N Private report: N New Comment: There still a problem with new 'z' format: php -r '$a="\x00\x00\x00\x00"; var_dump($a); var_dump(unpack("Z4foo", $a));' Actual result: string(4) "^@^@^@^@" array(1) { ["foo"]=> string(1) "^@" } When we expect: string(4) "^@^@^@^@" array(1) { ["foo"]=> string(0) "" } Previous Comments: [2012-12-11 13:58:02] ahar...@php.net Snap. :) [2012-12-11 13:57:35] ahar...@php.net This was intentional â specifically, it was to fix bug #61038. Copy-pasting from the migration guide (http://php.net/manual/en/migration55.changed-functions.php): "unpack()'s a format no longer strips trailing null bytes, bringing it into line with Perl's behaviour." [2012-12-11 13:57:30] r...@php.net 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 Sorry, haven't read carefully UPGRADING - pack()/unpack() had the following changes, which bring it more in line with Perl's behavior: - Implemented format character "Z": NUL-padded string - "a" now does not remove trailing NUL characters on unpack() anymore - "A" will now strip all trailing ASCII whitespace on unpack() (it used to remove only trailing spaces). [2012-12-11 13:51:09] r...@php.net Description: Seems a regression between 5.4.9 and 5.5.0-dev This breaks Archive_Tar Test script: --- string(2) "AB" } Actual result: -- With php 5.5.0-dev: string(4) "AB^@^@" array(1) { ["foo"]=> string(4) "AB^@^@" } -- Edit this bug report at https://bugs.php.net/bug.php?id=63738&edit=1
Bug #36103 [Com]: ftp ssl connection fails during login
Edit report at https://bugs.php.net/bug.php?id=36103&edit=1 ID: 36103 Comment by: erez dot h at zend dot com Reported by:rebe at unit01 dot net Summary:ftp ssl connection fails during login Status: No Feedback Type: Bug Package:FTP related Operating System: linux PHP Version:5.1.2 Assigned To:tony2001 Block user comment: N Private report: N New Comment: we still have this issue on windows php build 5.3.19 and 5.4.9 so we implemented this patch which solve the issue. please see if you can add to future versions. diff -ruN php-5.3.19.orig/ext/ftp/ftp.c php-5.3.19/ext/ftp/ftp.c --- php-5.3.19.orig/ext/ftp/ftp.c 2012-11-21 22:07:23.0 +0200 +++ php-5.3.19/ext/ftp/ftp.c2012-12-11 16:49:21.359682714 +0200 @@ -241,6 +241,7 @@ int ftp_login(ftpbuf_t *ftp, const char *user, const char *pass TSRMLS_DC) { + int errcode; #if HAVE_OPENSSL_EXT SSL_CTX *ctx = NULL; #endif @@ -289,13 +290,27 @@ } SSL_set_fd(ftp->ssl_handle, ftp->fd); - - if (SSL_connect(ftp->ssl_handle) <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSL/TLS handshake failed"); - SSL_shutdown(ftp->ssl_handle); - return 0; - } - + + do { + errcode = SSL_connect(ftp->ssl_handle); + switch (SSL_get_error (ftp->ssl_handle, errcode)) { + case SSL_ERROR_NONE: + errcode = 1; + break; + case SSL_ERROR_WANT_WRITE: + case SSL_ERROR_WANT_READ: + case SSL_ERROR_WANT_X509_LOOKUP: + errcode = 0; + break; + default: + /* true error happened */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSL/TLS handshake failed"); + SSL_shutdown(ftp->ssl_handle); + return 0; + break; + } + } while(errcode == 0 && !SSL_is_init_finished(ftp- >ssl_handle)); + ftp->ssl_active = 1; if (!ftp->old_ssl) { @@ -1493,6 +1508,7 @@ php_sockaddr_storage addr; socklen_t size; + int errcode; #if HAVE_OPENSSL_EXT SSL_CTX *ctx; #endif @@ -1537,11 +1553,26 @@ SSL_copy_session_id(data->ssl_handle, ftp->ssl_handle); } - if (SSL_connect(data->ssl_handle) <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "data_accept: SSL/TLS handshake failed"); - SSL_shutdown(data->ssl_handle); - return 0; - } + + do { + errcode = SSL_connect(data->ssl_handle); + switch (SSL_get_error (data->ssl_handle, errcode)) { + case SSL_ERROR_NONE: + errcode = 1; + break; + case SSL_ERROR_WANT_WRITE: + case SSL_ERROR_WANT_READ: + case SSL_ERROR_WANT_X509_LOOKUP: + errcode = 0; + break; + default: + /* true error happened */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "data_accept: SSL/TLS handshake failed"); + SSL_shutdown(data->ssl_handle); + return 0; + break; + } + } while(errcode == 0 && !SSL_is_init_finished(data- >ssl_handle)); data->ssl_active = 1; } Previous Comments: [2008-07-21 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". --
[PHP-BUG] Bug #63740 [NEW]: strtotime seems to use both sunday and monday as start of week
From: salmanarshad2000 at yahoo dot com Operating system: PHP version: 5.4.9 Package: Date/time related Bug Type: Bug Bug description:strtotime seems to use both sunday and monday as start of week Description: Weeks start on Sunday or Monday. However, in this regard: 1) strtotime behavior is not documented. 2) strtotime produces inconsistent results when "this week" is used. Sample dates from month of December 2012 used the the test script: Mon 2012-12-03 Tue 2012-12-04 Wed 2012-12-05 Thu 2012-12-06 Fri 2012-12-07 Sat 2012-12-08 Sun 2012-12-09 Mon 2012-12-10 Tue 2012-12-11 Wed 2012-12-12 Thu 2012-12-13 Fri 2012-12-14 Sat 2012-12-15 Sun 2012-12-16 Test script: --- // function strtotime called on Sun 2012-12-09 echo date("D Y-m-d", strtotime("monday this week", strtotime("2012-12-09"))); // Mon 2012-12-10 echo date("D Y-m-d", strtotime("sunday this week", strtotime("2012-12-09"))); // Sun 2012-12-16 // function strtotime called on Mon 2012-12-10 echo date("D Y-m-d", strtotime("monday this week", strtotime("2012-12-10"))); // Mon 2012-12-10 echo date("D Y-m-d", strtotime("sunday this week", strtotime("2012-12-10"))); // Sun 2012-12-16 Expected result: If Sunday is start of the week then "sunday this week" be less than "monday this week": // function strtotime called on Sun 2012-12-09 echo date("D Y-m-d", strtotime("monday this week", strtotime("2012-12-09"))); // Mon 2012-12-10 echo date("D Y-m-d", strtotime("sunday this week", strtotime("2012-12-09"))); // Sun 2012-12-09 // function strtotime called on Mon 2012-12-10 echo date("D Y-m-d", strtotime("monday this week", strtotime("2012-12-10"))); // Mon 2012-12-10 echo date("D Y-m-d", strtotime("sunday this week", strtotime("2012-12-10"))); // Sun 2012-12-09 If Monday is start of the week then "monday this week" should return different values on sunday and monday: // function strtotime called on Sun 2012-12-09 echo date("D Y-m-d", strtotime("monday this week", strtotime("2012-12-09"))); // Mon 2012-12-03 echo date("D Y-m-d", strtotime("sunday this week", strtotime("2012-12-09"))); // Sun 2012-12-09 // function strtotime called on Mon 2012-12-10 echo date("D Y-m-d", strtotime("monday this week", strtotime("2012-12-10"))); // Mon 2012-12-10 echo date("D Y-m-d", strtotime("sunday this week", strtotime("2012-12-10"))); // Sun 2012-12-16 Actual result: -- See test script, actual result is present alongside each line. -- Edit bug report at https://bugs.php.net/bug.php?id=63740&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63740&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63740&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63740&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63740&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63740&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63740&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63740&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63740&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63740&r=support Expected behavior: https://bugs.php.net/fix.php?id=63740&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63740&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63740&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63740&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63740&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63740&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63740&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63740&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63740&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63740&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63740&r=mysqlcfg
[PHP-BUG] Bug #63741 [NEW]: Crash when autoloading from spl
From: bobwei9 at hotmail dot com Operating system: Mac OS X Mountain Lion PHP version: master-Git-2012-12-11 (Git) Package: SPL related Bug Type: Bug Bug description:Crash when autoloading from spl Description: When calling the index.php of a fresh MediaWiki (Version 1.18.0) install, PHP segfaults. I know, 1.18.0 is an old version, but it shouldn't crash . Test script: --- normal MediaWiki 1.18.0 install Expected result: No segmentation fault... Actual result: -- wiki root# gdb --args php index.php GNU gdb 6.3.50-20050815 (Apple version gdb-1821) (Fri Jun 29 16:14:03 UTC 2012) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries done (gdb) run Starting program: /usr/bin/php index.php Reading symbols for shared libraries +... done Reading symbols for shared libraries . done PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/debug-zts-20121204/apc.so' - dlopen(/usr/lib/php/extensions/debug-zts-20121204/apc.so, 9): Symbol not found: _apc_globals_id Referenced from: /usr/lib/php/extensions/debug-zts-20121204/apc.so Expected in: flat namespace in /usr/lib/php/extensions/debug-zts-20121204/apc.so in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/debug-zts-20121204/apc.so' - dlopen(/usr/lib/php/extensions/debug-zts-20121204/apc.so, 9): Symbol not found: _apc_globals_id Referenced from: /usr/lib/php/extensions/debug-zts-20121204/apc.so Expected in: flat namespace in /usr/lib/php/extensions/debug-zts-20121204/apc.so in Unknown on line 0 Reading symbols for shared libraries . done PHP Warning: PHP Startup: pthreads: Unable to initialize module Module compiled with module API=20121113 PHPcompiled with module API=20121204 These options need to match in Unknown on line 0 Warning: PHP Startup: pthreads: Unable to initialize module Module compiled with module API=20121113 PHPcompiled with module API=20121204 These options need to match in Unknown on line 0 PHP Notice: Undefined index: HTTP_HOST in /[...]/wiki/LocalSettings.php on line 44 Notice: Undefined index: HTTP_HOST in /[...]/wiki/LocalSettings.php on line 44 PHP Notice: Undefined index: REQUEST_METHOD in /[...]/wiki/includes/Setup.php on line 387 Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x000701f8 0x0001008fb936 in instanceof_function_ex (instance_ce=0x70008, ce=0x10264a818, interfaces_only=0 '\0', tsrm_ls=0x101710ed0) at zend_operators.c:1720 1720for (i=0; inum_interfaces; i++) { (gdb) bt #0 0x0001008fb936 in instanceof_function_ex (instance_ce=0x70008, ce=0x10264a818, interfaces_only=0 '\0', tsrm_ls=0x101710ed0) at zend_operators.c:1720 #1 0x0001008fb9e5 in instanceof_function (instance_ce=0x70008, ce=0x10264a818, tsrm_ls=0x101710ed0) at zend_operators.c:1740 #2 0x0001008fb919 in instanceof_function_ex (instance_ce=0x1025b8400, ce=0x10264a818, interfaces_only=0 '\0', tsrm_ls=0x101710ed0) at zend_operators.c:1721 #3 0x0001008fb9e5 in instanceof_function (instance_ce=0x1025b8400, ce=0x10264a818, tsrm_ls=0x101710ed0) at zend_operators.c:1740 #4 0x000100934457 in zend_call_method (object_pp=0x0, obj_ce=0x10264a818, fn_proxy=0x1026735d0, function_name=0x102673558 "autoloader::autoload", function_name_len=21, retval_ptr_ptr=0x7fff5fbfd698, param_count=1, arg1=0x1029fe810, arg2=0x0, tsrm_ls=0x101710ed0) at zend_interfaces.c:89 #5 0x0001005a6128 in zif_spl_autoload_call (ht=1, return_value=0x1029fe890, return_value_ptr=0x7fff5fbfdf48, this_ptr=0x0, return_value_used=1, tsrm_ls=0x101710ed0) at php_spl.c:436 #6 0x0001008e7023 in zend_call_function (fci=0x7fff5fbfdee8, fci_cache=0x7fff5fbfdec0, tsrm_ls=0x101710ed0) at zend_execute_API.c:979 #7 0x0001008e814a in zend_lookup_class_ex (name=0x1029f2670 "Hooks", name_length=5, key=0x1029f2278, use_autoload=1, ce=0x7fff5fbfdfe0, tsrm_ls=0x101710ed0) at zend_execute_API.c:1129 #8 0x0001008e9f2e in zend_fetch_class_by_name (class_name=0x1029f2670 "Hooks", class_name_len=5, key=0x1029f2278, fetch_type=0, tsrm_ls=0x101710ed0) at zend_execute_API.c:1609 #9 0x000100978c23 in ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER (execute_data=0x102207280, tsrm_ls=0x101710ed0) at zend_vm_execute.h:3550 #10 0x000100963fe2 in execute_ex (execute_data=0x102207280, tsrm_
Bug #63738 [Opn->Asn]: unpack: back result with Z format
Edit report at https://bugs.php.net/bug.php?id=63738&edit=1 ID: 63738 Updated by: r...@php.net Reported by:r...@php.net -Summary:unpack string behavior change +Summary:unpack: back result with Z format -Status: Open +Status: Assigned Type: Bug Package:Strings related Operating System: GNU/Linux (Fedora 17) PHP Version:5.5Git-2012-12-11 (snap) -Assigned To: +Assigned To:remi Block user comment: N Private report: N Previous Comments: [2012-12-11 14:15:38] r...@php.net There still a problem with new 'z' format: php -r '$a="\x00\x00\x00\x00"; var_dump($a); var_dump(unpack("Z4foo", $a));' Actual result: string(4) "^@^@^@^@" array(1) { ["foo"]=> string(1) "^@" } When we expect: string(4) "^@^@^@^@" array(1) { ["foo"]=> string(0) "" } [2012-12-11 13:58:02] ahar...@php.net Snap. :) [2012-12-11 13:57:35] ahar...@php.net This was intentional â specifically, it was to fix bug #61038. Copy-pasting from the migration guide (http://php.net/manual/en/migration55.changed-functions.php): "unpack()'s a format no longer strips trailing null bytes, bringing it into line with Perl's behaviour." [2012-12-11 13:57:30] r...@php.net 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 Sorry, haven't read carefully UPGRADING - pack()/unpack() had the following changes, which bring it more in line with Perl's behavior: - Implemented format character "Z": NUL-padded string - "a" now does not remove trailing NUL characters on unpack() anymore - "A" will now strip all trailing ASCII whitespace on unpack() (it used to remove only trailing spaces). [2012-12-11 13:51:09] r...@php.net Description: Seems a regression between 5.4.9 and 5.5.0-dev This breaks Archive_Tar Test script: --- string(2) "AB" } Actual result: -- With php 5.5.0-dev: string(4) "AB^@^@" array(1) { ["foo"]=> string(4) "AB^@^@" } -- Edit this bug report at https://bugs.php.net/bug.php?id=63738&edit=1
Bug #63738 [Asn->Csd]: unpack: back result with Z format
Edit report at https://bugs.php.net/bug.php?id=63738&edit=1 ID: 63738 Updated by: r...@php.net Reported by:r...@php.net Summary:unpack: back result with Z format -Status: Assigned +Status: Closed Type: Bug Package:Strings related Operating System: GNU/Linux (Fedora 17) PHP Version:5.5Git-2012-12-11 (snap) Assigned To:remi Block user comment: N Private report: N New Comment: Automatic comment on behalf of remi Revision: http://git.php.net/?p=php-src.git;a=commit;h=4d8d5d83fce83c32a04cd8d8cf50d909ab101f38 Log: Fixed Bug #63738 unpack: back result with Z format Previous Comments: [2012-12-11 14:15:38] r...@php.net There still a problem with new 'z' format: php -r '$a="\x00\x00\x00\x00"; var_dump($a); var_dump(unpack("Z4foo", $a));' Actual result: string(4) "^@^@^@^@" array(1) { ["foo"]=> string(1) "^@" } When we expect: string(4) "^@^@^@^@" array(1) { ["foo"]=> string(0) "" } [2012-12-11 13:58:02] ahar...@php.net Snap. :) [2012-12-11 13:57:35] ahar...@php.net This was intentional â specifically, it was to fix bug #61038. Copy-pasting from the migration guide (http://php.net/manual/en/migration55.changed-functions.php): "unpack()'s a format no longer strips trailing null bytes, bringing it into line with Perl's behaviour." [2012-12-11 13:57:30] r...@php.net 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 Sorry, haven't read carefully UPGRADING - pack()/unpack() had the following changes, which bring it more in line with Perl's behavior: - Implemented format character "Z": NUL-padded string - "a" now does not remove trailing NUL characters on unpack() anymore - "A" will now strip all trailing ASCII whitespace on unpack() (it used to remove only trailing spaces). [2012-12-11 13:51:09] r...@php.net Description: Seems a regression between 5.4.9 and 5.5.0-dev This breaks Archive_Tar Test script: --- string(2) "AB" } Actual result: -- With php 5.5.0-dev: string(4) "AB^@^@" array(1) { ["foo"]=> string(4) "AB^@^@" } -- Edit this bug report at https://bugs.php.net/bug.php?id=63738&edit=1
Bug #36103 [NoF]: ftp ssl connection fails during login
Edit report at https://bugs.php.net/bug.php?id=36103&edit=1 ID: 36103 Updated by: tony2...@php.net Reported by:rebe at unit01 dot net Summary:ftp ssl connection fails during login Status: No Feedback Type: Bug Package:FTP related Operating System: linux PHP Version:5.1.2 Assigned To:tony2001 Block user comment: N Private report: N New Comment: @erez dot h at zend dot com I guess it would be better to create a new bug report and add an up to date reproduce case while you're at it. Adding some more explanations to the patch would be a good idea, too. You can also go an other way and send your patch directly to Dmitry for review, dmi...@zend.com/dmi...@php.net I mean. Previous Comments: [2012-12-11 15:15:58] erez dot h at zend dot com we still have this issue on windows php build 5.3.19 and 5.4.9 so we implemented this patch which solve the issue. please see if you can add to future versions. diff -ruN php-5.3.19.orig/ext/ftp/ftp.c php-5.3.19/ext/ftp/ftp.c --- php-5.3.19.orig/ext/ftp/ftp.c 2012-11-21 22:07:23.0 +0200 +++ php-5.3.19/ext/ftp/ftp.c2012-12-11 16:49:21.359682714 +0200 @@ -241,6 +241,7 @@ int ftp_login(ftpbuf_t *ftp, const char *user, const char *pass TSRMLS_DC) { + int errcode; #if HAVE_OPENSSL_EXT SSL_CTX *ctx = NULL; #endif @@ -289,13 +290,27 @@ } SSL_set_fd(ftp->ssl_handle, ftp->fd); - - if (SSL_connect(ftp->ssl_handle) <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSL/TLS handshake failed"); - SSL_shutdown(ftp->ssl_handle); - return 0; - } - + + do { + errcode = SSL_connect(ftp->ssl_handle); + switch (SSL_get_error (ftp->ssl_handle, errcode)) { + case SSL_ERROR_NONE: + errcode = 1; + break; + case SSL_ERROR_WANT_WRITE: + case SSL_ERROR_WANT_READ: + case SSL_ERROR_WANT_X509_LOOKUP: + errcode = 0; + break; + default: + /* true error happened */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSL/TLS handshake failed"); + SSL_shutdown(ftp->ssl_handle); + return 0; + break; + } + } while(errcode == 0 && !SSL_is_init_finished(ftp- >ssl_handle)); + ftp->ssl_active = 1; if (!ftp->old_ssl) { @@ -1493,6 +1508,7 @@ php_sockaddr_storage addr; socklen_t size; + int errcode; #if HAVE_OPENSSL_EXT SSL_CTX *ctx; #endif @@ -1537,11 +1553,26 @@ SSL_copy_session_id(data->ssl_handle, ftp->ssl_handle); } - if (SSL_connect(data->ssl_handle) <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "data_accept: SSL/TLS handshake failed"); - SSL_shutdown(data->ssl_handle); - return 0; - } + + do { + errcode = SSL_connect(data->ssl_handle); + switch (SSL_get_error (data->ssl_handle, errcode)) { + case SSL_ERROR_NONE: + errcode = 1; + break; + case SSL_ERROR_WANT_WRITE: + case SSL_ERROR_WANT_READ: + case SSL_ERROR_WANT_X509_LOOKUP: + errcode = 0; + break; + default: + /* true error happened */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "data_accept: SSL/TLS handshake failed"); + SSL_shutdown(data->ssl_handle); + return 0; + break; + } + } while(errcode == 0 && !SSL_is_init_finished(data- >ssl_handle));
[PHP-BUG] Bug #63742 [NEW]: Stack tree DOMDocument::registerNodeClass incorrect
From: giso at connectholland dot nl Operating system: Linux / Debian PHP version: 5.3.19 Package: DOM XML related Bug Type: Bug Bug description:Stack tree DOMDocument::registerNodeClass incorrect Description: When using DOMDocument::registerNodeClass for both DOMElement and DOMNode a DOMElement does nog get to be a child of the registered DOMNode class Test script: --- registerNodeClass("DOMNode", "MyDOMNode"); $this->registerNodeClass("DOMElement", "MyDOMElement"); } } $dom = new MyDOMDocument(); $dom->loadXML(""); $parent_class_names = array(); $parent_class_name = get_class($dom->documentElement); do { $parent_class_names[] = $parent_class_name; } while($parent_class_name = get_parent_class($parent_class_name)); var_dump($parent_class_names); ?> Expected result: array (size=4) 0 => string 'MyDOMElement' (length=12) 1 => string 'DOMElement' (length=10) 2 => string 'MyDOMNode' (length=9) 3 => string 'DOMNode' (length=7) Actual result: -- array (size=3) 0 => string 'MyDOMElement' (length=12) 1 => string 'DOMElement' (length=10) 2 => string 'DOMNode' (length=7) -- Edit bug report at https://bugs.php.net/bug.php?id=63742&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63742&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63742&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63742&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63742&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63742&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63742&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63742&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63742&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63742&r=support Expected behavior: https://bugs.php.net/fix.php?id=63742&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63742&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63742&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63742&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63742&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63742&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63742&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63742&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63742&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63742&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63742&r=mysqlcfg
Bug #63742 [Opn]: Stack tree DOMDocument::registerNodeClass incorrect
Edit report at https://bugs.php.net/bug.php?id=63742&edit=1 ID: 63742 User updated by:giso at connectholland dot nl Reported by:giso at connectholland dot nl Summary:Stack tree DOMDocument::registerNodeClass incorrect Status: Open Type: Bug Package:DOM XML related Operating System: Linux / Debian -PHP Version:5.3.19 +PHP Version:5.3.3 Block user comment: N Private report: N New Comment: Add class MyDOMNode extends DOMNode {} class MyDOMElement extends DOMElement {} to the reproduction script Previous Comments: [2012-12-11 16:50:30] giso at connectholland dot nl Description: When using DOMDocument::registerNodeClass for both DOMElement and DOMNode a DOMElement does nog get to be a child of the registered DOMNode class Test script: --- registerNodeClass("DOMNode", "MyDOMNode"); $this->registerNodeClass("DOMElement", "MyDOMElement"); } } $dom = new MyDOMDocument(); $dom->loadXML(""); $parent_class_names = array(); $parent_class_name = get_class($dom->documentElement); do { $parent_class_names[] = $parent_class_name; } while($parent_class_name = get_parent_class($parent_class_name)); var_dump($parent_class_names); ?> Expected result: array (size=4) 0 => string 'MyDOMElement' (length=12) 1 => string 'DOMElement' (length=10) 2 => string 'MyDOMNode' (length=9) 3 => string 'DOMNode' (length=7) Actual result: -- array (size=3) 0 => string 'MyDOMElement' (length=12) 1 => string 'DOMElement' (length=10) 2 => string 'DOMNode' (length=7) -- Edit this bug report at https://bugs.php.net/bug.php?id=63742&edit=1
Bug #63732 [Nab]: unicode strings not handled correctly
Edit report at https://bugs.php.net/bug.php?id=63732&edit=1 ID: 63732 User updated by:jmichae3 at yahoo dot com Reported by:jmichae3 at yahoo dot com Summary:unicode strings not handled correctly Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: linux PHP Version:5.3.19 Block user comment: N Private report: N New Comment: it may be documented behavior, but it still doesn't provide a solution to the problem. Previous Comments: [2012-12-10 02:24:33] ahar...@php.net PHP strings are effectively byte arrays, and ord() only looks at the first byte. This is documented behaviour. [2012-12-09 07:38:05] jmichae3 at yahoo dot com Description: I am getting russian characters in my meail forms. I want to compare the characters to see if they are > '~' which is the last visible character in the ascii character set. this comparison does not work. in UNICODE, these characters are about 1024, and ~ is 126 according to ord(). ord() thinks EVERY character is ascii. this is far from true. there are mb characters from utf8. this is russian random characters from charmap: ÐÏÐγÏÐÐÐЫЫÐÐÐÑмдп in fact, I don't have any working way to detect whether a character is KOI8-R or ASCII, or cyrillic, or whether the character ordinal number is actually beyond 127 or not. because according to ord(), it's all within 0-255. Test script: --- 0) { echo "OK"; } else { echo "fail"; } if (ord($s[$i]) > 126) { echo "OK"; } else { echo "fail"; } if ($s[$i] > '~') { echo "OK"; } else { echo "fail"; } echo ord($s[$i]); } echo "\n"; $i=0; /* strangely enough, I get 2 outputs with only 1 character. Sat 12/08/2012 23:12:46.76||E:\www\jimm|>php t.php 1 OKOKOK208OKOKOK191 Sat 12/08/2012 23:14:27.34||E:\www\jimm|> */ ?> Expected result: whole characters as a single unit. 1 result. Actual result: -- got 2 results from 1 UNICODE russian character in a string. should only get 1. this file was encoded with utf8 without bom. php is splitting the utf8 characters into a byte stream when it gets to strlen(). or it just treats unicode and utf8 characters like ascii. this does not work well when trying to use mb_detect_encoding() - that breaks ability to detect encodings when it breaks up characters like that. nearly everything with strings actually. this also breaks ability to detect foreign spam. -- Edit this bug report at https://bugs.php.net/bug.php?id=63732&edit=1
[PHP-BUG] Req #63743 [NEW]: New function request
From: jb7815 at gmail dot com Operating system: All PHP version: Irrelevant Package: Unknown/Other Function Bug Type: Feature/Change Request Bug description:New function request Description: Suggestion: Could you please implement a function to merge associative arrays without overwriting duplicate keys. Unless there already is one that I have missed? I have provided a small example that works to a point that will demonstrate my idea. Thanks. Test script: --- function array_merge_assoc($array1, $array2){ foreach($array2 as $key => $value){ if(array_key_exists($key, $array1)){ $result[$key] = array_merge($array1[$key], $array2[$key]); unset($array2[$key]); }else{ $result[$key] = $array2[$key]; } } return $result; } $userConfig = ['libraries' => ['database', 'session', 'security']]; $defaults = ['libraries' => ['benchmark' , 'event', 'error'], 'helpers' => ['html','date','file']]; print_r(array_merge_assoc($userConfig,$defaults)); Expected result: Array ( [libraries] => Array ( [0] => database [1] => session [2] => security [3] => benchmark [4] => event [5] => error ) [helpers] => Array ( [0] => html [1] => date [2] => file ) ) -- Edit bug report at https://bugs.php.net/bug.php?id=63743&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63743&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63743&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63743&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63743&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63743&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63743&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63743&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63743&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63743&r=support Expected behavior: https://bugs.php.net/fix.php?id=63743&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63743&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63743&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63743&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63743&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63743&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63743&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63743&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63743&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63743&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63743&r=mysqlcfg
[PHP-BUG] Req #63744 [NEW]: references in list()
From: ninzya at inbox dot lv Operating system: Any PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Feature/Change Request Bug description:references in list() Description: Would be good to have a possibility to extract array elements by ref like in test script. Test script: --- $arr = array( 1, 2 ); list( &$first, &$second ) = $arr; ++$first; --$second; print_r( $arr); Expected result: array( 2, 1 ) Actual result: -- PHP Parse error: syntax error, unexpected '&', expecting ',' or ')' in ... on line 2 -- Edit bug report at https://bugs.php.net/bug.php?id=63744&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63744&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63744&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63744&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63744&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63744&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63744&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63744&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63744&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63744&r=support Expected behavior: https://bugs.php.net/fix.php?id=63744&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63744&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63744&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63744&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63744&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63744&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63744&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63744&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63744&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63744&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63744&r=mysqlcfg
[PHP-BUG] Req #63745 [NEW]: Var_dump on null characters
From: jesper dot hag at gmail dot com Operating system: CentOS PHP version: 5.3Git-2012-12-11 (Git) Package: *General Issues Bug Type: Feature/Change Request Bug description:Var_dump on null characters Description: *Note* My PHP version is actually 5.3.3 The problem I've come up to is that printing a string with var_dump (for debugging purpose eg.) that contains null-characters are counted in the string length but are not in any way displayed in the var_dump output. I'm not sure this should be considerate a bug or a feature request because it is something I want and perhaps not something that per design should be in this way. Test script: --- Expected result: I would expect the above script to output something like string(6) "\0123456", that - in my world - would make more sense. -- Edit bug report at https://bugs.php.net/bug.php?id=63745&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63745&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63745&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63745&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63745&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63745&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63745&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63745&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63745&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63745&r=support Expected behavior: https://bugs.php.net/fix.php?id=63745&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63745&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63745&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63745&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63745&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63745&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63745&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63745&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63745&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63745&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63745&r=mysqlcfg
Bug #63732 [Nab]: unicode strings not handled correctly
Edit report at https://bugs.php.net/bug.php?id=63732&edit=1 ID: 63732 Updated by: ras...@php.net Reported by:jmichae3 at yahoo dot com Summary:unicode strings not handled correctly Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: linux PHP Version:5.3.19 Block user comment: N Private report: N New Comment: This is a bug reporting system. You reported a bug on a function that is behaving as intended and as documented. This is not a support forum. There are plenty of ways to do what you need. Start by reading about the mbstring functions. Previous Comments: [2012-12-11 17:22:40] jmichae3 at yahoo dot com it may be documented behavior, but it still doesn't provide a solution to the problem. [2012-12-10 02:24:33] ahar...@php.net PHP strings are effectively byte arrays, and ord() only looks at the first byte. This is documented behaviour. [2012-12-09 07:38:05] jmichae3 at yahoo dot com Description: I am getting russian characters in my meail forms. I want to compare the characters to see if they are > '~' which is the last visible character in the ascii character set. this comparison does not work. in UNICODE, these characters are about 1024, and ~ is 126 according to ord(). ord() thinks EVERY character is ascii. this is far from true. there are mb characters from utf8. this is russian random characters from charmap: ÐÏÐγÏÐÐÐЫЫÐÐÐÑмдп in fact, I don't have any working way to detect whether a character is KOI8-R or ASCII, or cyrillic, or whether the character ordinal number is actually beyond 127 or not. because according to ord(), it's all within 0-255. Test script: --- 0) { echo "OK"; } else { echo "fail"; } if (ord($s[$i]) > 126) { echo "OK"; } else { echo "fail"; } if ($s[$i] > '~') { echo "OK"; } else { echo "fail"; } echo ord($s[$i]); } echo "\n"; $i=0; /* strangely enough, I get 2 outputs with only 1 character. Sat 12/08/2012 23:12:46.76||E:\www\jimm|>php t.php 1 OKOKOK208OKOKOK191 Sat 12/08/2012 23:14:27.34||E:\www\jimm|> */ ?> Expected result: whole characters as a single unit. 1 result. Actual result: -- got 2 results from 1 UNICODE russian character in a string. should only get 1. this file was encoded with utf8 without bom. php is splitting the utf8 characters into a byte stream when it gets to strlen(). or it just treats unicode and utf8 characters like ascii. this does not work well when trying to use mb_detect_encoding() - that breaks ability to detect encodings when it breaks up characters like that. nearly everything with strings actually. this also breaks ability to detect foreign spam. -- Edit this bug report at https://bugs.php.net/bug.php?id=63732&edit=1
[PHP-BUG] Bug #63746 [NEW]: FPM incompatible with runkit sanbox
From: tranelson at x dot com Operating system: Linux PHP version: 5.4.9 Package: FPM related Bug Type: Bug Bug description:FPM incompatible with runkit sanbox Description: Using Runkit Sandbox inside PHP-FPM causes FPM to crash. Please see the following for a description and GDB trace: https://github.com/zenovich/runkit/issues/44 I thought this might have been a runkit issue, but in the stack trace, runkit is just shutting down the child interpreter, which calls back to FPM. FPM is assuming that there is a request for this interpreter, which doesn't hold true in this scenario. I've made a fix that works for me. It is attached below. Test script: --- $options = array( 'safe_mode'=>false, 'open_basedir'=>'', 'allow_url_fopen'=>'true', 'disable_functions'=>'exec,shell_exec,passthru,system', 'disable_classes'=>'myAppClass'); $sandbox = new Runkit_Sandbox($options); $sandbox->eval('echo "hello from sandbox\n";'); $hello = "hello world from parent"; echo $hello; Expected result: Hello from sandbox Actual result: -- Crash. #0 fcgi_finish_request (req=0x0, force_close=0) at /home/tranelson/php-5.4.8/sapi/fpm/fpm/fastcgi.c:1040 #1 0x08440032 in sapi_cgi_deactivate (tsrm_ls=) at /home/tranelson/php-5.4.8/sapi/fpm/fpm/fpm_main.c:843 #2 sapi_cgi_deactivate (tsrm_ls=0xa6adaf8) at /home/tranelson/php-5.4.8/sapi/fpm/fpm/fpm_main.c:832 #3 0x0831eaf4 in sapi_deactivate (tsrm_ls=0xa6adaf8) at /home/tranelson/php-5.4.8/main/SAPI.c:529 #4 0x08315f3c in php_request_shutdown (dummy=0xa6adaf8) at /home/tranelson/php-5.4.8/main/main.c:1799 #5 0xb68241fb in php_runkit_sandbox_dtor (objval=0xb6a76548, tsrm_ls=0xa51a070) at /home/tranelson/runkit/runkit-master/runkit_sandbox.c:1838 #6 0x083ab42c in zend_objects_store_del_ref_by_handle_ex (handle=1, handlers=0xb68307a0, tsrm_ls=0xa51a070) at /home/tranelson/php-5.4.8/Zend/zend_objects_API.c:220 #7 0x083ab466 in zend_objects_store_del_ref (zobject=0xb6a7652c, tsrm_ls=0xa51a070) at /home/tranelson/php-5.4.8/Zend/zend_objects_API.c:172 #8 0x08380581 in _zval_dtor_func (zvalue=0xb6a7652c) at /home/tranelson/php-5.4.8/Zend/zend_variables.c:52 #9 0x08371768 in _zval_dtor (zvalue=) at /home/tranelson/php-5.4.8/Zend/zend_variables.h:35 #10 _zval_ptr_dtor (zval_ptr=0xb6a766ec) ---Type to continue, or q to quit--- at /home/tranelson/php-5.4.8/Zend/zend_execute_API.c:438 #11 _zval_ptr_dtor (zval_ptr=0xb6a766ec) at /home/tranelson/php-5.4.8/Zend/zend_execute_API.c:427 #12 0x0838f055 in zend_hash_apply_deleter (ht=0xa51bb88, p=0xb6a766e0) at /home/tranelson/php-5.4.8/Zend/zend_hash.c:650 #13 0x083908e1 in zend_hash_reverse_apply (ht=0xa51bb88, apply_func=0x8371590 , tsrm_ls=0xa51a070) at /home/tranelson/php-5.4.8/Zend/zend_hash.c:804 #14 0x08371c1e in shutdown_destructors (tsrm_ls=0xa51a070) at /home/tranelson/php-5.4.8/Zend/zend_execute_API.c:217 #15 0x08382098 in zend_call_destructors (tsrm_ls=0xa51a070) at /home/tranelson/php-5.4.8/Zend/zend.c:922 #16 0x08315fc4 in php_request_shutdown (dummy=0x0) at /home/tranelson/php-5.4.8/main/main.c:1732 #17 0x0806efc2 in main (argc=1, argv=0xbfac87a4) at /home/tranelson/php-5.4.8/sapi/fpm/fpm/fpm_main.c:1948 -- Edit bug report at https://bugs.php.net/bug.php?id=63746&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63746&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63746&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63746&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63746&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63746&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63746&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63746&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63746&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63746&r=support Expected behavior: https://bugs.php.net/fix.php?id=63746&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63746&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63746&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63746&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63746&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63746&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63746&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63746&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63746&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63746&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63746&r=mysqlcfg
[PHP-BUG] Bug #63747 [NEW]: Japanese particular multi-byte charcter before double quaot
From: mukarami dot kazuo at jp dot fujitsu dot com Operating system: windows7 professional 32bit PHP version: 5.4.9 Package: Strings related Bug Type: Bug Bug description:Japanese particular multi-byte charcter before double quaot Description: Japanese particular japanese multi-byte charcter before double quaot occurs error. FOR example php script file vtt.php contains only 1 line as bellow sample of execution php vtt.php PHP Parse error: syntax error, unexpected end of file, expecting variable (T_VA RIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in C:\apache\dev elop\vtt.php on line 2 Test script: --- -- Edit bug report at https://bugs.php.net/bug.php?id=63747&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63747&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63747&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63747&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63747&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63747&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63747&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63747&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63747&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63747&r=support Expected behavior: https://bugs.php.net/fix.php?id=63747&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63747&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63747&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63747&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63747&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63747&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63747&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63747&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63747&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63747&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63747&r=mysqlcfg
Bug #63732 [Nab]: unicode strings not handled correctly
Edit report at https://bugs.php.net/bug.php?id=63732&edit=1 ID: 63732 User updated by:jmichae3 at yahoo dot com Reported by:jmichae3 at yahoo dot com Summary:unicode strings not handled correctly Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: linux PHP Version:5.3.19 Block user comment: N Private report: N New Comment: if you were to take the time to do the research, there is no function in PHP except ord() for converting a character [from a string] to a number. maybe strings need to be handled differently internally in php to handle UNICODE. or maybe ord simply needs to be rewritten so it works so matter what character encoding is thrown at it. it would be difficult, but extremely useful, since it is the only function. I took the time to look through the mb functions. there was nothing to help me. I tried looking through the mb functions, there wasn't a compare. there wasn't a way to compare. I consider a function like that to be crucial if relops are not safe or capable of doing it. if that is the case, please make one, and an mb function for returning the ordinal value of an mb char. the functionality is just not there. thanks. much appreciated. unicode/mb-related bug database stuff: https://bugs.php.net/bug.php?id=49439 https://bugs.php.net/bug.php?id=63732 just search the database for anything with mb_encode or unicode. there are a number of bugs related to this problem. Previous Comments: [2012-12-11 22:22:24] ras...@php.net This is a bug reporting system. You reported a bug on a function that is behaving as intended and as documented. This is not a support forum. There are plenty of ways to do what you need. Start by reading about the mbstring functions. [2012-12-11 17:22:40] jmichae3 at yahoo dot com it may be documented behavior, but it still doesn't provide a solution to the problem. [2012-12-10 02:24:33] ahar...@php.net PHP strings are effectively byte arrays, and ord() only looks at the first byte. This is documented behaviour. [2012-12-09 07:38:05] jmichae3 at yahoo dot com Description: I am getting russian characters in my meail forms. I want to compare the characters to see if they are > '~' which is the last visible character in the ascii character set. this comparison does not work. in UNICODE, these characters are about 1024, and ~ is 126 according to ord(). ord() thinks EVERY character is ascii. this is far from true. there are mb characters from utf8. this is russian random characters from charmap: ÐÏÐγÏÐÐÐЫЫÐÐÐÑмдп in fact, I don't have any working way to detect whether a character is KOI8-R or ASCII, or cyrillic, or whether the character ordinal number is actually beyond 127 or not. because according to ord(), it's all within 0-255. Test script: --- 0) { echo "OK"; } else { echo "fail"; } if (ord($s[$i]) > 126) { echo "OK"; } else { echo "fail"; } if ($s[$i] > '~') { echo "OK"; } else { echo "fail"; } echo ord($s[$i]); } echo "\n"; $i=0; /* strangely enough, I get 2 outputs with only 1 character. Sat 12/08/2012 23:12:46.76||E:\www\jimm|>php t.php 1 OKOKOK208OKOKOK191 Sat 12/08/2012 23:14:27.34||E:\www\jimm|> */ ?> Expected result: whole characters as a single unit. 1 result. Actual result: -- got 2 results from 1 UNICODE russian character in a string. should only get 1. this file was encoded with utf8 without bom. php is splitting the utf8 characters into a byte stream when it gets to strlen(). or it just treats unicode and utf8 characters like ascii. this does not work well when trying to use mb_detect_encoding() - that breaks ability to detect encodings when it breaks up characters like that. nearly everything with strings actually. this also breaks ability to detect foreign spam. -- Edit this bug report at https://bugs.php.net/bug.php?id=63732&edit=1
Req #63745 [Opn->Nab]: Var_dump on null characters
Edit report at https://bugs.php.net/bug.php?id=63745&edit=1 ID: 63745 Updated by: ahar...@php.net Reported by:jesper dot hag at gmail dot com Summary:Var_dump on null characters -Status: Open +Status: Not a bug Type: Feature/Change Request -Package:*General Issues +Package:Variables related Operating System: CentOS PHP Version:5.3Git-2012-12-11 (Git) Block user comment: N Private report: N New Comment: var_dump() dumps the contents of the string as is, so the null byte is literally a null byte in the output. If you run your test script through hexdump, you get this: adamh@swiftdesk7:~$ php /tmp/test.php | hexdump -C 73 74 72 69 6e 67 28 36 29 20 22 00 32 33 34 35 |string(6) ".2345| 0010 36 22 0a |6".| 0013 You can see the null byte in the output. What you probably want instead of var_export(), which will escape non-printable characters: for instance, your test string is exported as: '' . "\0" . '23456' Previous Comments: [2012-12-11 19:04:19] jesper dot hag at gmail dot com Description: *Note* My PHP version is actually 5.3.3 The problem I've come up to is that printing a string with var_dump (for debugging purpose eg.) that contains null-characters are counted in the string length but are not in any way displayed in the var_dump output. I'm not sure this should be considerate a bug or a feature request because it is something I want and perhaps not something that per design should be in this way. Test script: --- Expected result: I would expect the above script to output something like string(6) "\0123456", that - in my world - would make more sense. -- Edit this bug report at https://bugs.php.net/bug.php?id=63745&edit=1
Bug #63747 [Opn->Fbk]: Japanese particular multi-byte charcter before double quaot
Edit report at https://bugs.php.net/bug.php?id=63747&edit=1 ID: 63747 Updated by: ahar...@php.net Reported by:mukarami dot kazuo at jp dot fujitsu dot com Summary:Japanese particular multi-byte charcter before double quaot -Status: Open +Status: Feedback Type: Bug Package:Strings related Operating System: windows7 professional 32bit PHP Version:5.4.9 Block user comment: N Private report: N New Comment: What encoding is vtt.php saved in? It works for me with a UTF-8 file. Previous Comments: [2012-12-12 00:28:38] mukarami dot kazuo at jp dot fujitsu dot com Description: Japanese particular japanese multi-byte charcter before double quaot occurs error. FOR example php script file vtt.php contains only 1 line as bellow sample of execution php vtt.php PHP Parse error: syntax error, unexpected end of file, expecting variable (T_VA RIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in C:\apache\dev elop\vtt.php on line 2 Test script: --- -- Edit this bug report at https://bugs.php.net/bug.php?id=63747&edit=1
Bug #63732 [Nab]: unicode strings not handled correctly
Edit report at https://bugs.php.net/bug.php?id=63732&edit=1 ID: 63732 Updated by: ras...@php.net Reported by:jmichae3 at yahoo dot com Summary:unicode strings not handled correctly Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: linux PHP Version:5.3.19 Block user comment: N Private report: N New Comment: Personally I'd just convert from utf8 to iso-8959-1 or whichever encoding you are looking for here instead of checking each character. But if you really do want to do it, it isn't very hard. You just need to understand what UTF-8 looks like and it becomes a simple 5-line function in userspace: function utf8_ord($c) { $b0 = ord($c[0]); if($b0 < 0x10) return $b0; $b1 = ord($c[1]); if($b0 < 0xE0 )return (($b0 & 0x1F) << 6) + ($b1 & 0x3F); return (($b0 & 0x0F) << 12) + (($b1 & 0x3F) << 6) + (ord($c[2]) & 0x3F); } But you have to understand that there is absolutely no way to accurately detect the encoding of a short sequence of bytes. The above will work if you know the input is UTF-8. There is no way to write a magic function which will tell you the encoding from a couple of bytes of data which you seem to imply we should provide you. Previous Comments: [2012-12-12 00:34:00] jmichae3 at yahoo dot com if you were to take the time to do the research, there is no function in PHP except ord() for converting a character [from a string] to a number. maybe strings need to be handled differently internally in php to handle UNICODE. or maybe ord simply needs to be rewritten so it works so matter what character encoding is thrown at it. it would be difficult, but extremely useful, since it is the only function. I took the time to look through the mb functions. there was nothing to help me. I tried looking through the mb functions, there wasn't a compare. there wasn't a way to compare. I consider a function like that to be crucial if relops are not safe or capable of doing it. if that is the case, please make one, and an mb function for returning the ordinal value of an mb char. the functionality is just not there. thanks. much appreciated. unicode/mb-related bug database stuff: https://bugs.php.net/bug.php?id=49439 https://bugs.php.net/bug.php?id=63732 just search the database for anything with mb_encode or unicode. there are a number of bugs related to this problem. [2012-12-11 22:22:24] ras...@php.net This is a bug reporting system. You reported a bug on a function that is behaving as intended and as documented. This is not a support forum. There are plenty of ways to do what you need. Start by reading about the mbstring functions. [2012-12-11 17:22:40] jmichae3 at yahoo dot com it may be documented behavior, but it still doesn't provide a solution to the problem. [2012-12-10 02:24:33] ahar...@php.net PHP strings are effectively byte arrays, and ord() only looks at the first byte. This is documented behaviour. [2012-12-09 07:38:05] jmichae3 at yahoo dot com Description: I am getting russian characters in my meail forms. I want to compare the characters to see if they are > '~' which is the last visible character in the ascii character set. this comparison does not work. in UNICODE, these characters are about 1024, and ~ is 126 according to ord(). ord() thinks EVERY character is ascii. this is far from true. there are mb characters from utf8. this is russian random characters from charmap: ÐÏÐγÏÐÐÐЫЫÐÐÐÑмдп in fact, I don't have any working way to detect whether a character is KOI8-R or ASCII, or cyrillic, or whether the character ordinal number is actually beyond 127 or not. because according to ord(), it's all within 0-255. Test script: --- 0) { echo "OK"; } else { echo "fail"; } if (ord($s[$i]) > 126) { echo "OK"; } else { echo "fail"; } if ($s[$i] > '~') { echo "OK"; } else { echo "fail"; } echo ord($s[$i]); } echo "\n"; $i=0; /* strangely enough, I get 2 outputs with only 1 character. Sat 12/08/2012 23:12:46.76||E:\www\jimm|>php t.php 1 OKOKOK208OKOKOK191 Sat 12/08/2012 23:14:27.34||E:\www\jimm|> */ ?> Expected result: whole characters as a single unit. 1 result. Actual result: -- got 2 results from 1 UNICODE russian character in a string. should only get 1. this file was encoded with utf8 without bom
[PHP-BUG] Bug #63748 [NEW]: error: 'struct fpm_scoreboard_s' has no member named 'lock'
From: xuefer at gmail dot com Operating system: linux PHP version: 5.4.9 Package: FPM related Bug Type: Bug Bug description:error: 'struct fpm_scoreboard_s' has no member named 'lock' Description: CFLAGS='-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic' "CFLAGS=-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" "CXXFLAGS=-pipe - Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" ../php5/configure --disable-pear -- enable-debug --enable-maintainer-zts --enable-experimental-zts --enable-fpm -- enable-cgi --enable-fastcgi --enable-fastcgi --enable-force-cgi-redirect --with- pcre-regex --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd -- with- openssl --with-posix --with-iconv --enable-sockets --enable-inline-optimization -- disable-mbregex --enable-bcmath --enable-pcntl --enable-memory-limit --enable- ftp --enable-event --with-mysql=/usr --enable-mmap --enable-mbstring --with-readline - -with-xmlrpc --enable-soap --with-sqlite --enable-sqlite-utf8 --with- mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr --prefix=/home/moo/test/php5- debug-zts --cache-file=config.cache make Actual result: -- /home/moo/src/php/php5-debug-zts/meta_ccld -I/home/moo/src/php/php5/sapi/fpm - Isapi/fpm/ -I/home/moo/src/php/php5/sapi/fpm/ -DPHP_ATOM_INC - I/home/moo/src/php/php5-debug-zts/include -I/home/moo/src/php/php5-debug- zts/main -I/home/moo/src/php/php5 -I/home/moo/src/php/php5-debug- zts/ext/date/lib -I/home/moo/src/php/php5/ext/date/lib - I/home/moo/src/php/php5/ext/ereg/regex -I/usr/include/libxml2 - I/home/moo/src/php/php5/ext/mbstring/libmbfl -I/home/moo/src/php/php5-debug- zts/ext/mbstring/libmbfl -I/home/moo/src/php/php5/ext/mbstring/libmbfl/mbfl - I/home/moo/src/php/php5-debug-zts/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/home/moo/src/php/php5/ext/sqlite3/libsqlite -I/home/moo/src/php/php5-debug- zts/TSRM -I/home/moo/src/php/php5-debug-zts/Zend -I/home/moo/src/php/php5/main - I/home/moo/src/php/php5/Zend -I/home/moo/src/php/php5/TSRM - I/home/moo/src/php/php5-debug-zts/ -D_REENTRANT -I/usr/include -pipe -Wall - std=c99 -D_GNU_SOURCE -pedantic -g -fvisibility=hidden -pthread -O0 -Wall -DZTS -c /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c -o sapi/fpm/fpm/fpm_scoreboard.o In file included from /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:11:0: /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:24:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:53:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_update': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:87:26: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:146:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:187:22: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_release': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:199:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_proc_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:211:25: error: 'struct fpm_scoreboard_proc_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_proc_release': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:225:6: error: 'struct fpm_scoreboard_proc_s' has no member named 'lock' -- Edit bug report at https://bugs.php.net/bug.php?id=63748&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63748&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63748&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63748&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63748&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63748&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63748&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63748&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63748&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63748&r=support Expected behavior: https://bugs.php.net/fix.php?id=63748&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63748&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63748&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63748&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63748&r=php4 Daylight Savin
Bug #61754 [Opn->NoF]: pdo_pgsql fails on make
Edit report at https://bugs.php.net/bug.php?id=61754&edit=1 ID: 61754 Updated by: willfi...@php.net Reported by:gencer at gencgiyen dot com Summary:pdo_pgsql fails on make -Status: Open +Status: No Feedback Type: Bug Package:PDO related Operating System: CentOS 5.8 x86_64 PHP Version:5.4.0 Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: [2012-09-21 14:33:31] willfi...@php.net This looks like an environment-specific issue. pdo_pgsql.c requires pdo/php_pdo.h, but it currently can't find it in the include path. Were you able to resolve this or is this still an issue? [2012-04-17 11:14:06] gencer at gencgiyen dot com I think the correct package is PDO instead of PostgreSQL ? [2012-04-17 11:00:32] gencer at gencgiyen dot com Description: When i tried to build/make my PHP with --with-pdo-pgsql=DIR command, it fails on when the make came to the pgsql. /bin/sh /installers/php/php-5.4.0/libtool --silent --preserve-dup-deps --mode=compile gcc -I/gencer/php/php-5.4.0/ext -Iext/pdo_pgsql/ -I/installers/php/php-5.4.0/ext/pdo_pgsql/ -DPHP_ATOM_INC -I/installers/php/php-5.4.0/include -I/installers/php/php-5.4.0/main -I/installers/php/php-5.4.0 -I/installers/php/php-5.4.0/ext/date/lib -I/installers/php/php-5.4.0/ext/ereg/regex -I/usr/include/libxml2 -I/usr/kerberos/include -I/usr/include/freetype2 -I/usr/include/imap -I/installers/php/php-5.4.0/ext/mbstring/oniguruma -I/installers/php/php-5.4.0/ext/mbstring/libmbfl -I/installers/php/php-5.4.0/ext/mbstring/libmbfl/mbfl -I/usr/pgsql-9.1/include -I/installers/php/php-5.4.0/ext/sqlite3/libsqlite -I/installers/php/php-5.4.0/TSRM -I/installers/php/php-5.4.0/Zend -I/usr/include -g -O2 -fvisibility=hidden -c /installers/php/php-5.4.0/ext/pdo_pgsql/pdo_pgsql.c -o ext/pdo_pgsql/pdo_pgsql.lo /installers/php/php-5.4.0/ext/pdo_pgsql/pdo_pgsql.c:28:25: error: pdo/php_pdo.h: No such file or directory /installers/php/php-5.4.0/ext/pdo_pgsql/pdo_pgsql.c:29:32: error: pdo/php_pdo_driver.h: No such file or directory In file included from /installers/php/php-5.4.0/ext/pdo_pgsql/pdo_pgsql.c:31: /installers/php/php-5.4.0/ext/pdo_pgsql/php_pdo_pgsql_int.h:84: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âpdo_pgsql_driverâ /installers/php/php-5.4.0/ext/pdo_pgsql/php_pdo_pgsql_int.h:86: error: expected â)â before â*â token /installers/php/php-5.4.0/ext/pdo_pgsql/php_pdo_pgsql_int.h:95: error: âPDO_ATTR_DRIVER_SPECIFICâ undeclared here (not in a function) /installers/php/php-5.4.0/ext/pdo_pgsql/php_pdo_pgsql_int.h:99: error: expected specifier-qualifier-list before âpdo_dbh_tâ /installers/php/php-5.4.0/ext/pdo_pgsql/php_pdo_pgsql_int.h:113: error: expected â)â before â*â token /installers/php/php-5.4.0/ext/pdo_pgsql/pdo_pgsql.c: In function âzm_startup_pdo_pgsqlâ: /installers/php/php-5.4.0/ext/pdo_pgsql/pdo_pgsql.c:95: error: âpdo_pgsql_driverâ undeclared (first use in this function) /installers/php/php-5.4.0/ext/pdo_pgsql/pdo_pgsql.c:95: error: (Each undeclared identifier is reported only once /installers/php/php-5.4.0/ext/pdo_pgsql/pdo_pgsql.c:95: error: for each function it appears in.) /installers/php/php-5.4.0/ext/pdo_pgsql/pdo_pgsql.c: In function âzm_shutdown_pdo_pgsqlâ: /installers/php/php-5.4.0/ext/pdo_pgsql/pdo_pgsql.c:104: error: âpdo_pgsql_driverâ undeclared (first use in this function) make: *** [ext/pdo_pgsql/pdo_pgsql.lo] Error 1 Test script: --- cd php-5.4.0 './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=
Bug #63741 [Opn->Fbk]: Crash when autoloading from spl
Edit report at https://bugs.php.net/bug.php?id=63741&edit=1 ID: 63741 Updated by: larue...@php.net Reported by:bobwei9 at hotmail dot com Summary:Crash when autoloading from spl -Status: Open +Status: Feedback Type: Bug Package:SPL related Operating System: Mac OS X Mountain Lion PHP Version:master-Git-2012-12-11 (Git) Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. where the index.php is? Previous Comments: [2012-12-11 15:26:29] bobwei9 at hotmail dot com Description: When calling the index.php of a fresh MediaWiki (Version 1.18.0) install, PHP segfaults. I know, 1.18.0 is an old version, but it shouldn't crash . Test script: --- normal MediaWiki 1.18.0 install Expected result: No segmentation fault... Actual result: -- wiki root# gdb --args php index.php GNU gdb 6.3.50-20050815 (Apple version gdb-1821) (Fri Jun 29 16:14:03 UTC 2012) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries done (gdb) run Starting program: /usr/bin/php index.php Reading symbols for shared libraries +... done Reading symbols for shared libraries . done PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/debug-zts-20121204/apc.so' - dlopen(/usr/lib/php/extensions/debug-zts-20121204/apc.so, 9): Symbol not found: _apc_globals_id Referenced from: /usr/lib/php/extensions/debug-zts-20121204/apc.so Expected in: flat namespace in /usr/lib/php/extensions/debug-zts-20121204/apc.so in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/debug-zts-20121204/apc.so' - dlopen(/usr/lib/php/extensions/debug-zts-20121204/apc.so, 9): Symbol not found: _apc_globals_id Referenced from: /usr/lib/php/extensions/debug-zts-20121204/apc.so Expected in: flat namespace in /usr/lib/php/extensions/debug-zts-20121204/apc.so in Unknown on line 0 Reading symbols for shared libraries . done PHP Warning: PHP Startup: pthreads: Unable to initialize module Module compiled with module API=20121113 PHPcompiled with module API=20121204 These options need to match in Unknown on line 0 Warning: PHP Startup: pthreads: Unable to initialize module Module compiled with module API=20121113 PHPcompiled with module API=20121204 These options need to match in Unknown on line 0 PHP Notice: Undefined index: HTTP_HOST in /[...]/wiki/LocalSettings.php on line 44 Notice: Undefined index: HTTP_HOST in /[...]/wiki/LocalSettings.php on line 44 PHP Notice: Undefined index: REQUEST_METHOD in /[...]/wiki/includes/Setup.php on line 387 Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x000701f8 0x0001008fb936 in instanceof_function_ex (instance_ce=0x70008, ce=0x10264a818, interfaces_only=0 '\0', tsrm_ls=0x101710ed0) at zend_operators.c:1720 1720for (i=0; inum_interfaces; i++) { (gdb) bt #0 0x0001008fb936 in instanceof_function_ex (instance_ce=0x70008, ce=0x10264a818, interfaces_only=0 '\0', tsrm_ls=0x101710ed0) at zend_operators.c:1720 #1 0x0001008fb9e5 in instanceof_function (instance_ce=0x70008, ce=0x10264a818, tsrm_ls=0x101710ed0) at zend_operators.c:1740 #2 0x0001008fb919 in instanceof_function_ex (instance_ce=0x1025b8400, ce=0x10264a818, interfaces_only=0 '\0', tsrm_ls=0x101710ed0) at zend_operators.c:1721 #3 0x0001008fb9e5 in instanceof_function (instance_ce=0x1025b8400, ce=0x10264a818, tsrm_ls=0x101710ed0) at zend_operators.c:1740 #4 0x000100934457 in zend_call_method (object_pp=0x0, obj_ce=0x10264a818, fn_proxy=0x1026735d0, function_name=0x102673558 "autoloader::autoload", function_name_len=21, retval_ptr_ptr=0x7fff5fbfd698, param_count=1, arg1=0x1029fe810, arg2=0x0, tsrm_ls=0x101710ed0) at zend_
Bug #63732 [Nab]: unicode strings not handled correctly
Edit report at https://bugs.php.net/bug.php?id=63732&edit=1 ID: 63732 User updated by:jmichae3 at yahoo dot com Reported by:jmichae3 at yahoo dot com Summary:unicode strings not handled correctly Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: linux PHP Version:5.3.19 Block user comment: N Private report: N New Comment: this code might be moreuseful, I am going to give it to you. I know there is unicode-16 and unicode-32 and such. if the string can hanbdle stuff like that, there really should be an internal function for that which also handles this internally. because although this is useful and I can use it, it is a workaround rather than a real and complete solution for multiple encodings such as you would find listed with mb_list_encodings(). //returns ordinal value of character in string $str at $index //and increments $index past current utf-8 character. function utf8_ord_next_char($str, &$index) { $b0 = ord($str[$index + 0]); if ($b0 < 0x10) { $index++; return $b0; } $b1 = ord($str[$index + 1]); if ($b0 < 0xE0) { $index += 2; return (($b0 & 0x1F) << 6) + ($b1 & 0x3F); } $index += 3; return (($b0 & 0x0F) << 12) + (($b1 & 0x3F) << 6) + (ord($str[$index + 2]) & 0x3F); } so for detecting non-ascii languages, //detect foreign languages for ($i=0;$i < strlen($comment);) { if (utf8_ord_next_char($comment,$i) > 126) { echo "ERRORb"; return true; //error } } Previous Comments: [2012-12-12 02:38:50] ras...@php.net Personally I'd just convert from utf8 to iso-8959-1 or whichever encoding you are looking for here instead of checking each character. But if you really do want to do it, it isn't very hard. You just need to understand what UTF-8 looks like and it becomes a simple 5-line function in userspace: function utf8_ord($c) { $b0 = ord($c[0]); if($b0 < 0x10) return $b0; $b1 = ord($c[1]); if($b0 < 0xE0 )return (($b0 & 0x1F) << 6) + ($b1 & 0x3F); return (($b0 & 0x0F) << 12) + (($b1 & 0x3F) << 6) + (ord($c[2]) & 0x3F); } But you have to understand that there is absolutely no way to accurately detect the encoding of a short sequence of bytes. The above will work if you know the input is UTF-8. There is no way to write a magic function which will tell you the encoding from a couple of bytes of data which you seem to imply we should provide you. [2012-12-12 00:34:00] jmichae3 at yahoo dot com if you were to take the time to do the research, there is no function in PHP except ord() for converting a character [from a string] to a number. maybe strings need to be handled differently internally in php to handle UNICODE. or maybe ord simply needs to be rewritten so it works so matter what character encoding is thrown at it. it would be difficult, but extremely useful, since it is the only function. I took the time to look through the mb functions. there was nothing to help me. I tried looking through the mb functions, there wasn't a compare. there wasn't a way to compare. I consider a function like that to be crucial if relops are not safe or capable of doing it. if that is the case, please make one, and an mb function for returning the ordinal value of an mb char. the functionality is just not there. thanks. much appreciated. unicode/mb-related bug database stuff: https://bugs.php.net/bug.php?id=49439 https://bugs.php.net/bug.php?id=63732 just search the database for anything with mb_encode or unicode. there are a number of bugs related to this problem. [2012-12-11 22:22:24] ras...@php.net This is a bug reporting system. You reported a bug on a function that is behaving as intended and as documented. This is not a support forum. There are plenty of ways to do what you need. Start by reading about the mbstring functions. [2012-12-11 17:22:40] jmichae3 at yahoo dot com it may be documented behavior, but it still doesn't provide a solution to the problem. [2012-12-10 02:24:33] ahar...@php.net PHP strings are effectively byte arrays, and ord() only looks at the first byte. This is documented behaviour. 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=63732 -- Edit th
Bug #63732 [Nab]: unicode strings not handled correctly
Edit report at https://bugs.php.net/bug.php?id=63732&edit=1 ID: 63732 Updated by: ras...@php.net Reported by:jmichae3 at yahoo dot com Summary:unicode strings not handled correctly Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: linux PHP Version:5.3.19 Block user comment: N Private report: N New Comment: You have just slightly reformatted the code I gave you. Previous Comments: [2012-12-12 04:36:19] jmichae3 at yahoo dot com this code might be moreuseful, I am going to give it to you. I know there is unicode-16 and unicode-32 and such. if the string can hanbdle stuff like that, there really should be an internal function for that which also handles this internally. because although this is useful and I can use it, it is a workaround rather than a real and complete solution for multiple encodings such as you would find listed with mb_list_encodings(). //returns ordinal value of character in string $str at $index //and increments $index past current utf-8 character. function utf8_ord_next_char($str, &$index) { $b0 = ord($str[$index + 0]); if ($b0 < 0x10) { $index++; return $b0; } $b1 = ord($str[$index + 1]); if ($b0 < 0xE0) { $index += 2; return (($b0 & 0x1F) << 6) + ($b1 & 0x3F); } $index += 3; return (($b0 & 0x0F) << 12) + (($b1 & 0x3F) << 6) + (ord($str[$index + 2]) & 0x3F); } so for detecting non-ascii languages, //detect foreign languages for ($i=0;$i < strlen($comment);) { if (utf8_ord_next_char($comment,$i) > 126) { echo "ERRORb"; return true; //error } } [2012-12-12 02:38:50] ras...@php.net Personally I'd just convert from utf8 to iso-8959-1 or whichever encoding you are looking for here instead of checking each character. But if you really do want to do it, it isn't very hard. You just need to understand what UTF-8 looks like and it becomes a simple 5-line function in userspace: function utf8_ord($c) { $b0 = ord($c[0]); if($b0 < 0x10) return $b0; $b1 = ord($c[1]); if($b0 < 0xE0 )return (($b0 & 0x1F) << 6) + ($b1 & 0x3F); return (($b0 & 0x0F) << 12) + (($b1 & 0x3F) << 6) + (ord($c[2]) & 0x3F); } But you have to understand that there is absolutely no way to accurately detect the encoding of a short sequence of bytes. The above will work if you know the input is UTF-8. There is no way to write a magic function which will tell you the encoding from a couple of bytes of data which you seem to imply we should provide you. [2012-12-12 00:34:00] jmichae3 at yahoo dot com if you were to take the time to do the research, there is no function in PHP except ord() for converting a character [from a string] to a number. maybe strings need to be handled differently internally in php to handle UNICODE. or maybe ord simply needs to be rewritten so it works so matter what character encoding is thrown at it. it would be difficult, but extremely useful, since it is the only function. I took the time to look through the mb functions. there was nothing to help me. I tried looking through the mb functions, there wasn't a compare. there wasn't a way to compare. I consider a function like that to be crucial if relops are not safe or capable of doing it. if that is the case, please make one, and an mb function for returning the ordinal value of an mb char. the functionality is just not there. thanks. much appreciated. unicode/mb-related bug database stuff: https://bugs.php.net/bug.php?id=49439 https://bugs.php.net/bug.php?id=63732 just search the database for anything with mb_encode or unicode. there are a number of bugs related to this problem. [2012-12-11 22:22:24] ras...@php.net This is a bug reporting system. You reported a bug on a function that is behaving as intended and as documented. This is not a support forum. There are plenty of ways to do what you need. Start by reading about the mbstring functions. [2012-12-11 17:22:40] jmichae3 at yahoo dot com it may be documented behavior, but it still doesn't provide a solution to the problem. 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=63732 -- Edit this bug report at https://bugs.php.net/bug.php?id=63732&ed
[PHP-BUG] Bug #63749 [NEW]: cotebo...@homail.com
From: cotebonet at homail dot com Operating system: cotebo...@homail.com PHP version: 5.5.0alpha1 Package: Testing related Bug Type: Bug Bug description:cotebo...@homail.com Description: cotecross cjdnnnccd ieeer rrufnl Test script: ---
Bug #63749 [Opn->Spm]: cotebo...@homail.com
Edit report at https://bugs.php.net/bug.php?id=63749&edit=1 ID: 63749 Updated by: s...@php.net Reported by:cotebonet at homail dot com Summary:cotebo...@homail.com -Status: Open +Status: Spam Type: Bug Package:Testing related Operating System: cotebo...@homail.com PHP Version:5.5.0alpha1 Block user comment: N Private report: N Previous Comments: [2012-12-12 05:14:03] cotebonet at homail dot com Description: cotecross cjdnnnccd ieeer rrufnl Test script: --- 000
Req #63745 [Com]: Var_dump on null characters
Edit report at https://bugs.php.net/bug.php?id=63745&edit=1 ID: 63745 Comment by: jesper dot hag at gmail dot com Reported by:jesper dot hag at gmail dot com Summary:Var_dump on null characters Status: Not a bug Type: Feature/Change Request Package:Variables related Operating System: CentOS PHP Version:5.3Git-2012-12-11 (Git) Block user comment: N Private report: N New Comment: Thanks for your input! Never thought of var_export() but of course that does exactly what I was looking for. Previous Comments: [2012-12-12 01:40:59] ahar...@php.net var_dump() dumps the contents of the string as is, so the null byte is literally a null byte in the output. If you run your test script through hexdump, you get this: adamh@swiftdesk7:~$ php /tmp/test.php | hexdump -C 73 74 72 69 6e 67 28 36 29 20 22 00 32 33 34 35 |string(6) ".2345| 0010 36 22 0a |6".| 0013 You can see the null byte in the output. What you probably want instead of var_export(), which will escape non-printable characters: for instance, your test string is exported as: '' . "\0" . '23456' [2012-12-11 19:04:19] jesper dot hag at gmail dot com Description: *Note* My PHP version is actually 5.3.3 The problem I've come up to is that printing a string with var_dump (for debugging purpose eg.) that contains null-characters are counted in the string length but are not in any way displayed in the var_dump output. I'm not sure this should be considerate a bug or a feature request because it is something I want and perhaps not something that per design should be in this way. Test script: --- Expected result: I would expect the above script to output something like string(6) "\0123456", that - in my world - would make more sense. -- Edit this bug report at https://bugs.php.net/bug.php?id=63745&edit=1
Bug #63732 [Com]: unicode strings not handled correctly
Edit report at https://bugs.php.net/bug.php?id=63732&edit=1 ID: 63732 Comment by: jmichae3 at yahoo dot com Reported by:jmichae3 at yahoo dot com Summary:unicode strings not handled correctly Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: linux PHP Version:5.3.19 Block user comment: N Private report: N New Comment: something is wrong with the code you gave me. it doesn't work. also, it doesn't follow Ken Thompson's table shown below in URL in comment. there are any other reference documents (wikipedia). one thing I discovered about this code is that: - the page must be encoded as UTF-8 without BOM (such as using notepad++, Encoding, Convert to utf8 without BOM. - you must also include a meta tag better coded utf-8 only version and one that actually works: (and by the way, this works with ascii too) //returns ordinal value of character in string $str at $index //and increments $index past current utf-8 character. //based on the table at http://doc.cat-v.org/bell_labs/utf-8_history function utf8_ord_next_char($str, &$index) { if ($index+1 <= strlen($str) && 0x80 == 0x80 & ord($str[$index + 0]) ) { $result = (ord($str[$index+0])&0x7f) ; $index += 1; return $result; } else if ($index+2 <= strlen($str) && 0xc0 == 0xe0 & ord($str[$index + 0]) && 0x80 == 0xc0 & ord($str[$index + 1]) ) { $result = (ord($str[$index+0])&0x1f) + (ord($str[$index+1])&0x3f) ; $index += 2; return $result; } else if ($index+3 <= strlen($str) && 0xe0 == 0xf0 & ord($str[$index + 0])) { && 0x80 == 0xc0 & ord($str[$index + 1]) && 0x80 == 0xc0 & ord($str[$index + 2]) ) { $result = (ord($str[$index+0])&0x0f) + (ord($str[$index+1])&0x3f) + (ord($str[$index+2])&0x3f) ; $index += 3; return $result; } else if ($index+4 <= strlen($str) && 0xf0 == 0xf8 & ord($str[$index + 0])) { && 0x80 == 0xc0 & ord($str[$index + 1]) && 0x80 == 0xc0 & ord($str[$index + 2]) && 0x80 == 0xc0 & ord($str[$index + 3]) ) { $result = (ord($str[$index+0])&0x07) + (ord($str[$index+1])&0x3f) + (ord($str[$index+2])&0x3f) + (ord($str[$index+3])&0x3f) ; $index += 4; return $result; } else if ($index+5 <= strlen($str) && 0xf8 == 0xfc & ord($str[$index + 0])) { && 0x80 == 0xc0 & ord($str[$index + 1]) && 0x80 == 0xc0 & ord($str[$index + 2]) && 0x80 == 0xc0 & ord($str[$index + 3]) && 0x80 == 0xc0 & ord($str[$index + 4]) ) { $result = (ord($str[$index+0])&0x03) + (ord($str[$index+1])&0x3f) + (ord($str[$index+2])&0x3f) + (ord($str[$index+3])&0x3f) + (ord($str[$index+4])&0x3f) ; $index += 5; return $result; } else if ($index+6 <= strlen($str) && 0xfc == 0xfe & ord($str[$index + 0])) { && 0x80 == 0xc0 & ord($str[$index + 1]) && 0x80 == 0xc0 & ord($str[$index + 2]) && 0x80 == 0xc0 & ord($str[$index + 3]) && 0x80 == 0xc0 & ord($str[$index + 4]) && 0x80 == 0xc0 & ord($str[$index + 5]) ) { $result = (ord($str[$index+0])&0x01) + (ord($str[$index+1])&0x3f) + (ord($str[$index+2])&0x3f) + (ord($str[$index+3])&0x3f) + (ord($str[$index+4])&0x3f) + (ord($str[$index+5])&0x3f) ; $index += 6; return $result; } //unknown case $result = ord($str[$index+0]); $index++; return $result; } Previous Comments: [2012-12-12 04:49:07] ras...@php.net You have just slightly reformatted the code I gave you. [2012-12-12 04:36:19] jmichae3 at yahoo dot com this code might be moreuseful, I am going to give it to you. I know there is unicode-16 and unicode-32 and such. if the string can hanbdle stuff like that,
Bug #63748 [Opn->Fbk]: error: 'struct fpm_scoreboard_s' has no member named 'lock'
Edit report at https://bugs.php.net/bug.php?id=63748&edit=1 ID: 63748 Updated by: larue...@php.net Reported by:xuefer at gmail dot com Summary:error: 'struct fpm_scoreboard_s' has no member named 'lock' -Status: Open +Status: Feedback Type: Bug Package:FPM related Operating System: linux PHP Version:5.4.9 Block user comment: N Private report: N New Comment: according to : http://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html#Unnamed- Fields I think you need "-fms-extensions" thanks Previous Comments: [2012-12-12 03:40:21] xuefer at gmail dot com Description: CFLAGS='-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic' "CFLAGS=-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" "CXXFLAGS=-pipe - Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" ../php5/configure --disable-pear -- enable-debug --enable-maintainer-zts --enable-experimental-zts --enable-fpm -- enable-cgi --enable-fastcgi --enable-fastcgi --enable-force-cgi-redirect --with- pcre-regex --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd -- with- openssl --with-posix --with-iconv --enable-sockets --enable-inline-optimization -- disable-mbregex --enable-bcmath --enable-pcntl --enable-memory-limit --enable- ftp --enable-event --with-mysql=/usr --enable-mmap --enable-mbstring --with-readline - -with-xmlrpc --enable-soap --with-sqlite --enable-sqlite-utf8 --with- mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr --prefix=/home/moo/test/php5- debug-zts --cache-file=config.cache make Actual result: -- /home/moo/src/php/php5-debug-zts/meta_ccld -I/home/moo/src/php/php5/sapi/fpm - Isapi/fpm/ -I/home/moo/src/php/php5/sapi/fpm/ -DPHP_ATOM_INC - I/home/moo/src/php/php5-debug-zts/include -I/home/moo/src/php/php5-debug- zts/main -I/home/moo/src/php/php5 -I/home/moo/src/php/php5-debug- zts/ext/date/lib -I/home/moo/src/php/php5/ext/date/lib - I/home/moo/src/php/php5/ext/ereg/regex -I/usr/include/libxml2 - I/home/moo/src/php/php5/ext/mbstring/libmbfl -I/home/moo/src/php/php5-debug- zts/ext/mbstring/libmbfl -I/home/moo/src/php/php5/ext/mbstring/libmbfl/mbfl - I/home/moo/src/php/php5-debug-zts/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/home/moo/src/php/php5/ext/sqlite3/libsqlite -I/home/moo/src/php/php5-debug- zts/TSRM -I/home/moo/src/php/php5-debug-zts/Zend -I/home/moo/src/php/php5/main - I/home/moo/src/php/php5/Zend -I/home/moo/src/php/php5/TSRM - I/home/moo/src/php/php5-debug-zts/ -D_REENTRANT -I/usr/include -pipe -Wall - std=c99 -D_GNU_SOURCE -pedantic -g -fvisibility=hidden -pthread -O0 -Wall -DZTS -c /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c -o sapi/fpm/fpm/fpm_scoreboard.o In file included from /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:11:0: /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:24:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:53:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_update': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:87:26: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:146:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:187:22: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_release': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:199:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_proc_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:211:25: error: 'struct fpm_scoreboard_proc_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_proc_release': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:225:6: error: 'struct fpm_scoreboard_proc_s' has no member named 'lock' -- Edit this bug report at https://bugs.php.net/bug.php?id=63748&edit=1
Bug #63748 [PATCH]: error: 'struct fpm_scoreboard_s' has no member named 'lock'
Edit report at https://bugs.php.net/bug.php?id=63748&edit=1 ID: 63748 Patch added by: larue...@php.net Reported by:xuefer at gmail dot com Summary:error: 'struct fpm_scoreboard_s' has no member named 'lock' Status: Feedback Type: Bug Package:FPM related Operating System: linux PHP Version:5.4.9 Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug63748.patch Revision: 1355295290 URL: https://bugs.php.net/patch-display.php?bug=63748&patch=bug63748.patch&revision=1355295290 Previous Comments: [2012-12-12 06:46:55] larue...@php.net according to : http://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html#Unnamed- Fields I think you need "-fms-extensions" thanks [2012-12-12 03:40:21] xuefer at gmail dot com Description: CFLAGS='-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic' "CFLAGS=-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" "CXXFLAGS=-pipe - Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" ../php5/configure --disable-pear -- enable-debug --enable-maintainer-zts --enable-experimental-zts --enable-fpm -- enable-cgi --enable-fastcgi --enable-fastcgi --enable-force-cgi-redirect --with- pcre-regex --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd -- with- openssl --with-posix --with-iconv --enable-sockets --enable-inline-optimization -- disable-mbregex --enable-bcmath --enable-pcntl --enable-memory-limit --enable- ftp --enable-event --with-mysql=/usr --enable-mmap --enable-mbstring --with-readline - -with-xmlrpc --enable-soap --with-sqlite --enable-sqlite-utf8 --with- mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr --prefix=/home/moo/test/php5- debug-zts --cache-file=config.cache make Actual result: -- /home/moo/src/php/php5-debug-zts/meta_ccld -I/home/moo/src/php/php5/sapi/fpm - Isapi/fpm/ -I/home/moo/src/php/php5/sapi/fpm/ -DPHP_ATOM_INC - I/home/moo/src/php/php5-debug-zts/include -I/home/moo/src/php/php5-debug- zts/main -I/home/moo/src/php/php5 -I/home/moo/src/php/php5-debug- zts/ext/date/lib -I/home/moo/src/php/php5/ext/date/lib - I/home/moo/src/php/php5/ext/ereg/regex -I/usr/include/libxml2 - I/home/moo/src/php/php5/ext/mbstring/libmbfl -I/home/moo/src/php/php5-debug- zts/ext/mbstring/libmbfl -I/home/moo/src/php/php5/ext/mbstring/libmbfl/mbfl - I/home/moo/src/php/php5-debug-zts/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/home/moo/src/php/php5/ext/sqlite3/libsqlite -I/home/moo/src/php/php5-debug- zts/TSRM -I/home/moo/src/php/php5-debug-zts/Zend -I/home/moo/src/php/php5/main - I/home/moo/src/php/php5/Zend -I/home/moo/src/php/php5/TSRM - I/home/moo/src/php/php5-debug-zts/ -D_REENTRANT -I/usr/include -pipe -Wall - std=c99 -D_GNU_SOURCE -pedantic -g -fvisibility=hidden -pthread -O0 -Wall -DZTS -c /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c -o sapi/fpm/fpm/fpm_scoreboard.o In file included from /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:11:0: /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:24:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:53:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_update': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:87:26: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:146:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:187:22: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_release': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:199:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_proc_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:211:25: error: 'struct fpm_scoreboard_proc_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_proc_release': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:225:6: error: 'struct fpm_scoreboard_proc_s' has no member named 'lock' -- Edit this bug report at https://bugs.php.net/bug.php?id=63748&edit=1
Bug #63748 [Fbk]: error: 'struct fpm_scoreboard_s' has no member named 'lock'
Edit report at https://bugs.php.net/bug.php?id=63748&edit=1 ID: 63748 Updated by: larue...@php.net Reported by:xuefer at gmail dot com Summary:error: 'struct fpm_scoreboard_s' has no member named 'lock' Status: Feedback Type: Bug Package:FPM related Operating System: linux PHP Version:5.4.9 Block user comment: N Private report: N New Comment: anyway, I think using anonymous union in struct is not very good idea, a patch attached. Previous Comments: [2012-12-12 06:54:50] larue...@php.net The following patch has been added/updated: Patch Name: bug63748.patch Revision: 1355295290 URL: https://bugs.php.net/patch-display.php?bug=63748&patch=bug63748.patch&revision=1355295290 [2012-12-12 06:46:55] larue...@php.net according to : http://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html#Unnamed- Fields I think you need "-fms-extensions" thanks [2012-12-12 03:40:21] xuefer at gmail dot com Description: CFLAGS='-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic' "CFLAGS=-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" "CXXFLAGS=-pipe - Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" ../php5/configure --disable-pear -- enable-debug --enable-maintainer-zts --enable-experimental-zts --enable-fpm -- enable-cgi --enable-fastcgi --enable-fastcgi --enable-force-cgi-redirect --with- pcre-regex --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd -- with- openssl --with-posix --with-iconv --enable-sockets --enable-inline-optimization -- disable-mbregex --enable-bcmath --enable-pcntl --enable-memory-limit --enable- ftp --enable-event --with-mysql=/usr --enable-mmap --enable-mbstring --with-readline - -with-xmlrpc --enable-soap --with-sqlite --enable-sqlite-utf8 --with- mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr --prefix=/home/moo/test/php5- debug-zts --cache-file=config.cache make Actual result: -- /home/moo/src/php/php5-debug-zts/meta_ccld -I/home/moo/src/php/php5/sapi/fpm - Isapi/fpm/ -I/home/moo/src/php/php5/sapi/fpm/ -DPHP_ATOM_INC - I/home/moo/src/php/php5-debug-zts/include -I/home/moo/src/php/php5-debug- zts/main -I/home/moo/src/php/php5 -I/home/moo/src/php/php5-debug- zts/ext/date/lib -I/home/moo/src/php/php5/ext/date/lib - I/home/moo/src/php/php5/ext/ereg/regex -I/usr/include/libxml2 - I/home/moo/src/php/php5/ext/mbstring/libmbfl -I/home/moo/src/php/php5-debug- zts/ext/mbstring/libmbfl -I/home/moo/src/php/php5/ext/mbstring/libmbfl/mbfl - I/home/moo/src/php/php5-debug-zts/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/home/moo/src/php/php5/ext/sqlite3/libsqlite -I/home/moo/src/php/php5-debug- zts/TSRM -I/home/moo/src/php/php5-debug-zts/Zend -I/home/moo/src/php/php5/main - I/home/moo/src/php/php5/Zend -I/home/moo/src/php/php5/TSRM - I/home/moo/src/php/php5-debug-zts/ -D_REENTRANT -I/usr/include -pipe -Wall - std=c99 -D_GNU_SOURCE -pedantic -g -fvisibility=hidden -pthread -O0 -Wall -DZTS -c /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c -o sapi/fpm/fpm/fpm_scoreboard.o In file included from /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:11:0: /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:24:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:53:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_update': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:87:26: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:146:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:187:22: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_release': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:199:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_proc_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:211:25: error: 'struct fpm_scoreboard_proc_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_proc_release': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:225:6: error: 'struct fpm_scoreboard_proc_s' has no member named 'lock' -- Edit this bug report at https://bugs.php.net/bug.php?id=63748&edit=1
Bug #63748 [PATCH]: error: 'struct fpm_scoreboard_s' has no member named 'lock'
Edit report at https://bugs.php.net/bug.php?id=63748&edit=1 ID: 63748 Patch added by: larue...@php.net Reported by:xuefer at gmail dot com Summary:error: 'struct fpm_scoreboard_s' has no member named 'lock' Status: Feedback Type: Bug Package:FPM related Operating System: linux PHP Version:5.4.9 Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug63748.patch Revision: 1355295419 URL: https://bugs.php.net/patch-display.php?bug=63748&patch=bug63748.patch&revision=1355295419 Previous Comments: [2012-12-12 06:55:45] larue...@php.net anyway, I think using anonymous union in struct is not very good idea, a patch attached. [2012-12-12 06:54:50] larue...@php.net The following patch has been added/updated: Patch Name: bug63748.patch Revision: 1355295290 URL: https://bugs.php.net/patch-display.php?bug=63748&patch=bug63748.patch&revision=1355295290 [2012-12-12 06:46:55] larue...@php.net according to : http://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html#Unnamed- Fields I think you need "-fms-extensions" thanks [2012-12-12 03:40:21] xuefer at gmail dot com Description: CFLAGS='-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic' "CFLAGS=-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" "CXXFLAGS=-pipe - Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" ../php5/configure --disable-pear -- enable-debug --enable-maintainer-zts --enable-experimental-zts --enable-fpm -- enable-cgi --enable-fastcgi --enable-fastcgi --enable-force-cgi-redirect --with- pcre-regex --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd -- with- openssl --with-posix --with-iconv --enable-sockets --enable-inline-optimization -- disable-mbregex --enable-bcmath --enable-pcntl --enable-memory-limit --enable- ftp --enable-event --with-mysql=/usr --enable-mmap --enable-mbstring --with-readline - -with-xmlrpc --enable-soap --with-sqlite --enable-sqlite-utf8 --with- mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr --prefix=/home/moo/test/php5- debug-zts --cache-file=config.cache make Actual result: -- /home/moo/src/php/php5-debug-zts/meta_ccld -I/home/moo/src/php/php5/sapi/fpm - Isapi/fpm/ -I/home/moo/src/php/php5/sapi/fpm/ -DPHP_ATOM_INC - I/home/moo/src/php/php5-debug-zts/include -I/home/moo/src/php/php5-debug- zts/main -I/home/moo/src/php/php5 -I/home/moo/src/php/php5-debug- zts/ext/date/lib -I/home/moo/src/php/php5/ext/date/lib - I/home/moo/src/php/php5/ext/ereg/regex -I/usr/include/libxml2 - I/home/moo/src/php/php5/ext/mbstring/libmbfl -I/home/moo/src/php/php5-debug- zts/ext/mbstring/libmbfl -I/home/moo/src/php/php5/ext/mbstring/libmbfl/mbfl - I/home/moo/src/php/php5-debug-zts/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/home/moo/src/php/php5/ext/sqlite3/libsqlite -I/home/moo/src/php/php5-debug- zts/TSRM -I/home/moo/src/php/php5-debug-zts/Zend -I/home/moo/src/php/php5/main - I/home/moo/src/php/php5/Zend -I/home/moo/src/php/php5/TSRM - I/home/moo/src/php/php5-debug-zts/ -D_REENTRANT -I/usr/include -pipe -Wall - std=c99 -D_GNU_SOURCE -pedantic -g -fvisibility=hidden -pthread -O0 -Wall -DZTS -c /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c -o sapi/fpm/fpm/fpm_scoreboard.o In file included from /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:11:0: /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:24:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:53:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_update': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:87:26: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:146:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:187:22: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_release': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:199:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_proc_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:211:25: error: 'struct fpm_scoreboard_proc_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function
Bug #63748 [Com]: error: 'struct fpm_scoreboard_s' has no member named 'lock'
Edit report at https://bugs.php.net/bug.php?id=63748&edit=1 ID: 63748 Comment by: xuefer at gmail dot com Reported by:xuefer at gmail dot com Summary:error: 'struct fpm_scoreboard_s' has no member named 'lock' Status: Feedback Type: Bug Package:FPM related Operating System: linux PHP Version:5.4.9 Block user comment: N Private report: N New Comment: -fms-extensions make it works. regarding to your patch: there maybe a space missing in "}u" (expected to be "} u" Previous Comments: [2012-12-12 06:56:59] larue...@php.net The following patch has been added/updated: Patch Name: bug63748.patch Revision: 1355295419 URL: https://bugs.php.net/patch-display.php?bug=63748&patch=bug63748.patch&revision=1355295419 [2012-12-12 06:55:45] larue...@php.net anyway, I think using anonymous union in struct is not very good idea, a patch attached. [2012-12-12 06:54:50] larue...@php.net The following patch has been added/updated: Patch Name: bug63748.patch Revision: 1355295290 URL: https://bugs.php.net/patch-display.php?bug=63748&patch=bug63748.patch&revision=1355295290 [2012-12-12 06:46:55] larue...@php.net according to : http://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html#Unnamed- Fields I think you need "-fms-extensions" thanks [2012-12-12 03:40:21] xuefer at gmail dot com Description: CFLAGS='-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic' "CFLAGS=-pipe -Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" "CXXFLAGS=-pipe - Wall -std=c99 -D_GNU_SOURCE -pedantic -O0 -g" ../php5/configure --disable-pear -- enable-debug --enable-maintainer-zts --enable-experimental-zts --enable-fpm -- enable-cgi --enable-fastcgi --enable-fastcgi --enable-force-cgi-redirect --with- pcre-regex --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd -- with- openssl --with-posix --with-iconv --enable-sockets --enable-inline-optimization -- disable-mbregex --enable-bcmath --enable-pcntl --enable-memory-limit --enable- ftp --enable-event --with-mysql=/usr --enable-mmap --enable-mbstring --with-readline - -with-xmlrpc --enable-soap --with-sqlite --enable-sqlite-utf8 --with- mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr --prefix=/home/moo/test/php5- debug-zts --cache-file=config.cache make Actual result: -- /home/moo/src/php/php5-debug-zts/meta_ccld -I/home/moo/src/php/php5/sapi/fpm - Isapi/fpm/ -I/home/moo/src/php/php5/sapi/fpm/ -DPHP_ATOM_INC - I/home/moo/src/php/php5-debug-zts/include -I/home/moo/src/php/php5-debug- zts/main -I/home/moo/src/php/php5 -I/home/moo/src/php/php5-debug- zts/ext/date/lib -I/home/moo/src/php/php5/ext/date/lib - I/home/moo/src/php/php5/ext/ereg/regex -I/usr/include/libxml2 - I/home/moo/src/php/php5/ext/mbstring/libmbfl -I/home/moo/src/php/php5-debug- zts/ext/mbstring/libmbfl -I/home/moo/src/php/php5/ext/mbstring/libmbfl/mbfl - I/home/moo/src/php/php5-debug-zts/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/home/moo/src/php/php5/ext/sqlite3/libsqlite -I/home/moo/src/php/php5-debug- zts/TSRM -I/home/moo/src/php/php5-debug-zts/Zend -I/home/moo/src/php/php5/main - I/home/moo/src/php/php5/Zend -I/home/moo/src/php/php5/TSRM - I/home/moo/src/php/php5-debug-zts/ -D_REENTRANT -I/usr/include -pipe -Wall - std=c99 -D_GNU_SOURCE -pedantic -g -fvisibility=hidden -pthread -O0 -Wall -DZTS -c /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c -o sapi/fpm/fpm/fpm_scoreboard.o In file included from /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:11:0: /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:24:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.h:53:3: warning: declaration does not declare anything /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_update': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:87:26: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:146:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_acquire': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:187:22: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: In function 'fpm_scoreboard_release': /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c:199:12: error: 'struct fpm_scoreboard_s' has no member named 'lock' /home/moo/src/php/php5/sapi/fpm/fpm/fpm_scoreboard.c: