#46934 [NEW]: Unable to untighten open_basedir restriction
From: kristof dot coomans at telenet dot be Operating system: Windows XP PHP version: 5.3CVS-2008-12-23 (snap) PHP Bug Type: Safe Mode/open_basedir Bug description: Unable to untighten open_basedir restriction Description: I'm testing the new feature introduced lately, namely tightening the open_basedir setting. This might be a very good security measure, to prevent relative directory traversal exploits. However, sometimes it is useful to tighten the path only for certain code, and untighten it again afterward to its original value. This doesn't seem to work currently. Reproduce code: --- ?php // original open_basedir value echo ini_get( 'open_basedir' ) . PHP_EOL; $newBaseDir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR; ini_set( 'open_basedir', $newBaseDir ); // new tightened open_basedir value echo ini_get( 'open_basedir' ) . PHP_EOL; // this will fail, as intended, because of the open_basedir restriction file_put_contents( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'test.txt', 'test 123 456' ); ini_restore( 'open_basedir' ); // original open_basedir value again echo ini_get( 'open_basedir' ) . PHP_EOL; // this will stail fail, not intended file_put_contents( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'test.txt', 'test 123 456' ); ? Expected result: The last call should be allowed, and a file test.txt should have been created in the same directory as the script. Actual result: -- Warning: file_put_contents(): open_basedir restriction in effect. File(C:\sites\ trunk\test.txt) is not within the allowed path(s): (#9617;#948;รง#9786;#9792;) in ... Warning: file_put_contents(C:\sites\trunk\test.txt): failed to open stream: Operation not permitted in ... -- Edit bug report at http://bugs.php.net/?id=46934edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46934r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46934r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46934r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46934r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46934r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46934r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46934r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46934r=needscript Try newer version: http://bugs.php.net/fix.php?id=46934r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46934r=support Expected behavior: http://bugs.php.net/fix.php?id=46934r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46934r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46934r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46934r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46934r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=46934r=dst IIS Stability: http://bugs.php.net/fix.php?id=46934r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46934r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46934r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46934r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46934r=mysqlcfg
#46677 [Com]: Can not make install php5.2.6
ID: 46677 Comment by: chunhuan dot pan at alcatel-sbell dot com dot cn Reported By: chunhuan dot pan at alcatel-sbell dot com dot cn Status: No Feedback Bug Type: Compile Failure Operating System: HP-UX 11.23 PHP Version: 5.2.6 New Comment: Hello guys : Thank you for your greate help on this issues. For server migration is an urgent time ,and this problem broke me too much time ,so ,I take a new server with solaris OS to instead of. So ,from now ,I lost the permission to keep tracking on this coredump. Shall I close this ER? Previous Comments: [2008-12-17 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. [2008-12-09 10:28:02] j...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-12-09 01:36:30] chunhuan dot pan at alcatel-sbell dot com dot cn Hello jani: See my backtrace below: --- (gdb) bt #0 0x2330 in unknown_procedure () warning: Attempting to unwind past bad PC 0x2330 #1 0x6f7269675f76616c in unknown_procedure () (gdb) --- PS: To get a best test ,could you show me the test source ,steps ,I am not very clearly how to get a best backtrace to help you solve the error! Thx a lot ,:-) [2008-12-08 12:32:25] j...@php.net Now, can you please provide the requested _backtrace_ finally? In gdb using command 'bt'.. [2008-12-04 01:57:58] chunhuan dot pan at alcatel-sbell dot com dot cn Trace No.2 Step 1: bash-3.2# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --enable-debug Step 2: bash-3.2# make Step 3: bash-3.2# make test begin chunhuap*** = EXPECTED FAILED TEST SUMMARY - SPL: ArrayObject::__construct basic usage with ArrayObject::ARRAY_AS_PROPS. [ext/spl/tests/arrayObject___construct_basic4.phpt] SPL: ArrayObject::__construct basic usage with ArrayObject::STD_PROP_LIST|ArrayObject::ARRAY_AS_PROPS. [ext/spl/tests/arrayObject___construct_basic5.phpt] SPL: ArrayObject::exchangeArray() basic usage with object as underlying data store. [ext/spl/tests/arrayObject_exchangeArray_basic3.phpt] SPL: ArrayObject::setFlags basic usage with ArrayObject::ARRAY_AS_PROPS. [ext/spl/tests/arrayObject_setFlags_basic1.phpt] = You may have found a problem in PHP. We would like to send this report automatically to the PHP QA team, to give us a better understanding of how the test cases are doing. If you don't want to send it immediately, you can choose s to save the report to a file that you can send us later. Do you want to send this report now? [Yns]: end chunhuap*** Step 4: bash-3.2# make install Begin chunhuap*** Installing PHP SAPI module: apache2handler /usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules /usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/ cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la cp .libs/libphp5.a /usr/local/apache2/modules/libphp5.a ranlib /usr/local/apache2/modules/libphp5.a chmod 644 /usr/local/apache2/modules/libphp5.a libtool: install: warning: remember to run `libtool --finish /opt/pkg_list/php5.2-200811272330/libs' Warning! dlname not found in /usr/local/apache2/modules/libphp5.la. Assuming installing a .so rather than a libtool archive. chmod 755 /usr/local/apache2/modules/libphp5.so [activating module `php5' in /usr/local/apache2/conf/httpd.conf] Installing PHP CLI binary:/usr/local/php/bin/ Installing PHP CLI man page: /usr/local/php/man/man1/ Installing build environment: /usr/local/php/lib/php/build/ Installing header files: /usr/local/php/include/php/ Installing helper programs: /usr/local/php/bin/ program: phpize program: php-config Installing man pages: /usr/local/php/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment:
#46893 [Com]: extract($foo) crashes if $foo['foo'] exists
ID: 46893 Comment by: matthieu at brunet-prod dot com Reported By: steffen dot weber at gmail dot com Status: Verified Bug Type: Reproducible crash Operating System: * PHP Version: 5CVS, 6CVS (2008-12-18) New Comment: Same error here (5.2.8), but only if the array name is longer than 4 cars. So the supplied code works for me, but : $f = array('f' = 1, 'bar' = 2, 'test' = 3); will crash. And it will crash only if there is one or more element after the element with the same name of the array. So $f = array('f' = 1, 'bar' = 2); will crash, but $f = array('bar' = 1, 'f' = 2); will work. hth Previous Comments: [2008-12-18 13:44:14] crrodriguez at opensuse dot org Related to/Duplicated of Bug #46873 ? [2008-12-18 12:25:40] j...@php.net It fails silently because it crashes. :) #0 0x083437ad in _zend_is_inconsistent (ht=0x1, file=0x85ffca4 /home/jani/src/php-5.2/Zend/zend_hash.c, line=1083) at /home/jani/src/php-5.2/Zend/zend_hash.c:53 #1 0x083465be in zend_hash_move_forward_ex (ht=0x1, pos=0xbfffcd98) at /home/jani/src/php-5.2/Zend/zend_hash.c:1083 #2 0x082435a0 in zif_extract (ht=1, return_value=0x86e16f8, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /home/jani/src/php-5.2/ext/standard/array.c:1491 #3 0x0835e8bf in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffcfa8) at /home/jani/src/php-5.2/Zend/zend_vm_execute.h:200 #4 0x083641f9 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbfffcfa8) at /home/jani/src/php-5.2/Zend/zend_vm_execute.h:1729 #5 0x0835e43c in execute (op_array=0x86e1088) at /home/jani/src/php-5.2/Zend/zend_vm_execute.h:92 #6 0x083397aa in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/jani/src/php-5.2/Zend/zend.c:1134 #7 0x082e831a in php_execute_script (primary_file=0xb324) at /home/jani/src/php-5.2/main/main.c:2023 #8 0x083b4bc9 in main (argc=2, argv=0xb464) at /home/jani/src/php-5.2/sapi/cli/php_cli.c:1133 [2008-12-17 23:06:57] steffen dot weber at gmail dot com Description: Execute the following script and observe that $bar is set to a random integer (*). Furthermore $test is not set at all. This problem did not occur with PHP 5.2.6. (*) Could this have security implications? Reproduce code: --- ?php $foo = array('foo' = 1, 'bar' = 2, 'test' = 3); extract($foo); var_dump($foo, $bar, $test); ? Expected result: int(1) int(2) int(3) Actual result: -- Notice: Undefined variable: test in extract-bug.php on line 4 int(1) int(RANDOM_NUMBER) NULL -- Edit this bug report at http://bugs.php.net/?id=46893edit=1
#45989 [Com]: json_decode() passes through certain invalid JSON strings
ID: 45989 Comment by: bruno dot p dot reis at gmail dot com Reported By: steven at acko dot net Status: To be documented Bug Type: JSON related Operating System: Mac OS X PHP Version: 5.2.6 New Comment: I agree with kevin at metalaxe dot com, throwing an exception (may be even a InvalidArgumentException) on malformed json would be a much more decent way to say the json is invalid and would clarify a lot the behaviour. Other good thing would be another function just to check if a json is valid or not. Previous Comments: [2008-12-12 23:21:57] scott...@php.net Applied the patch provided by magicaltux [2008-12-12 07:51:16] kevin at metalaxe dot com The JSON spec states: A JSON text is a sequence of tokens. The set of tokens includes six structural characters, strings, numbers, and three literal names. A JSON text is a serialized object or array. So, in order to maintain compliance, PHP must also support non-objects/arrays as input properly. If I understand your patch correctly: If the input is json_decode(null); the output would be NULL (I saw no test case for null input in the patch itself). We would have no way of knowing a problem exists if one were to have an input of json_decode('[');. Can't this function throw an exception on failure? Failing that,could we at least get a PHP warning? Otherwise it will be impossible to full rely on this function in the case where null is the actual input... [2008-12-03 22:29:58] magical...@php.net And here are patches against PHP_5_3 and HEAD: http://ookoo.org/svn/snip/php_5_3-json-returntype-final-fix.patch http://ookoo.org/svn/snip/php_head-json-returntype-final-fix.patch Some tests now work on json on HEAD (less failure than what's currently displayed on gcov.php.net) but still two fails. As those failures are not within the scope of this bug (and are specific to HEAD) they be fixed in different patches. I believe that once this is commited to the CVS, this bug should be marked as To be documented. I also believe till wants to submit some additional tests for those this issue... [2008-12-03 21:17:33] magical...@php.net Just a note for documentation: http://docs.php.net/json_decode Right now the documentation says the function returns an object, OR an array. This is not strictly true as it may return a string, a boolean, an integer, a double... depending on the input. Also, the fact json_decode() may return NULL on error isn't explicitly documented either, instead some examples which happens to return NULL with the current implementation are provided. I think it would be a good idea to explicitly document this behavior, if the change I'm proposing here is accepted. [2008-12-03 21:10:50] magical...@php.net Ok guys, I've had a look at the CVS history for json, and checked why it was following this weird behaviour (returning what was passed in some cases, and NULL in other cases). The CVS commit log message for this relates to bug #38680, however it seems that the behaviour in parsing strings not handled by json is doing too much to try to fix things and find a way to provide parsed value. Anyway here's a patch that changes this behaviour to make json_decode() return NULL when we get invalid JSON data, while still keeping null, true, false and integers parsing. Some tests were fixed (the result depended on broken behaviour), and the other tests still run fine. The patch itself, against PHP_5_2: http://ookoo.org/svn/snip/php_5_2-json-returntype-final-fix.patch If nobody can find anything against this (being a bit more strict with obviously wrong values) I'll add patchs against HEAD and PHP_5_3. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/45989 -- Edit this bug report at http://bugs.php.net/?id=45989edit=1
#46930 [Opn-Asn]: 5.3.0alpha3's strtotime() returns inconsistent result with some relative items
ID: 46930 Updated by: der...@php.net Reported By: for-bugs at hnw dot jp -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: any PHP Version: 5.3.0alpha3 -Assigned To: +Assigned To: derick Previous Comments: [2008-12-22 23:09:18] for-bugs at hnw dot jp Description: strtotime() of PHP 5.3.0alpha3 returns inconsistent and incompatible result with 'first day' 'last day' 'previous week' 'next week'. PHP 5.2.8 produces consistent result, and meaning of 'first' 'next' 'last' 'previous' is clear for me. The behaviour of PHP 5.3.0's strtotime() is sometimes natural, but it lacks consistency and documentation, I think. Reproduce code: --- ?php var_dump(date(Y-m-d, strtotime(20081224 first day))); var_dump(date(Y-m-d, strtotime(20081224 next day))); var_dump(date(Y-m-d, strtotime(20081224 last day))); var_dump(date(Y-m-d, strtotime(20081224 previous day))); var_dump(date(Y-m-d, strtotime(20081224 first week))); var_dump(date(Y-m-d, strtotime(20081224 next week))); var_dump(date(Y-m-d, strtotime(20081224 last week))); var_dump(date(Y-m-d, strtotime(20081224 previous week))); Expected result: string(10) 2008-12-25 string(10) 2008-12-25 string(10) 2008-12-23 string(10) 2008-12-23 string(10) 2008-12-31 string(10) 2008-12-31 string(10) 2008-12-17 string(10) 2008-12-17 Actual result: -- string(10) 2008-12-01 string(10) 2008-12-25 string(10) 2008-12-31 string(10) 2008-12-23 string(10) 1970-01-01 string(10) 2008-12-29 string(10) 2008-12-15 string(10) 2008-12-15 -- Edit this bug report at http://bugs.php.net/?id=46930edit=1
#46926 [Opn-Asn]: mktime() is slow when it gets very small 3rd argument
ID: 46926 Updated by: der...@php.net Reported By: for-bugs at hnw dot jp -Status: Open +Status: Assigned Bug Type: Performance problem Operating System: any PHP Version: 5.2.8 -Assigned To: +Assigned To: derick Previous Comments: [2008-12-22 14:01:51] for-bugs at hnw dot jp I'm sorry, reproduce code depends on my timezone. Replace code as below: $unixtime = mktime(9,0,-2147483647,1,1,1970); to $unixtime = gmmktime(0,0,-2147483647,1,1,1970); and $unixtime = mktime(9,0,2147483646,1,1,1970); to $unixtime = gmmktime(0,0,2147483646,1,1,1970); [2008-12-22 13:55:06] for-bugs at hnw dot jp Description: when it gots very small 3rd argument, mktime() performs 1000 times slower than ordinary case. Reproduce code: --- ?php $mt0 = microtime(true); for($i=0;$i10;$i++){ $unixtime = mktime(9,0,-2147483647,1,1,1970); } $mt1 = microtime(true); for($i=0;$i10;$i++){ $unixtime = mktime(9,0,2147483646,1,1,1970); } $mt2 = microtime(true); printf(%.6f\n%.6f\n, $mt1-$mt0, $mt2-$mt1); // This will output // 5.139942 // 0.000707 // on my machine Actual result: -- see reproduce code -- Edit this bug report at http://bugs.php.net/?id=46926edit=1
#46921 [Opn-Csd]: imap_open username or password length == 12
ID: 46921 User updated by: waza123 at inbox dot lv Reported By: waza123 at inbox dot lv -Status: Open +Status: Closed Bug Type: Session related Operating System: Linux Slackware 12 PHP Version: 5.2.8 New Comment: Closed. Fixed in mail server imap / dbmail http://git.dbmail.eu/paul/dbmail/?p=paul/dbmail;a=commitdiff;h=40adcfd891d891a8a623f742919763ba157a93b7 Previous Comments: [2008-12-22 00:55:07] waza123 at inbox dot lv Description: Cannot login to IMAP server without SSL (with not tested) length of username or password must be: 12 then try to connect with imap_open() $imap = imap_open({127.0.0.1:143}INBOX, a...@mail.com, ); Warning: imap_open() [function.imap-open]: Couldn't open stream {127.0.0.1:143}INBOX in /home/ BUT, if you set any other password length: 11 or 13 or 10 or any then all OK $imap = imap_open({127.0.0.1:143}INBOX, a...@mail.com, abc); -- Edit this bug report at http://bugs.php.net/?id=46921edit=1
#46935 [NEW]: Installing IIS+ISAPI fails if PHP.EXE not present
From: paul at cohsoft dot com dot au Operating system: Windows XP PHP version: 5.2.8 PHP Bug Type: Windows Installer Bug description: Installing IIS+ISAPI fails if PHP.EXE not present Description: This is bug #45685 restarted. If you install PHP onto Windows XP with IIS+ISAPI, the procedure configIIS4 in script PHPInstallerScripts52.vbs fails on line 182 because it is trying use the File System Object to generate a short path. The FSO GetFile method fails if the file does not exist. The php5isapi.dll does not yet exist because the script is being executed during installation. The problem doesn't occur on Windows Server 03, Vista or Server 08 because the script doesn't generate a short name for those operating systems. I don't know of a simple fix for the problem. The windows GetShortPathName API function doesn't rely on a file existing, but VBScript can't call API functions. Maybe the script can be deferred until the rest of installation is done, so the php5isapi.dll file *does* exist? Workaround: Choose Do not setup a web server during first install of PHP. Download the PHP zip and unzip to a temp folder. Copy php5isapi.dll from temp folder to wherever PHP.EXE is. Manually configure IIS to use the ISAPI DLL. Actual message: Product: PHP 5.2.6 -- Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action configIIS4 script error -2146828235, Microsoft VBScript runtime error: File not found Line 182, Column 9 -- Edit bug report at http://bugs.php.net/?id=46935edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46935r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46935r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46935r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46935r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46935r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46935r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46935r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46935r=needscript Try newer version: http://bugs.php.net/fix.php?id=46935r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46935r=support Expected behavior: http://bugs.php.net/fix.php?id=46935r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46935r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46935r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46935r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46935r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=46935r=dst IIS Stability: http://bugs.php.net/fix.php?id=46935r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46935r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46935r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46935r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46935r=mysqlcfg
#46935 [Opn]: Installing IIS+ISAPI fails because PHP5ISAPI.DLL not yet present
ID: 46935 User updated by: paul at cohsoft dot com dot au -Summary: Installing IIS+ISAPI fails if PHP.EXE not present Reported By: paul at cohsoft dot com dot au Status: Open Bug Type: Windows Installer Operating System: Windows XP PHP Version: 5.2.8 New Comment: Changed summary Previous Comments: [2008-12-23 12:54:16] paul at cohsoft dot com dot au Description: This is bug #45685 restarted. If you install PHP onto Windows XP with IIS+ISAPI, the procedure configIIS4 in script PHPInstallerScripts52.vbs fails on line 182 because it is trying use the File System Object to generate a short path. The FSO GetFile method fails if the file does not exist. The php5isapi.dll does not yet exist because the script is being executed during installation. The problem doesn't occur on Windows Server 03, Vista or Server 08 because the script doesn't generate a short name for those operating systems. I don't know of a simple fix for the problem. The windows GetShortPathName API function doesn't rely on a file existing, but VBScript can't call API functions. Maybe the script can be deferred until the rest of installation is done, so the php5isapi.dll file *does* exist? Workaround: Choose Do not setup a web server during first install of PHP. Download the PHP zip and unzip to a temp folder. Copy php5isapi.dll from temp folder to wherever PHP.EXE is. Manually configure IIS to use the ISAPI DLL. Actual message: Product: PHP 5.2.6 -- Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action configIIS4 script error -2146828235, Microsoft VBScript runtime error: File not found Line 182, Column 9 -- Edit this bug report at http://bugs.php.net/?id=46935edit=1
#43189 [Com]: Fails to link iconv
ID: 43189 Comment by: aalamaki at gmail dot com Reported By: meh at mailinator dot com Status: No Feedback Bug Type: ICONV related Operating System: Mac OS X 10.5 PHP Version: 5.3CVS-2007-11-04 (snap) New Comment: Seems to be the same issue on PHP 5.2.8 and 10.5.6, I've tried doing the mac port with the --with-iconv=shared,/opt/local and it compiled but the iconv didn't come available. I also tried copying over the iconv.h from the macports to the /usr/include but getting the errors mentioned in the first post, it will not compile with that. Anyone have experience with this issue on 10.5.6 ? Previous Comments: [2008-10-15 09:19:26] safdf at mailinator dot com I still have problem with this on 10.5.4. Could you please add a check or workaround for this in configure script? [2008-05-25 03:30:50] joe at joeruwe dot com this happened for me in 10.5.2 with php 5.2.6. i had to compile everything with --without-iconv then reconfigure and remake with the --with-iconv flag.. [2008-03-29 21:11:18] sdfsa at mailinator dot com This problem still occurs in 10.5.2 for me. [2008-02-12 00:03:48] mjs at beebo dot org This appears to be fixed in 10.5.2: the 10.5.2 /usr/include/iconv.h is different to the 10.5.1 version, and it compiles successfully as well. [2008-02-03 09:25:38] mjs at beebo dot org Replacing /usr/include/iconv.h with the one from MacPorts and worked for me. (I did need to re-configure and re-compile the whole thing though-- just re-running configure didn't work.) For what it's worth, the --with-iconv=shared,/opt/local idea *didn't* work for me--php configured and built okay, but the iconv module didn't actually become available. (php -m doesn't show it.) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/43189 -- Edit this bug report at http://bugs.php.net/?id=43189edit=1
#46936 [NEW]: php-cgi fastcgi mode crashes (randomly) in zend_mm_check_ptr
From: bierisplezier at gmail dot com Operating system: linux gentoo 2007.0, kern 2.6.25 PHP version: 5.2.8 PHP Bug Type: Reproducible crash Bug description: php-cgi fastcgi mode crashes (randomly) in zend_mm_check_ptr Description: We tested both mod_php and fastcgi. mod_php doesn't crash. Looking at the coredump it always crashes on the same file (randomly) on 2 functions. See reproduce code. Disabled all 3th party extentions. Reproduce code: --- //Our application is rather large, but php-cgi gdb always shows these functions, stripped them from the class // // Could be public static or abstract class related together with php-cgi memory management abstract class BaseLogPeer { //stripped some content here public static function getOMClass() { return fdPeer::CLASS_DEFAULT; } public static function findOne(Criteria $crit, $con = null) { $copy = clone $crit; $copy-setLimit(1); $objects = fdPeer::doSelect($copy, $con); if ($objects) { return $objects[0]; } return null; } } Actual result: -- php configure './configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64' '--with-pcre-regex=/usr' '--disable-cli' '--enable-cgi' '--enable-fastcgi' '--disable-discard-path' '--enable-force-cgi-redirect' '--enable-fpm' '--with-fpm-conf=/etc/php/cgi-php5/php-fpm.conf' '--with-config-file-path=/etc/php/cgi-php5' '--with-config-file-scan-dir=/etc/php/cgi-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2=shared' '--disable-calendar' '--disable-ctype' '--with-curl=shared' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--enable-ftp=shared' '--with-gettext=shared' '--without-gmp' '--disable-ipv6' '--without-kerberos' '--enable-mbstring=shared' '--with-mcrypt=shared' '--without-mhash' '--without-msql' '--without-mssql' '--without-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--enable-pcntl=shared' '--disable-pdo' '--without-pgsql' '--without-pspell' '--without-recode' '--disable-simplexml' '--enable-shmop' '--without-snmp' '--disable-soap' '--enable-sockets=shared' '--without-sybase' '--without-sybase-ct' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--with-xmlrpc=shared' '--without-xsl' '--enable-zip=shared' '--with-zlib=shared' '--enable-debug' '--without-cdb' '--without-db4' '--disable-flatfile' '--without-gdbm' '--disable-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--with-gd=shared,/usr' '--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-readline' '--without-libedit' '--with-mm' '--without-sqlite' php-cgi -m [PHP Modules] bz2 cgi-fcgi curl date dom ftp gd gettext hash iconv json libxml mbstring mcrypt memcache mysql mysqli openssl pcntl pcre posix readline Reflection session shmop sockets SPL standard sysvmsg sysvsem sysvshm xml xmlrpc zip zlib [Zend Modules] GNU gdb 6.7.1 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-pc-linux-gnu... Using host libthread_db library /lib/libthread_db.so.1. Reading symbols from /lib64/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /usr/lib64/libmm.so.13...done. Loaded symbols for /usr/lib/libmm.so.13 Reading symbols from /lib64/libhistory.so.5...done. Loaded symbols for /lib/libhistory.so.5 Reading symbols from /lib64/libreadline.so.5...done. Loaded symbols for /lib/libreadline.so.5 Reading symbols from /lib64/libncurses.so.5...done. Loaded symbols for /lib/libncurses.so.5 Reading symbols from /usr/lib64/libpcre.so.0...done. Loaded symbols for /usr/lib/libpcre.so.0 Reading symbols from /lib64/libz.so.1...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /lib64/libbz2.so.1...done. Loaded symbols for /lib/libbz2.so.1 Reading symbols from /lib64/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib64/libm.so.6...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib64/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib64/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib64/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /usr/lib64/libssl.so.0.9.8...done. Loaded symbols for /usr/lib/libssl.so.0.9.8 Reading symbols from
#46925 [Asn]: when open_basedir=. the working directory is set to the executable location
ID: 46925 Updated by: paj...@php.net Reported By: eyal at zend dot com Status: Assigned Bug Type: Safe Mode/open_basedir Operating System: Windows * PHP Version: 5.2.8 Assigned To: dmitry New Comment: Do we really want to support relative path? It may (incidentally) have worked before but I can't think of any sane usage of a relative path for open_basedir. Previous Comments: [2008-12-22 11:55:29] eyal at zend dot com Description: NOTE: Tested with FastCGI module on IIS 7. 1. Verify you have info.php in your docroot. 2. Set the directive open_basedir=. 3. Request the script info.php Reproduce code: --- ?php phpinfo(): ? Expected result: The phpinfo() output Actual result: -- PHP Warning: Unknown: open_basedir restriction in effect. File(C:\inetpub\wwwroot\info.php) is not within the allowed path(s): (.) in Unknown on line 0 To verify the location that is not restricted you can do the following: Add a virtual directory to the default web site with a physical path of the php-fastCGI.exe and put the info.php there as well. Now you can see that when requesting the file from the virtual directory you will receive the phpinfo() output. -- Edit this bug report at http://bugs.php.net/?id=46925edit=1
#45991 [Com]: parse_ini_file returns empty array if config.ini is saved as UTF-8
ID: 45991 Comment by: dirk dot thomas at 4wdmedia dot de Reported By: ckl at ecw dot de Status: No Feedback Bug Type: *Configuration Issues Operating System: Windows XP SP 3 PHP Version: 5.3.0alpha2 New Comment: I have the same problem with PHP 5.3.0alpha3 under Windows Vista. The parsed ini-file was saved as UTF-8 with BOM. parse_ini returns an empty array for me. Previous Comments: [2008-09-12 01:00:00] 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. [2008-09-05 06:49:33] ckl at ecw dot de config.ini was saved as UTF-8 with BOM. [2008-09-04 14:30:18] tula...@php.net changing to configuration issue [2008-09-04 14:29:19] tula...@php.net Would that be UTF-8 with the BOM? or without? [2008-09-04 10:13:38] ckl at ecw dot de Description: parse_ini_file returns an empty array while trying to parse any ini-file which is saved as UTF-8. ISO-8859-1 saved ini-files works as expected. Reproduce code: --- ; Saved as UTF-8 [production] application.base_url = application.data_url = data database.type = pdo_mysql database.host = 192.168.0.78 database.username = root database.password = database.name = blog Expected result: Get an array.. Actual result: -- array() -- Edit this bug report at http://bugs.php.net/?id=45991edit=1
#45991 [NoF-Opn]: parse_ini_file returns empty array if config.ini is saved as UTF-8
ID: 45991 Updated by: paj...@php.net Reported By: ckl at ecw dot de -Status: No Feedback +Status: Open Bug Type: *Configuration Issues Operating System: Windows XP SP 3 PHP Version: 5.3.0alpha2 New Comment: See #46326 as well (ini broken when BOM are present) Previous Comments: [2008-12-23 15:20:28] dirk dot thomas at 4wdmedia dot de I have the same problem with PHP 5.3.0alpha3 under Windows Vista. The parsed ini-file was saved as UTF-8 with BOM. parse_ini returns an empty array for me. [2008-09-12 01:00:00] 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. [2008-09-05 06:49:33] ckl at ecw dot de config.ini was saved as UTF-8 with BOM. [2008-09-04 14:30:18] tula...@php.net changing to configuration issue [2008-09-04 14:29:19] tula...@php.net Would that be UTF-8 with the BOM? or without? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/45991 -- Edit this bug report at http://bugs.php.net/?id=45991edit=1
#46600 [Com]: _empty_ key in objects (see #41504)
ID: 46600 Comment by: matt at mpcm dot com Reported By: Matt at mpcm dot com Status: Feedback Bug Type: JSON related Operating System: * PHP Version: 5CVS, 6CVS (2008-11-18) New Comment: A note about this in the json_decode page would be appreciated. Perhaps a strict mode flag, so that it can fail if it cannot be decoded as an object (?). For the moment the only safe way to decode json is into arrays. The _empty_ behavior I thought was a bug (as it was with arrays) is a required behavior for objects (at least without __get __set in a wrapper class). The bugs that jump out at me now can be seen with the code below... you can create objects with unreachable properties. If that blank property access is fixed, then this becomes not so much of an issue. Or it should be stopped from ever happening... silent errors bite us all. Illegal Member variable name if var_dump does it, fatal if a user does it. Notice: PHPDocument1 line 8 - Illegal member variable name ? $blank = ''; $another = ' another'; $a = array($blank=1234, 'some other key'=5678, $another=); $b = (object) $a; $c = json_decode(json_encode($a)); var_dump($b); var_dump($c); #echo $b-$blank; //fatal echo $b-$another; //works #echo $c-$blank; //fatal echo $c-$another; //works ? Previous Comments: [2008-12-18 03:27:25] scott...@php.net I'm not even sure what the bug is? You can't have an empty property name hence the use of _empty_. The key collision thing is a very edge case, are you saying you ran into this in a real life usage? The best course of action may be to have this documented on the json_encode() and json_decode() pages. [2008-12-04 20:39:13] Matt at mpcm dot com Thanx for the reply magicaltux, `Feature` is an interesting word considering the possible key collision. There are other ways to get things that are not strictly objects to behave that way. Overloading (like example #1 at http://us.php.net/manual/en/language.oop5.overloading.php). It works well enough as long as you also make it iterate correctly. What I am suggesting is that it is better to fail in decoding into an object, than to silently cause a key collision. Or alternatively, produce an overloaded object which can have these keys (by default, or passed optional flag) from json_decode. It's an opinion, but a wrapper gets me where I need to be for now, and I'm pretty sure this is an edge case. $a = '{:a,_empty_:b}'; echo json_encode(json_decode($a)); echo json_encode(json_decode($a, true)); output: {_empty_:b} {:a,_empty_:b} for some values: $a != json_encode(json_decode($a)); [2008-12-04 10:44:29] magical...@php.net I believe this is not a bug, but a feature. An object *can't* have an empty property (while an array can). If you want to use json_decode() with json containing empty key, either access those empty key using special keyword _empty_, or put the optionnal $assoc parameter of json_decode() to true to get result as an array. If you want objects to support empty keys, I believe this is not going to happen soon, as this is enforced by a specific error message. Fatal error: Cannot access empty property in php shell code on line 1 Please note that a property name starting with NULL character won't work either. [2008-11-18 17:35:30] matt at mpcm dot com The language seems to create a key that cannot be reached, so even if this `bug` is fixed, we am still facing a broader issue it seems. ? $key = ; $o = (object) array($key=4,example=8); var_dump($o); print 'blank key test:' . (isset($o-$key)?'true':'false'); print $o-{$key}; var_dump($o-$key); ? output: object(stdClass)#1 (2) { []= int(4) [example]= int(8) } blank key test:falsebr / bFatal error/b: Cannot access empty property in bPHPDocument1/b on line b8/bbr / All throws Notice: line 4 - Illegal member variable name [2008-11-18 15:43:05] matt at mpcm dot com All the work arounds I am looking at are throwing Error Text: Illegal member variable name when I convert/cast an object with a blank property. Is this json_decode `bug` a result of a larger object mechanism limitation inside of php's object handling? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/46600 -- Edit this bug report at http://bugs.php.net/?id=46600edit=1
#46929 [Opn-Bgs]: http://bugs.php.net/46915
ID: 46929 Updated by: j...@php.net Reported By: qrizly at hotmail dot com -Status: Open +Status: Bogus Bug Type: Reproducible crash Operating System: xp PHP Version: 5.2.8 New Comment: as you wish (and note: versions start with a number, not with php..) Previous Comments: [2008-12-22 19:58:41] qrizly at hotmail dot com Description: I am unable to change the status of bug http://bugs.php.net/46915 back to open. If any mod reads this would you be so kind to delete this and change the status of bug http://bugs.php.net/46915 ? Thanks in advance. -- Edit this bug report at http://bugs.php.net/?id=46929edit=1
#46915 [Bgs-Opn]: metaphone crash on utf-8 string kdxkdx
ID: 46915 Updated by: j...@php.net Reported By: qrizly at hotmail dot com -Status: Bogus +Status: Open Bug Type: Reproducible crash Operating System: XP -PHP Version: php-5.2.8 +PHP Version: 5.2.8 Previous Comments: [2008-12-20 21:27:46] qrizly at hotmail dot com another string that gives me trouble in PHP as well: gpxgpx [2008-12-20 19:37:49] qrizly at hotmail dot com and tested in PHP 5.2.8. Problem still occurs. Small question along the lines, is this true: 5.3CVS-2008-12-20 (snapshot) php-5.2.8 [2008-12-20 19:22:19] der...@php.net Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to Open. Again, thank you for your continued support of PHP. . [2008-12-20 19:07:58] qrizly at hotmail dot com Description: the string kdxkdx encoded in utf-8 or ISO-8859-1 craches in PHP 5.1 and tested in latest snapshot: php-5.3-win32-VC6-x86 Reproduce code: --- $txt = iconv(ISO-8859-1, UTF-8, kdxkdx); echo metaphone($txt); Expected result: echo: KTKSKTKS Actual result: -- PHP CGI crash -- Edit this bug report at http://bugs.php.net/?id=46915edit=1
#46936 [Opn-Fbk]: php-cgi fastcgi mode crashes (randomly) in zend_mm_check_ptr
ID: 46936 Updated by: j...@php.net Reported By: bierisplezier at gmail dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: linux gentoo 2007.0, kern 2.6.25 PHP Version: 5.2.8 New Comment: Are those shared extensions build for (with) the CGI binary? Try compile those when you (only) build cgi binary. Previous Comments: [2008-12-23 13:31:13] bierisplezier at gmail dot com Description: We tested both mod_php and fastcgi. mod_php doesn't crash. Looking at the coredump it always crashes on the same file (randomly) on 2 functions. See reproduce code. Disabled all 3th party extentions. Reproduce code: --- //Our application is rather large, but php-cgi gdb always shows these functions, stripped them from the class // // Could be public static or abstract class related together with php-cgi memory management abstract class BaseLogPeer { //stripped some content here public static function getOMClass() { return fdPeer::CLASS_DEFAULT; } public static function findOne(Criteria $crit, $con = null) { $copy = clone $crit; $copy-setLimit(1); $objects = fdPeer::doSelect($copy, $con); if ($objects) { return $objects[0]; } return null; } } Actual result: -- php configure './configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64' '--with-pcre-regex=/usr' '--disable-cli' '--enable-cgi' '--enable-fastcgi' '--disable-discard-path' '--enable-force-cgi-redirect' '--enable-fpm' '--with-fpm-conf=/etc/php/cgi-php5/php-fpm.conf' '--with-config-file-path=/etc/php/cgi-php5' '--with-config-file-scan-dir=/etc/php/cgi-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2=shared' '--disable-calendar' '--disable-ctype' '--with-curl=shared' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--enable-ftp=shared' '--with-gettext=shared' '--without-gmp' '--disable-ipv6' '--without-kerberos' '--enable-mbstring=shared' '--with-mcrypt=shared' '--without-mhash' '--without-msql' '--without-mssql' '--without-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--enable-pcntl=shared' '--disable-pdo' '--without-pgsql' '--without-pspell' '--without-recode' '--disable-simplexml' '--enable-shmop' '--without-snmp' '--disable-soap' '--enable-sockets=shared' '--without-sybase' '--without-sybase-ct' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--with-xmlrpc=shared' '--without-xsl' '--enable-zip=shared' '--with-zlib=shared' '--enable-debug' '--without-cdb' '--without-db4' '--disable-flatfile' '--without-gdbm' '--disable-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--with-gd=shared,/usr' '--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-readline' '--without-libedit' '--with-mm' '--without-sqlite' php-cgi -m [PHP Modules] bz2 cgi-fcgi curl date dom ftp gd gettext hash iconv json libxml mbstring mcrypt memcache mysql mysqli openssl pcntl pcre posix readline Reflection session shmop sockets SPL standard sysvmsg sysvsem sysvshm xml xmlrpc zip zlib [Zend Modules] GNU gdb 6.7.1 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-pc-linux-gnu... Using host libthread_db library /lib/libthread_db.so.1. Reading symbols from /lib64/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /usr/lib64/libmm.so.13...done. Loaded symbols for /usr/lib/libmm.so.13 Reading symbols from /lib64/libhistory.so.5...done. Loaded symbols for /lib/libhistory.so.5 Reading symbols from /lib64/libreadline.so.5...done. Loaded symbols for /lib/libreadline.so.5 Reading symbols from /lib64/libncurses.so.5...done. Loaded symbols for /lib/libncurses.so.5 Reading symbols from /usr/lib64/libpcre.so.0...done. Loaded symbols for /usr/lib/libpcre.so.0 Reading symbols from /lib64/libz.so.1...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /lib64/libbz2.so.1...done. Loaded symbols for /lib/libbz2.so.1 Reading symbols from /lib64/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib64/libm.so.6...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib64/libdl.so.2...done. Loaded
#46923 [Opn-Bgs]: Intel C++ Compiler 10.1.021 on php 5.2.8 compiler failure
ID: 46923 Updated by: j...@php.net Reported By: kit85kit85 at gmail dot com -Status: Open +Status: Bogus Bug Type: Compile Failure Operating System: centos 5.2 64bit PHP Version: 5.2.8 New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Previous Comments: [2008-12-22 02:24:30] kit85kit85 at gmail dot com Description: php 5.2.8 using Intel C++ Compiler 10.1.021 on php 5.2.8 compiler failure. icc: command line warning #10006: ignoring unknown option '-frpath' icc: command line warning #10006: ignoring unknown option '-frpath' icc: command line warning #10156: ignoring option '-s'; no argument required ipo: error #11021: OBJREAD Error: Could not create mapping for /usr/local/lib icc: error #10014: problem during multi-file optimization compilation (code 1) make: *** [libphp5.la] Error 1 #!/bin/sh export CC=icc -static-intel export CFLAGS=-O3 -unroll2 -ip -mp -restrict -xP export CXX=icpc -static-intel export CXXFLAGS=-O3 -unroll2 -ip -mp -restrict -xP ./configure \ --libdir=/usr/lib64 \ --with-apxs2 \ --with-curl=/usr/local/lib \ --with-gd \ --with-ttf \ --with-gettext \ --with-jpeg-dir=/usr/local/lib \ --with-png-dir=/usr/local/lib \ --with-freetype-dir=/usr/local/lib \ --with-iconv=/usr/local \ --with-zlib \ --with-zlib-dir=/usr/local/lib \ --with-mcrypt \ --with-mhash \ --with-openssl \ --with-kerberos=/usr/lib64 \ --with-mysql=/usr/local/mysqld/lib64/mysql \ --with-mysqli=/usr/local/mysqld/bin/mysql_config \ --with-pdo-mysql=/usr/local/mysqld \ --with-pear \ --enable-bcmath \ --enable-calendar \ --enable-exif \ --enable-ftp \ --enable-gd-native-ttf \ --enable-magic-quotes \ --enable-safe-mode \ --enable-soap \ --enable-sockets \ --enable-mbstring \ --enable-zip \ --enable-wddx \ --disable-ipv6 -- Edit this bug report at http://bugs.php.net/?id=46923edit=1
#46936 [Fbk-Opn]: php-cgi fastcgi mode crashes (randomly) in zend_mm_check_ptr
ID: 46936 User updated by: bierisplezier at gmail dot com Reported By: bierisplezier at gmail dot com -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: linux gentoo 2007.0, kern 2.6.25 PHP Version: 5.2.8 New Comment: They are build for apache2 and cgi (USE='apache cgi' in gentoo), I will compile them for (fast)cgi only and see if that helps. Previous Comments: [2008-12-23 16:59:16] j...@php.net Are those shared extensions build for (with) the CGI binary? Try compile those when you (only) build cgi binary. [2008-12-23 13:31:13] bierisplezier at gmail dot com Description: We tested both mod_php and fastcgi. mod_php doesn't crash. Looking at the coredump it always crashes on the same file (randomly) on 2 functions. See reproduce code. Disabled all 3th party extentions. Reproduce code: --- //Our application is rather large, but php-cgi gdb always shows these functions, stripped them from the class // // Could be public static or abstract class related together with php-cgi memory management abstract class BaseLogPeer { //stripped some content here public static function getOMClass() { return fdPeer::CLASS_DEFAULT; } public static function findOne(Criteria $crit, $con = null) { $copy = clone $crit; $copy-setLimit(1); $objects = fdPeer::doSelect($copy, $con); if ($objects) { return $objects[0]; } return null; } } Actual result: -- php configure './configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64' '--with-pcre-regex=/usr' '--disable-cli' '--enable-cgi' '--enable-fastcgi' '--disable-discard-path' '--enable-force-cgi-redirect' '--enable-fpm' '--with-fpm-conf=/etc/php/cgi-php5/php-fpm.conf' '--with-config-file-path=/etc/php/cgi-php5' '--with-config-file-scan-dir=/etc/php/cgi-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2=shared' '--disable-calendar' '--disable-ctype' '--with-curl=shared' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--enable-ftp=shared' '--with-gettext=shared' '--without-gmp' '--disable-ipv6' '--without-kerberos' '--enable-mbstring=shared' '--with-mcrypt=shared' '--without-mhash' '--without-msql' '--without-mssql' '--without-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--enable-pcntl=shared' '--disable-pdo' '--without-pgsql' '--without-pspell' '--without-recode' '--disable-simplexml' '--enable-shmop' '--without-snmp' '--disable-soap' '--enable-sockets=shared' '--without-sybase' '--without-sybase-ct' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--with-xmlrpc=shared' '--without-xsl' '--enable-zip=shared' '--with-zlib=shared' '--enable-debug' '--without-cdb' '--without-db4' '--disable-flatfile' '--without-gdbm' '--disable-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--with-gd=shared,/usr' '--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-readline' '--without-libedit' '--with-mm' '--without-sqlite' php-cgi -m [PHP Modules] bz2 cgi-fcgi curl date dom ftp gd gettext hash iconv json libxml mbstring mcrypt memcache mysql mysqli openssl pcntl pcre posix readline Reflection session shmop sockets SPL standard sysvmsg sysvsem sysvshm xml xmlrpc zip zlib [Zend Modules] GNU gdb 6.7.1 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-pc-linux-gnu... Using host libthread_db library /lib/libthread_db.so.1. Reading symbols from /lib64/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /usr/lib64/libmm.so.13...done. Loaded symbols for /usr/lib/libmm.so.13 Reading symbols from /lib64/libhistory.so.5...done. Loaded symbols for /lib/libhistory.so.5 Reading symbols from /lib64/libreadline.so.5...done. Loaded symbols for /lib/libreadline.so.5 Reading symbols from /lib64/libncurses.so.5...done. Loaded symbols for /lib/libncurses.so.5 Reading symbols from /usr/lib64/libpcre.so.0...done. Loaded symbols for /usr/lib/libpcre.so.0 Reading symbols from /lib64/libz.so.1...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /lib64/libbz2.so.1...done. Loaded
#46916 [Opn-Bgs]: Logging Messages Terminated With \r\r\n
ID: 46916 Updated by: j...@php.net Reported By: Brian dot White at foxfire74 dot com -Status: Open +Status: Bogus Bug Type: Apache2 related Operating System: Windows PHP Version: 5.2.8 New Comment: PHP only adds PHP_EOL (in your case \r\n) to the log messages so that extra \r comes somewhere else. Previous Comments: [2008-12-22 00:17:09] Brian dot White at foxfire74 dot com Running as an Apache 2.2.11 module. (Windows XP SP3) Error handling and logging section from php.ini === error_reporting = E_ALL display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 1024 ignore_repeated_errors = Off ignore_repeated_source = Off report_memleaks = On track_errors = Off error_log = /path-to-logs/php/error.log Simple web page that blows up = ?php ini_set('max_execution_time', 1); $i = 0; do { echo $i\n; sleep(1); } while ($i++ 10); ? Log file after accessing the above page twice = [21-Dec-2008 19:02:07] PHP Fatal error: Maximum execution time of 1 second exceeded in \path-to-test-page\46916.php on line 10 [21-Dec-2008 19:03:11] PHP Fatal error: Maximum execution time of 1 second exceeded in \path-to-test-page\46916.php on line 10 Note the extra CRs. [2008-12-21 12:59:24] j...@php.net Please show the code you use to log. [2008-12-21 02:24:42] Brian dot White at foxfire74 dot com Description: Since the upgrade to 5.2.7/5.2.8 lines in the log file are terminated with \r\r\n rather than \r\n. I am logging to a separate log file, not to the Apache error log; however the error seems not to occur when logging from the CLI, only from the SAPI module. -- Edit this bug report at http://bugs.php.net/?id=46916edit=1
#46936 [Opn-Fbk]: php-cgi fastcgi mode crashes (randomly) in zend_mm_check_ptr
ID: 46936 Updated by: j...@php.net Reported By: bierisplezier at gmail dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: linux gentoo 2007.0, kern 2.6.25 PHP Version: 5.2.8 Previous Comments: [2008-12-23 17:02:52] bierisplezier at gmail dot com They are build for apache2 and cgi (USE='apache cgi' in gentoo), I will compile them for (fast)cgi only and see if that helps. [2008-12-23 16:59:16] j...@php.net Are those shared extensions build for (with) the CGI binary? Try compile those when you (only) build cgi binary. [2008-12-23 13:31:13] bierisplezier at gmail dot com Description: We tested both mod_php and fastcgi. mod_php doesn't crash. Looking at the coredump it always crashes on the same file (randomly) on 2 functions. See reproduce code. Disabled all 3th party extentions. Reproduce code: --- //Our application is rather large, but php-cgi gdb always shows these functions, stripped them from the class // // Could be public static or abstract class related together with php-cgi memory management abstract class BaseLogPeer { //stripped some content here public static function getOMClass() { return fdPeer::CLASS_DEFAULT; } public static function findOne(Criteria $crit, $con = null) { $copy = clone $crit; $copy-setLimit(1); $objects = fdPeer::doSelect($copy, $con); if ($objects) { return $objects[0]; } return null; } } Actual result: -- php configure './configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64' '--with-pcre-regex=/usr' '--disable-cli' '--enable-cgi' '--enable-fastcgi' '--disable-discard-path' '--enable-force-cgi-redirect' '--enable-fpm' '--with-fpm-conf=/etc/php/cgi-php5/php-fpm.conf' '--with-config-file-path=/etc/php/cgi-php5' '--with-config-file-scan-dir=/etc/php/cgi-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2=shared' '--disable-calendar' '--disable-ctype' '--with-curl=shared' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--enable-ftp=shared' '--with-gettext=shared' '--without-gmp' '--disable-ipv6' '--without-kerberos' '--enable-mbstring=shared' '--with-mcrypt=shared' '--without-mhash' '--without-msql' '--without-mssql' '--without-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--enable-pcntl=shared' '--disable-pdo' '--without-pgsql' '--without-pspell' '--without-recode' '--disable-simplexml' '--enable-shmop' '--without-snmp' '--disable-soap' '--enable-sockets=shared' '--without-sybase' '--without-sybase-ct' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--with-xmlrpc=shared' '--without-xsl' '--enable-zip=shared' '--with-zlib=shared' '--enable-debug' '--without-cdb' '--without-db4' '--disable-flatfile' '--without-gdbm' '--disable-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--with-gd=shared,/usr' '--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-readline' '--without-libedit' '--with-mm' '--without-sqlite' php-cgi -m [PHP Modules] bz2 cgi-fcgi curl date dom ftp gd gettext hash iconv json libxml mbstring mcrypt memcache mysql mysqli openssl pcntl pcre posix readline Reflection session shmop sockets SPL standard sysvmsg sysvsem sysvshm xml xmlrpc zip zlib [Zend Modules] GNU gdb 6.7.1 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-pc-linux-gnu... Using host libthread_db library /lib/libthread_db.so.1. Reading symbols from /lib64/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /usr/lib64/libmm.so.13...done. Loaded symbols for /usr/lib/libmm.so.13 Reading symbols from /lib64/libhistory.so.5...done. Loaded symbols for /lib/libhistory.so.5 Reading symbols from /lib64/libreadline.so.5...done. Loaded symbols for /lib/libreadline.so.5 Reading symbols from /lib64/libncurses.so.5...done. Loaded symbols for /lib/libncurses.so.5 Reading symbols from /usr/lib64/libpcre.so.0...done. Loaded symbols for /usr/lib/libpcre.so.0 Reading symbols from
#46936 [Fbk-Opn]: php-cgi fastcgi mode crashes (randomly) in zend_mm_check_ptr
ID: 46936 User updated by: bierisplezier at gmail dot com Reported By: bierisplezier at gmail dot com -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: linux gentoo 2007.0, kern 2.6.25 PHP Version: 5.2.8 New Comment: compiled php for cgi only, tried with shared extensions and compiled in. Both result in the same crash described earlier. Previous Comments: [2008-12-23 17:02:52] bierisplezier at gmail dot com They are build for apache2 and cgi (USE='apache cgi' in gentoo), I will compile them for (fast)cgi only and see if that helps. [2008-12-23 16:59:16] j...@php.net Are those shared extensions build for (with) the CGI binary? Try compile those when you (only) build cgi binary. [2008-12-23 13:31:13] bierisplezier at gmail dot com Description: We tested both mod_php and fastcgi. mod_php doesn't crash. Looking at the coredump it always crashes on the same file (randomly) on 2 functions. See reproduce code. Disabled all 3th party extentions. Reproduce code: --- //Our application is rather large, but php-cgi gdb always shows these functions, stripped them from the class // // Could be public static or abstract class related together with php-cgi memory management abstract class BaseLogPeer { //stripped some content here public static function getOMClass() { return fdPeer::CLASS_DEFAULT; } public static function findOne(Criteria $crit, $con = null) { $copy = clone $crit; $copy-setLimit(1); $objects = fdPeer::doSelect($copy, $con); if ($objects) { return $objects[0]; } return null; } } Actual result: -- php configure './configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64' '--with-pcre-regex=/usr' '--disable-cli' '--enable-cgi' '--enable-fastcgi' '--disable-discard-path' '--enable-force-cgi-redirect' '--enable-fpm' '--with-fpm-conf=/etc/php/cgi-php5/php-fpm.conf' '--with-config-file-path=/etc/php/cgi-php5' '--with-config-file-scan-dir=/etc/php/cgi-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2=shared' '--disable-calendar' '--disable-ctype' '--with-curl=shared' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--enable-ftp=shared' '--with-gettext=shared' '--without-gmp' '--disable-ipv6' '--without-kerberos' '--enable-mbstring=shared' '--with-mcrypt=shared' '--without-mhash' '--without-msql' '--without-mssql' '--without-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--enable-pcntl=shared' '--disable-pdo' '--without-pgsql' '--without-pspell' '--without-recode' '--disable-simplexml' '--enable-shmop' '--without-snmp' '--disable-soap' '--enable-sockets=shared' '--without-sybase' '--without-sybase-ct' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--with-xmlrpc=shared' '--without-xsl' '--enable-zip=shared' '--with-zlib=shared' '--enable-debug' '--without-cdb' '--without-db4' '--disable-flatfile' '--without-gdbm' '--disable-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--with-gd=shared,/usr' '--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-readline' '--without-libedit' '--with-mm' '--without-sqlite' php-cgi -m [PHP Modules] bz2 cgi-fcgi curl date dom ftp gd gettext hash iconv json libxml mbstring mcrypt memcache mysql mysqli openssl pcntl pcre posix readline Reflection session shmop sockets SPL standard sysvmsg sysvsem sysvshm xml xmlrpc zip zlib [Zend Modules] GNU gdb 6.7.1 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-pc-linux-gnu... Using host libthread_db library /lib/libthread_db.so.1. Reading symbols from /lib64/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /usr/lib64/libmm.so.13...done. Loaded symbols for /usr/lib/libmm.so.13 Reading symbols from /lib64/libhistory.so.5...done. Loaded symbols for /lib/libhistory.so.5 Reading symbols from /lib64/libreadline.so.5...done. Loaded symbols for /lib/libreadline.so.5 Reading symbols from /lib64/libncurses.so.5...done. Loaded symbols for
#46916 [Bgs]: Logging Messages Terminated With \r\r\n
ID: 46916 User updated by: Brian dot White at foxfire74 dot com Reported By: Brian dot White at foxfire74 dot com Status: Bogus Bug Type: Apache2 related Operating System: Windows PHP Version: 5.2.8 New Comment: This was actually an escaping problem by caused by using the same log for both 5.2.7 and 5.2.8. Checking previous error logs, I notices at ALL lines are terminated with \r\r\n. Do to some unusual escape sequences in the file the log file view I was using became confused about the termination character. Starting a fresh log file rectified the problem. Previous Comments: [2008-12-23 17:03:36] j...@php.net PHP only adds PHP_EOL (in your case \r\n) to the log messages so that extra \r comes somewhere else. [2008-12-22 00:17:09] Brian dot White at foxfire74 dot com Running as an Apache 2.2.11 module. (Windows XP SP3) Error handling and logging section from php.ini === error_reporting = E_ALL display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 1024 ignore_repeated_errors = Off ignore_repeated_source = Off report_memleaks = On track_errors = Off error_log = /path-to-logs/php/error.log Simple web page that blows up = ?php ini_set('max_execution_time', 1); $i = 0; do { echo $i\n; sleep(1); } while ($i++ 10); ? Log file after accessing the above page twice = [21-Dec-2008 19:02:07] PHP Fatal error: Maximum execution time of 1 second exceeded in \path-to-test-page\46916.php on line 10 [21-Dec-2008 19:03:11] PHP Fatal error: Maximum execution time of 1 second exceeded in \path-to-test-page\46916.php on line 10 Note the extra CRs. [2008-12-21 12:59:24] j...@php.net Please show the code you use to log. [2008-12-21 02:24:42] Brian dot White at foxfire74 dot com Description: Since the upgrade to 5.2.7/5.2.8 lines in the log file are terminated with \r\r\n rather than \r\n. I am logging to a separate log file, not to the Apache error log; however the error seems not to occur when logging from the CLI, only from the SAPI module. -- Edit this bug report at http://bugs.php.net/?id=46916edit=1
#46903 [Opn-Asn]: ob_start(): Special $chunk_size value of 1 is not honoured in HEAD
ID: 46903 Updated by: fel...@php.net Reported By: robin_fernandes at uk dot ibm dot com -Status: Open +Status: Assigned Bug Type:Output Control PHP Version: 6CVS-2008-12-18 (snap) -Assigned To: +Assigned To: robinf New Comment: Commit it :) Previous Comments: [2008-12-18 14:40:09] robin_fernandes at uk dot ibm dot com Description: The doc for ob_start() states: If the optional parameter chunk_size is passed, the buffer will be flushed after any output call which causes the buffer's length to equal or exceed chunk_size . Default value 0 means that the function is called only in the end, other special value 1 sets chunk_size to 4096. In HEAD, setting $chunk_size=1 actually does set the buffer threshold size to 1 byte, rather than 4096 bytes as on 5_* and as documented. Here's a simple patch for HEAD to restore the documented behaviour: Index: output.c === RCS file: /repository/php-src/main/output.c,v retrieving revision 1.214 diff -u -w -p -r1.214 output.c --- output.c18 Aug 2008 07:45:59 - 1.214 +++ output.c18 Dec 2008 14:23:10 - @@ -1342,6 +1342,8 @@ PHP_FUNCTION(ob_start) } if (chunk_size 0) { chunk_size = 0; + } else if (chunk_size == 1) { + chunk_size = 4096; } if (SUCCESS != php_output_start_user(output_handler, chunk_size, flags TSRMLS_CC)) { Reproduce code: --- ?php function flushCounter($input) { static $counter=0; return '[' . ++$counter . ] $input \n; } // This should set the buffer size to 4096 ob_start('flushCounter', 1); // Get the buffer size: $bufferInfo = ob_get_status(true); var_dump($bufferInfo[0]['chunk_size']); // If the buffer size is 1, these two chars should // come out as part of a single flush: echo 1; echo 2; ? Expected result: [1] int(4096) 12 Actual result: -- [1] int(1) [2] 1 [3] 2 [4] -- Edit this bug report at http://bugs.php.net/?id=46903edit=1
#38595 [Com]: XSLTProcessor::registerPHPFunctions() should be able to register callbacks
ID: 38595 Comment by: php at xmlnode dot com Reported By: goliath dot mailinglist at gmx dot de Status: Open Bug Type: Feature/Change Request Operating System: Linux PHP Version: 5.1.5 New Comment: I'm not sure how important this really is. I too was disappointed at the lack of flexibility with registerPHPFunctions, but it was hard to be too upset about it because for us, the decision to use XSL as a template is an acknowledgment of standards and registerPHPFunctions is not standard... What we've done, if the value can't be passed as a parameter using XSLTProcessor::setParameter() is created a class with a bunch of static methods which are then called using something like this: php:function('XSL::function name',0) If objects need to be instantiated, that work is done inside of those respective methods -- not throughout the XSL. The approach here has the added benefit of being able to periodically scrutinize what others on the team are wanting access to within the XSL and make adjustments for security, performance, etc. YMMV Previous Comments: [2006-08-25 17:09:21] goliath dot mailinglist at gmx dot de Description: XSLTProcessor::registerPHPFunctions() has very limited use. It is only possible to register static callable functions. Some nicer API would be: $xslt = new XSLTProcessor() $xslt-registerPHPFunctions(array( 'func1' = 'functionblah', 'func2' = array('class', 'method'), 'func3' = array($obj, 'method') // this would be the real advantage )); Or even better: $xslt-registerPHPFunction('func1', 'functionblah'); $xslt-registerPHPFunction('func2', array('class', 'method')); $xslt-registerPHPFunction('func3', array($obj, 'method')); $xslt-removePHPFunction('func1'); This would be similar to the set/get/removeParameter-API btw.: Your CAPCHA only works with cookies enabled, that really sucks. Reproduce code: --- None, not possible Expected result: Be able to have instance-methods as callbacks for the XSLTProcessor. (Note: Not global accessibly objects) Actual result: -- Not possible -- Edit this bug report at http://bugs.php.net/?id=38595edit=1