Bug #51736 [PATCH]: configuration parsing problem
Edit report at http://bugs.php.net/bug.php?id=51736&edit=1 ID: 51736 Patch added by: f...@php.net Reported by: mauro dot stettler at gmail dot com Summary: configuration parsing problem Status: Assigned Type: Bug Package: FPM related Operating System: suse linux (SLES11) PHP Version: Irrelevant Assigned To: fat New Comment: The following patch has been added/updated: Patch Name: bug51736.patch Revision: 1273306941 URL: http://bugs.php.net/patch-display.php?bug=51736&patch=bug51736.patch&revision=1273306941 Previous Comments: [2010-05-04 09:00:56] mauro dot stettler at gmail dot com Description: i tested the revision 298795 of php-fpm and i experienced that the config value of min_spare_servers always gets copied into the config value of max_spare_servers, which then means that start_servers will also have to be equal to this, Test script: --- ; Sets the number of server processes created on startup. ; Used only with 'dynamic' pm.style ; default : min_spare + (max_spare - min_spare) / 2 ; pm.start_servers = 50 ; Sets the desired minimum number of idle server processes. ; Used only with 'dynamic' pm.style ; It's mandatory when pm is set to dynamic ; pm.min_spare_servers = 10 ; Sets the desired maximum number of idle server processes. ; Used only with 'dynamic' pm.style ; It's mandatory when pm is set to dynamic ; pm.max_spare_servers = 100 Expected result: should be able to start php-fpm server Actual result: -- the result is that on start of php-fpm server, the fpm gives out a config error if you use the above pasted configuration -- Edit this bug report at http://bugs.php.net/bug.php?id=51736&edit=1
Bug #51736 [Com]: configuration parsing problem
Edit report at http://bugs.php.net/bug.php?id=51736&edit=1 ID: 51736 Comment by: f...@php.net Reported by: mauro dot stettler at gmail dot com Summary: configuration parsing problem Status: Assigned Type: Bug Package: FPM related Operating System: suse linux (SLES11) PHP Version: Irrelevant Assigned To: fat New Comment: Can you please try the attached patch to confirm it fixes the bug ? Thx ++ Jerome Previous Comments: [2010-05-08 10:22:21] f...@php.net The following patch has been added/updated: Patch Name: bug51736.patch Revision: 1273306941 URL: http://bugs.php.net/patch-display.php?bug=51736&patch=bug51736.patch&revision=1273306941 [2010-05-04 09:00:56] mauro dot stettler at gmail dot com Description: i tested the revision 298795 of php-fpm and i experienced that the config value of min_spare_servers always gets copied into the config value of max_spare_servers, which then means that start_servers will also have to be equal to this, Test script: --- ; Sets the number of server processes created on startup. ; Used only with 'dynamic' pm.style ; default : min_spare + (max_spare - min_spare) / 2 ; pm.start_servers = 50 ; Sets the desired minimum number of idle server processes. ; Used only with 'dynamic' pm.style ; It's mandatory when pm is set to dynamic ; pm.min_spare_servers = 10 ; Sets the desired maximum number of idle server processes. ; Used only with 'dynamic' pm.style ; It's mandatory when pm is set to dynamic ; pm.max_spare_servers = 100 Expected result: should be able to start php-fpm server Actual result: -- the result is that on start of php-fpm server, the fpm gives out a config error if you use the above pasted configuration -- Edit this bug report at http://bugs.php.net/bug.php?id=51736&edit=1
Bug #51736 [Com]: configuration parsing problem
Edit report at http://bugs.php.net/bug.php?id=51736&edit=1 ID: 51736 Comment by: f...@php.net Reported by: mauro dot stettler at gmail dot com Summary: configuration parsing problem Status: Assigned Type: Bug Package: FPM related Operating System: suse linux (SLES11) PHP Version: Irrelevant Assigned To: fat New Comment: This bug has been corrected on revision 299141. Previous Comments: [2010-05-08 10:52:34] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=299141 Log: Fix #51736, wrong checks on dynamic parameters [2010-05-08 10:23:25] f...@php.net Can you please try the attached patch to confirm it fixes the bug ? Thx ++ Jerome [2010-05-08 10:22:21] f...@php.net The following patch has been added/updated: Patch Name: bug51736.patch Revision: 1273306941 URL: http://bugs.php.net/patch-display.php?bug=51736&patch=bug51736.patch&revision=1273306941 [2010-05-04 09:00:56] mauro dot stettler at gmail dot com Description: i tested the revision 298795 of php-fpm and i experienced that the config value of min_spare_servers always gets copied into the config value of max_spare_servers, which then means that start_servers will also have to be equal to this, Test script: --- ; Sets the number of server processes created on startup. ; Used only with 'dynamic' pm.style ; default : min_spare + (max_spare - min_spare) / 2 ; pm.start_servers = 50 ; Sets the desired minimum number of idle server processes. ; Used only with 'dynamic' pm.style ; It's mandatory when pm is set to dynamic ; pm.min_spare_servers = 10 ; Sets the desired maximum number of idle server processes. ; Used only with 'dynamic' pm.style ; It's mandatory when pm is set to dynamic ; pm.max_spare_servers = 100 Expected result: should be able to start php-fpm server Actual result: -- the result is that on start of php-fpm server, the fpm gives out a config error if you use the above pasted configuration -- Edit this bug report at http://bugs.php.net/bug.php?id=51736&edit=1
Bug #51736 [Asn->Csd]: configuration parsing problem
Edit report at http://bugs.php.net/bug.php?id=51736&edit=1 ID: 51736 Updated by: f...@php.net Reported by: mauro dot stettler at gmail dot com Summary: configuration parsing problem -Status: Assigned +Status: Closed Type: Bug Package: FPM related Operating System: suse linux (SLES11) PHP Version: Irrelevant Assigned To: fat New Comment: fixed in revision 299141 Previous Comments: [2010-05-08 10:54:03] f...@php.net This bug has been corrected on revision 299141. [2010-05-08 10:52:34] f...@php.net Automatic comment from SVN on behalf of fat Revision: http://svn.php.net/viewvc/?view=revision&revision=299141 Log: Fix #51736, wrong checks on dynamic parameters [2010-05-08 10:23:25] f...@php.net Can you please try the attached patch to confirm it fixes the bug ? Thx ++ Jerome [2010-05-08 10:22:21] f...@php.net The following patch has been added/updated: Patch Name: bug51736.patch Revision: 1273306941 URL: http://bugs.php.net/patch-display.php?bug=51736&patch=bug51736.patch&revision=1273306941 [2010-05-04 09:00:56] mauro dot stettler at gmail dot com Description: i tested the revision 298795 of php-fpm and i experienced that the config value of min_spare_servers always gets copied into the config value of max_spare_servers, which then means that start_servers will also have to be equal to this, Test script: --- ; Sets the number of server processes created on startup. ; Used only with 'dynamic' pm.style ; default : min_spare + (max_spare - min_spare) / 2 ; pm.start_servers = 50 ; Sets the desired minimum number of idle server processes. ; Used only with 'dynamic' pm.style ; It's mandatory when pm is set to dynamic ; pm.min_spare_servers = 10 ; Sets the desired maximum number of idle server processes. ; Used only with 'dynamic' pm.style ; It's mandatory when pm is set to dynamic ; pm.max_spare_servers = 100 Expected result: should be able to start php-fpm server Actual result: -- the result is that on start of php-fpm server, the fpm gives out a config error if you use the above pasted configuration -- Edit this bug report at http://bugs.php.net/bug.php?id=51736&edit=1
Bug #51648 [Opn]: Memory leak in infinite loop
Edit report at http://bugs.php.net/bug.php?id=51648&edit=1 ID: 51648 User updated by: shooreek at gmail dot com Reported by: shooreek at gmail dot com Summary: Memory leak in infinite loop Status: Open Type: Bug Package: SQLite related Operating System: WinXP SP3 PHP Version: 5.3.2 New Comment: Now I cannot provide exact information about modification of php.ini, but I can provide it later (two week's holiday). I modified memory_limit, post_max_size, extension_dir, uncommented some extensions like misql, mysqli, pdo_sqlite, sqlite3, curl. Nothing serious, only extensions from binary VC6 x86 Thread Safe (2010-Mar-04 20:11:08). As you can see, memory leak rate is not so great. You cannot reproduce leak at all, can you? Previous Comments: [2010-05-07 16:51:42] crrodriguez at opensuse dot org Cannot reproduce in linux, tell us if you have 3rd party extensions installed as well if you have modified php.ini. maybe Pierre can check this one out.. [2010-05-07 13:19:50] shooreek at gmail dot com Pakage changed to SQLite related [2010-05-04 11:48:26] shooreek at gmail dot com cbandy, you are right: with UPDATE or SELECT queries mem usage remains constant. But with INSERT queries mem usage grows up. I discovered some way to free this memory: you should unlink SQLite DB file and create new one, because $db->close() is _not_ enough! May be there are another ways to do it, but I do not know about their existence. May be someone knows? I think it real bug and it should be fixed. So, it is SQLite extension related bug. There is no such problem in Mysqli. P.S. I first post I wrote that Mysqli have the same problem as SQLite. My fault. The problem was in multiple calls mysqli_init() function. With SELECT, UPDATE, INSERT or UPDATE commands Mysqli do not have memory leaks. If memory leaks related with multiple mysqli_init() calls is a bug, I can report it in separate. Just let me know. Thank you for your attention. [2010-05-02 16:24:23] cbandy at jbandy dot com Inserting an infinite number of rows could easily lead to mem usage within SQLite (not PHP). By executing only UPDATE in the loop, DB size should stay constant. Then results should show PHP-SQLite execution leaks. [2010-04-24 18:43:44] fel...@php.net I can't reproduce it on Linux. 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/bug.php?id=51648 -- Edit this bug report at http://bugs.php.net/bug.php?id=51648&edit=1
[PHP-BUG] Bug #51771 [NEW]: fclose() seems not to unlock the file
From: Operating system: Linux PHP version: 5.3.2 Package: Filesystem function related Bug Type: Bug Bug description:fclose() seems not to unlock the file Description: We have a script that runs in a multiprocess way and it uses flock() for interprocess communication. Things worked fine until we moved to PHP 5.3.2 where all the processes started to hang all of a sudden. I debugged the issues and tried several fixes but they didn't solve it. I made an extensive log of all the script did in order to find out the reason, and I got a situation with 4 scripts running trying to get a non-blocking lock every second, and all of them wrote "lock failed" to the log. At the same time none of them was supposed to hold the lock at that time. Finally I added an flock($hLock, LOCK_UN); before every fclose($hLock); and it is only that that they stopped handing. Test script: --- $H=fopen($LockFile, 'a'); flock($H, LOCK_EX); //... //flock($H, LOCK_UN); - the fix fclose($H); Expected result: no deadlock Actual result: -- Deadlock -- Edit bug report at http://bugs.php.net/bug.php?id=51771&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51771&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51771&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51771&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51771&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51771&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51771&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51771&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51771&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51771&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51771&r=support Expected behavior: http://bugs.php.net/fix.php?id=51771&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51771&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51771&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51771&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51771&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=51771&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51771&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51771&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51771&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51771&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51771&r=mysqlcfg
Bug #51769 [Opn->Fbk]: the problem of fpm_conf.c
Edit report at http://bugs.php.net/bug.php?id=51769&edit=1 ID: 51769 Updated by: ka...@php.net Reported by: lxltiancai at 126 dot com Summary: the problem of fpm_conf.c -Status: Open +Status: Feedback Type: Bug Package: *General Issues Operating System: ubuntu 9.10 PHP Version: 5.3.2 New Comment: Please try using this snapshot: http://snaps.php.net/php6.0-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2010-05-08 04:58:16] lxltiancai at 126 dot com Description: when i start php-fpm,i met the fellowing message: [pool www] start_servers(18) must not be less than min_spare_servers(30) and not greater than max_spare_servers(30) but in fact,the value of min_spare_servers is 5; Test script: --- there is something wrong in line 459-460 of fpm_conf.c i think the correct code shoule be: } else if (config->pm_start_servers < config->pm_min_spare_servers || config->pm_start_servers > config->pm_max_spare_servers) { zlog(ZLOG_STUFF, ZLOG_ALERT, "[pool %s] start_servers(%d) must not be less than min_spare_servers(%d) and not greater than max_spare_servers(%d)", wp->config->name, config->pm_start_servers, config->pm_min_spare_servers, config->pm_max_spare_servers); -- Edit this bug report at http://bugs.php.net/bug.php?id=51769&edit=1
Bug #51769 [Fbk]: the problem of fpm_conf.c
Edit report at http://bugs.php.net/bug.php?id=51769&edit=1 ID: 51769 Updated by: ka...@php.net Reported by: lxltiancai at 126 dot com Summary: the problem of fpm_conf.c Status: Feedback Type: Bug Package: *General Issues Operating System: ubuntu 9.10 PHP Version: 5.3.2 New Comment: Hmm I meant try a snapshot from trunk where php-fpm is actively developed. I belive a similar bug if not the same was just fixed in trunk today Previous Comments: [2010-05-08 11:52:45] ka...@php.net Please try using this snapshot: http://snaps.php.net/php6.0-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2010-05-08 04:58:16] lxltiancai at 126 dot com Description: when i start php-fpm,i met the fellowing message: [pool www] start_servers(18) must not be less than min_spare_servers(30) and not greater than max_spare_servers(30) but in fact,the value of min_spare_servers is 5; Test script: --- there is something wrong in line 459-460 of fpm_conf.c i think the correct code shoule be: } else if (config->pm_start_servers < config->pm_min_spare_servers || config->pm_start_servers > config->pm_max_spare_servers) { zlog(ZLOG_STUFF, ZLOG_ALERT, "[pool %s] start_servers(%d) must not be less than min_spare_servers(%d) and not greater than max_spare_servers(%d)", wp->config->name, config->pm_start_servers, config->pm_min_spare_servers, config->pm_max_spare_servers); -- Edit this bug report at http://bugs.php.net/bug.php?id=51769&edit=1
Bug #51761 [Opn]: Memory Error: IPR in language scanner
Edit report at http://bugs.php.net/bug.php?id=51761&edit=1 ID: 51761 Updated by: ka...@php.net Reported by: russell dot tempero at rightnow dot com Summary: Memory Error: IPR in language scanner Status: Open Type: Bug Package: Scripting Engine problem Operating System: Linux PHP Version: 5.3.2 New Comment: Hi You should change the grammar in zend_language_scanner.l instead of the .c file which is generated based on the contains from the .l file. Else the patch looks good Previous Comments: [2010-05-07 00:21:08] russell dot tempero at rightnow dot com Here is some useful debug information if you wish to trace exactly where the IPRs are happening: . . . state: 476 char: ? addr: 0xf1c7885e state: 140 char: ? addr: 0xf1c7885e state: 121 char: ? addr: 0xf1c7885e state: -1 char: ? addr: 0xffce705b state: 166 char: ? addr: 0xf1c7885e state: 201 char: > addr: 0xf1c7885f state: 203 char: addr: 0xf1c78860 RUSSELL: YYCURSOR: 0xf1c78860 YYLIMIT: 0xf1c78861 state: 202 char: state: 0 char: state: 4 char: state: 3 char: RUSSELL: returning 0 in yy3 [2010-05-07 00:13:10] russell dot tempero at rightnow dot com Description: When running PHP through Purify, I am seeing Invalid Pointer Read (IPR) errors such as the following: IPR: Invalid pointer read: * This is occurring while in thread 8075: lex_scan [zend_language_scanner.c:3174] zendlex[zend_compile.c:4950] zendparse [zend_language_parser.c:3280] compile_file [zend_language_scanner.l:343] rnt_compile_file [rnt_opcode_cache.c:1008] compile_filename [zend_language_scanner.l:386] * Reading 1 byte from 0xf735f332 between the heap and the stack. It appears that script files are memory mapped and then a cursor pointer is used to iterate over the mapped memory. The problem is that the cursor pointer is not properly checked when reaching the end of the file and memory values are read that are not part of the mapped memory. I manually fixed one case of this (see attached diff). However, there are others. It looks like this file is generated (using flex?) so this is probably not actually a PHP issue. However, I thought I would start here. Let me know if this needs to be submitted to somebody else. -- Edit this bug report at http://bugs.php.net/bug.php?id=51761&edit=1
Bug #49500 [Com]: call_user_func object parameter is not passed as reference
Edit report at http://bugs.php.net/bug.php?id=49500&edit=1 ID: 49500 Comment by: schindler dot andor at pokhalo dot hu Reported by: casper at procurios dot nl Summary: call_user_func object parameter is not passed as reference Status: Bogus Type: Bug Package: Scripting Engine problem Operating System: Linux PHP Version: 5.3.0 New Comment: Still bogus in PHP 5.3.2, and it's platform irrelevant. I tested on Windows and Mac OS X too. someVar . "\n"; } $Object = new MyClass(); myFunction($Object); call_user_func('myFunction', $Object); Expected result: test test Actual result: -- test PHP warning Parameter 1 to myFunction() expected to be a reference, value given -- Edit this bug report at http://bugs.php.net/bug.php?id=49500&edit=1
[PHP-BUG] Bug #51772 [NEW]: php-fpm do not support PowerPC processors
From: Operating system: RedHat Ent. server 5.4-ppc64 PHP version: 5.3.2 Package: Compile Failure Bug Type: Bug Bug description:php-fpm do not support PowerPC processors Description: PHP-FPM sapi do not support PowerPC processor. Build server IBM JS20 bladeserver [r...@headnode ~]# uname -a Linux headnode.tst.local 2.6.18-194.el5 #1 SMP Tue Mar 16 22:03:12 EDT 2010 ppc64 ppc64 ppc64 GNU/Linux Test script: --- svn co http://svn.php.net/repository/php/php-src/trunk/sapi/fpm sapi/fpm ./buildconf --force ./configure --prefix=/opt/php --enable-fpm --build=powerpc-redhat-linux-gnu --host=powerpc-redhat-linux-gnu --target=ppc-redhat-linux-gnu make make install Expected result: Successfull compilation and php-fpm working Actual result: -- /bin/sh /home/php-5.3.2/libtool --silent --preserve-dup-deps --mode=compile cc -I/home/php-5.3.2/sapi/fpm -Isapi/fpm/ -I/home/php-5.3.2/sapi/fpm/ -DPHP_ATOM_INC -I/home/php-5.3.2/include -I/home/php-5.3.2/main -I/home/php-5.3.2 -I/home/php-5.3.2/ext/date/lib -I/home/php-5.3.2/ext/ereg/regex -I/usr/include/libxml2 -I/home/php-5.3.2/ext/sqlite3/libsqlite -I/home/php-5.3.2/TSRM -I/home/php-5.3.2/Zend-I/usr/include -g -O2 -fvisibility=hidden -c /home/php-5.3.2/sapi/fpm/fpm/fastcgi.c -o sapi/fpm/fpm/fastcgi.lo /bin/sh /home/php-5.3.2/libtool --silent --preserve-dup-deps --mode=compile cc -I/home/php-5.3.2/sapi/fpm -Isapi/fpm/ -I/home/php-5.3.2/sapi/fpm/ -DPHP_ATOM_INC -I/home/php-5.3.2/include -I/home/php-5.3.2/main -I/home/php-5.3.2 -I/home/php-5.3.2/ext/date/lib -I/home/php-5.3.2/ext/ereg/regex -I/usr/include/libxml2 -I/home/php-5.3.2/ext/sqlite3/libsqlite -I/home/php-5.3.2/TSRM -I/home/php-5.3.2/Zend-I/usr/include -g -O2 -fvisibility=hidden -c /home/php-5.3.2/sapi/fpm/fpm/fpm.c -o sapi/fpm/fpm/fpm.lo /bin/sh /home/php-5.3.2/libtool --silent --preserve-dup-deps --mode=compile cc -I/home/php-5.3.2/sapi/fpm -Isapi/fpm/ -I/home/php-5.3.2/sapi/fpm/ -DPHP_ATOM_INC -I/home/php-5.3.2/include -I/home/php-5.3.2/main -I/home/php-5.3.2 -I/home/php-5.3.2/ext/date/lib -I/home/php-5.3.2/ext/ereg/regex -I/usr/include/libxml2 -I/home/php-5.3.2/ext/sqlite3/libsqlite -I/home/php-5.3.2/TSRM -I/home/php-5.3.2/Zend-I/usr/include -g -O2 -fvisibility=hidden -c /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c -o sapi/fpm/fpm/fpm_children.lo In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:8, from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_atomic.h:124:2: error: #error unsupported processor. please write a patch and send it to me In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:8, from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_atomic.h:128: error: expected Ðââ¤)Ðâ⥠before Ðââ¤*Ðâ⥠token In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:16: error: expected specifier-qualifier-list before Ðââ¤atomic_tÐâ⥠make: *** [sapi/fpm/fpm/fpm_children.lo] Error 1 /bin/sh /home/php-5.3.2/libtool --silent --preserve-dup-deps --mode=compile cc -I/home/php-5.3.2/sapi/fpm -Isapi/fpm/ -I/home/php-5.3.2/sapi/fpm/ -DPHP_ATOM_INC -I/home/php-5.3.2/include -I/home/php-5.3.2/main -I/home/php-5.3.2 -I/home/php-5.3.2/ext/date/lib -I/home/php-5.3.2/ext/ereg/regex -I/usr/include/libxml2 -I/home/php-5.3.2/ext/sqlite3/libsqlite -I/home/php-5.3.2/TSRM -I/home/php-5.3.2/Zend-I/usr/include -g -O2 -fvisibility=hidden -c /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c -o sapi/fpm/fpm/fpm_children.lo In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:8, from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_atomic.h:124:2: error: #error unsupported processor. please write a patch and send it to me In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:8, from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_atomic.h:128: error: expected Ðââ¤)Ðâ⥠before Ðââ¤*Ðâ⥠token In file included from /home/php-5.3.2/sapi/fpm/fpm/fpm_children.c:28: /home/php-5.3.2/sapi/fpm/fpm/fpm_shm_slots.h:16: error: expected specifier-qualifier-list before Ðââ¤atomic_tÐâ⥠make: *** [sapi/fpm/fpm/fpm_children.lo] Error 1 -- Edit bug report at http://bugs.php.net/bug.php?id=51772&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51772&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51772&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51772&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51772&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51772&r=needdocs Fixed in release:
Bug #51768 [Opn]: Fallback to read_property causes subsequent crash
Edit report at http://bugs.php.net/bug.php?id=51768&edit=1 ID: 51768 Updated by: cataphr...@php.net Reported by: cataphr...@php.net Summary: Fallback to read_property causes subsequent crash Status: Open Type: Bug Package: Reproducible crash Operating System: Windows PHP Version: 5.3.2 New Comment: I got it backwards in the expected behavior and a bit in the description. What should give a fatal error is something like: $obj->prop = &$a; I said that $a = &$obj['prop'] emits an error. It doesn't. It emits a notice if the zval* returned by the read_dimension handler does not return a reference (Indirect modification of overloaded element). In fact both read_dimension and read_property without get_property_ptr_ptr behave correctly in the $obj->prop = &$a by emitting a fatal error: (Cannot assign by reference to overloaded object) The expected behavior should then be either mimic read_dimension (accept only references) or just throw an error. Previous Comments: [2010-05-08 04:14:05] cataphr...@php.net Description: When the get_property_ptr_ptr handler is omitted, zend_fetch_property_address falls back to read_property, but then the behavior in cases such as $a = &$obj->prop; deviates from that of $a = &$obj['prop']; which properly emits an error. The final result is a crash. Test script: --- exttest.h: #ifndef PHP_EXTTEST_H # define PHP_EXTTEST_H # ifdef HAVE_CONFIG_H # include # endif # include extern zend_module_entry exttest_module_entry; #define phpext_exttest_ptr &exttest_module_entry #endif exttest.c: #include "exttest.h" static zend_object_handlers object_handlers; static zend_object_value ce_create_object(zend_class_entry *class_type TSRMLS_DC) { zend_object_value zov; zend_object *zobj; zobj = emalloc(sizeof *zobj); zend_object_std_init(zobj, class_type TSRMLS_CC); zend_hash_copy(zobj->properties, &(class_type->default_properties), (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval*)); zov.handle = zend_objects_store_put(zobj, (zend_objects_store_dtor_t) zend_objects_destroy_object, (zend_objects_free_object_storage_t) zend_objects_free_object_storage, NULL TSRMLS_CC); zov.handlers = &object_handlers; return zov; } ZEND_MODULE_STARTUP_D(exttest) { zend_class_entry ce; zend_class_entry *ce_ptr; zval *property; ALLOC_PERMANENT_ZVAL(property); INIT_ZVAL(*property); Z_TYPE_P(property) = IS_LONG; Z_LVAL_P(property) = 20l; memcpy(&object_handlers, zend_get_std_object_handlers(), sizeof object_handlers); object_handlers.get_property_ptr_ptr = NULL; INIT_CLASS_ENTRY(ce, "TestClass", NULL); ce_ptr = zend_register_internal_class(&ce TSRMLS_CC); ce_ptr->create_object = ce_create_object; zend_declare_property_ex(ce_ptr, "prop", 4, property, ZEND_ACC_PUBLIC, NULL, 0 TSRMLS_CC); } zend_module_entry exttest_module_entry = { STANDARD_MODULE_HEADER, "exttest", NULL, /* Functions */ ZEND_MODULE_STARTUP_N(exttest) , /* MINIT */ NULL, /* MSHUTDOWN */ NULL, /* RINIT */ NULL, /* RSHUTDOWN */ NULL, /* MINFO */ NO_VERSION_YET, STANDARD_MODULE_PROPERTIES }; ZEND_GET_MODULE(exttest) config.m4: PHP_ARG_ENABLE(exttest, [Whether to enable the "exttest" extension], [ enable-exttest Enable "exttest" extension support]) if test $PHP_EXTTEST != "no"; then PHP_SUBST(EXTTEST_SHARED_LIBADD) PHP_NEW_EXTENSION(exttest, exttest.c, $ext_shared) fi test.php: prop; debug_zval_dump($obj); debug_zval_dump(&$a); $a = 40; debug_zval_dump($obj); debug_zval_dump(&$a); unset($a); debug_zval_dump($obj); Expected result: Expected an error saying the operation is not permitted (like when attempting $a = &obj['index'] where there's no get_property_ptr_ptr equivalent). Actual result: -- When thre's get_property_ptr_ptr: object(TestClass)#1 (1) refcount(2){ ["prop"]=> long(20) refcount(2) } object(TestClass)#1 (1) refcount(2){ ["prop"]=> &long(20) refcount(2) } &long(20) refcount(3) object(TestClass)#1 (1) refcount(2){ ["prop"]=> &long(40) refcount(2) } &long(40) refcount(3) object(TestClass)#1 (1) refcount(2){ ["prop"]=> long(40) refcount(1) } When there's no get_property_ptr_ptr, zend_fetch_property_address falls back to read_propert. Something happens afterwards that provokes the crash. object(TestClass)#1 (1) refcount(2){ ["prop"]=> long(20) refcount(2) } object(TestClass)#1 (1) refcount(2){ ["prop"]=> long(20) refcount(1) } &long(20) refcount(3) object(TestClass)#1 (1) refcount(2){ ["prop"]=> long(20) refcount(1) } &long(40) refcount(3) object(TestClass)#
Bug #30075 [Com]: Cannot redeclare function/class
Edit report at http://bugs.php.net/bug.php?id=30075&edit=1 ID: 30075 Comment by: rmac at iki dot fi Reported by: kj at legalizer dot dk Summary: Cannot redeclare function/class Status: No Feedback Type: Bug Package: Scripting Engine problem Operating System: WinXP PHP Version: 5CVS-2004-09-13 (dev) New Comment: I found out one way how this error message can happen: it happens if you declare a function with a reserved name. So try changing the name of function to something else. Previous Comments: [2010-03-10 09:38:30] eugenio at blux dot org Same problem (Cannot redeclare functions...) with php 5.2.3 and IIS 6 on windows 2003 Small Business Server. Php in ISAPI. [2008-09-29 21:23:54] jherer at gmail dot com Having the same problem with 5.1.0 on windows 2003. Is there a solution for this problem? [2008-02-11 01:55:34] wes at clevemail dot net I am brand new to PHP. Here are my particulars with this problem. I am running: Windows XP 5.1.2600 Service Pack 2 Build 2600 IIS 5.1 PHP 5.2.5 installed from php-5.2.5-Win32.zip defined to IIS using php5isapi.dll MySQL 5.0.51a Win32 phpMyAdmin 2.1.4 I built a test page that only contains phpinfo(). It loads fine. When I load phpMyAdmin, I get the login page. After supplying my user name and password, I get: Fatal error: Cannot redeclare pma_ifsetor() (previously declared in D:\My Web Sites\phpMyAdmin\libraries\core.lib.php:38) in D:\My Web Sites\phpMyAdmin\libraries\core.lib.php on line 45 Notice that the previous declaration and the current declaration are in the same file (including the same path) at different line numbers. The fact is that in this file, line 38 is the PMA_ifSetOr() function declaration, while line 45 is then end of the fPMA_ifSetOr function (i.e. the ending "}"): 38 function PMA_ifSetOr(&$var, $default = null, $type = 'similar') 39 { 40 if (! PMA_isValid($var, $type, $default)) { 41 return $default; 42 } 43 44 return $var; 45 } One other interesting observation: If I restart IIS and then press F5, the page then loads successfully. Once I get this error, pressing F5 returns the same error until I restart IIS. Then (at least every time so far), the page loads fine. [2007-11-27 18:53:39] brianleeholub at yahoo dot com After trying apache 2.2.4 on the same machine/same php the content flashes up and then firefox goes to an error page. In the event log I get this: Event Type: Error Event Source: Application Error Event Category: (100) Event ID: 1000 Date: 11/27/2007 Time: 10:47:14 AM User: N/A Computer: BH-DEV4 Description: Faulting application httpd.exe, version 2.2.4.0, faulting module php5ts.dll, version 5.2.5.5, fault address 0x000ce75a. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: : 41 70 70 6c 69 63 61 74 Applicat 0008: 69 6f 6e 20 46 61 69 6c ion Fail 0010: 75 72 65 20 20 68 74 74 ure htt 0018: 70 64 2e 65 78 65 20 32 pd.exe 2 0020: 2e 32 2e 34 2e 30 20 69 .2.4.0 i 0028: 6e 20 70 68 70 35 74 73 n php5ts 0030: 2e 64 6c 6c 20 35 2e 32 .dll 5.2 0038: 2e 35 2e 35 20 61 74 20 .5.5 at 0040: 6f 66 66 73 65 74 20 30 offset 0 0048: 30 30 63 65 37 35 61 00ce75a [2007-11-27 18:34:44] brianleeholub at yahoo dot com This is happening in 5.2.5 (also win2k3-sp2, iis6, isapi). Since most of the pages in the application I'm testing are fairly complex, I created a test script with a single function to do some basic math. After browsing around a bit in the main application (and seeing the "redeclare" bug, probably 15% of the page loads, with random functions being the culprit even when reloading the same page), I pointed at my test script and refreshed once or twice and got: PHP has encountered an Access Violation at 01B09F7E The main application is heavy in SOAP. 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/bug.php?id=30075 -- Edit this bug report at http://bugs.php.net/bug.php?id=30075&edit=1
[PHP-BUG] Bug #51773 [NEW]: XMLWrite double encode entities
From: Operating system: Win PHP version: 5.3.2 Package: XML Writer Bug Type: Bug Bug description:XMLWrite double encode entities Description: XMLWrite double encode entities. For example, becomes , or & becomes & Expected result: Entities must remains intact. Maybe something like $double_encode of htmlentities function will be useful... -- Edit bug report at http://bugs.php.net/bug.php?id=51773&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51773&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51773&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51773&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51773&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51773&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51773&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51773&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51773&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51773&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51773&r=support Expected behavior: http://bugs.php.net/fix.php?id=51773&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51773&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51773&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51773&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51773&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=51773&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51773&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51773&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51773&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51773&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51773&r=mysqlcfg
Bug #51700 [Opn->Asn]: does not work properly for swf / swc files
Edit report at http://bugs.php.net/bug.php?id=51700&edit=1 ID: 51700 Updated by: ka...@php.net Reported by: shaedomail at gmail dot com Summary: does not work properly for swf / swc files -Status: Open +Status: Assigned Type: Bug Package: GetImageSize related Operating System: WA(MP) and LA(MP) PHP Version: 5.2.13 -Assigned To: +Assigned To: kalle New Comment: Right, so did I understand this correctly; image_type_to_extension(13) /* ala. IMAGETYPE_SWC */ should return swc, not swf? Previous Comments: [2010-04-30 06:15:18] shaedomail at gmail dot com Description: "; // swf echo image_type_to_extension (13).""; // swf // should be '.swc' //if $_FILES['Filedata'] is a swf file and you list(,,$image_type) = getimagesize($_FILES['Filedata']["tmp_name"]); // then echo $image_type;// 13 // should be '4' I tried this with a variety of swf files, compiled using CS4, CS3, for AS2 and AS3, for FP10 and FP8 but the results are the same regardless (did not try AS3 for FP8) Test script: --- "; // swf echo image_type_to_extension (13).""; // swf // if $_FILES['Filedata'] is a swf file and you //list(,,$image_type) = getimagesize($_FILES['Filedata']["tmp_name"]); // then //echo $image_type;// 13 Expected result: "; // swf echo image_type_to_extension (13).""; // swc Actual result: -- "; // swf echo image_type_to_extension (13).""; // swf -- Edit this bug report at http://bugs.php.net/bug.php?id=51700&edit=1
[PHP-BUG] Bug #51774 [NEW]: ./configure fails with the path to the source directory includes a space
From: Operating system: Mac OS X 10.6.3 PHP version: 5.2SVN-2010-05-09 (snap) Package: *Compile Issues Bug Type: Bug Bug description:./configure fails with the path to the source directory includes a space Description: If you attempted to run ./configure from on source code found in a path that includes a space. That space doesn't have to be in the folder containing the source, just in the path. For Example: /Users/ericstewart/Desktop/PHP Test/php52 Output from ./configure: creating cache ./config.cache checking for Cygwin environment... no checking for mingw32 environment... no checking for egrep... grep -E checking for a sed that does not truncate output... /usr/bin/sed checking host system type... i386-apple-darwin10.3.0 checking target system type... i386-apple-darwin10.3.0 checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... gcc -E checking for icc... no checking for suncc... no checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking whether ln -s works... yes checking for system library directory... lib checking whether to enable runpaths... yes checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking for gawk... no checking for nawk... no checking for awk... awk checking if awk is broken... no checking for bison... bison -y checking for bison version... 2.3 (ok) checking for flex... flex checking for yywrap in -lfl... yes checking lex output file root... lex.yy checking whether yytext is a pointer... yes checking for working const... yes checking for flex version... invalid configure: warning: flex versions supported for regeneration of the Zend/PHP parsers: 2.5.4 (found: 2.5.35) checking for re2c... no configure: warning: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking whether gcc supports -no-cpp-precomp... yes checking whether to force non-PIC code in shared modules... no checking whether /dev/urandom exists... yes checking for pthreads_cflags... checking for pthreads_lib... Configuring SAPI modules checking for AOLserver support... no checking for Apache 1.x module support via DSO through APXS... no checking for Apache 1.x module support... no checking whether to enable Apache charset compatibility option... no checking for Apache 2.0 filter-module support via DSO through APXS... no checking for Apache 2.0 handler-module support via DSO through APXS... yes checking for Apache 1.x (hooks) module support via DSO through APXS... no checking for Apache 1.x (hooks) module support... no checking whether to enable Apache charset compatibility option... no checking for Caudium support... no checking for CLI build... sed: /Users/ericstewart/Desktop/PHP: No such file or directory sed: Test/php52/sapi/cli/Makefile.frag: No such file or directory yes checking for Continuity support... no checking for embedded SAPI library support... no checking for Zeus ISAPI support... no checking for Milter support... no checking for NSAPI support... no checking for PHTTPD support... no checking for Pi3Web support... no checking whether Roxen module is build using ZTS... no checking for Roxen/Pike support... checking for thttpd... no checking for TUX... no checking for webjames... no checking for chosen SAPI module... apache2handler Running system checks checking for sendmail... /usr/sbin/sendmail checking whether system uses EBCDIC... no checking whether byte ordering is bigendian... no checking whether writing to stdout works... This is the test message -- yes checking for socket... yes checking for socketpair... yes checking for htonl... yes checking for gethostname... yes checking for gethostbyaddr... yes checking for yp_get_default_domain... yes checking for dlopen... yes checking for sin in -lm... yes checking for res_search... yes checking for inet_aton... yes checking for dn_skipname... no checking for __dn_skipname... yes checking for ANSI C header files... yes checking for dirent.h that defines DIR... yes checking for opendir in -ldir... no checking for inttypes.h... yes checking for stdint.h... yes checking for dirent.h... yes checking for ApplicationServices/ApplicationServices.h... yes checking for sys/param.h... yes checking for sys/types.h... yes checking for sys/time.h... yes checking for netinet/in.h... yes checking for alloca.h... yes checking for arpa/inet.h... yes checking for arpa/nameser.h... yes checking for assert.h... yes checking for crypt.h... no checking for fcntl.h... yes checking for grp.h... yes checking for ieeefp.h... no checking for langin
[PHP-BUG] Bug #51775 [NEW]: Chunked response parsing error
From: Operating system: CentOS 4.8 PHP version: 5.3SVN-2010-05-09 (snap) Package: SOAP related Bug Type: Bug Bug description:Chunked response parsing error Description: I was getting an error from a SoapClient call: "Error Fetching http body, No Content-Length, connection closed or chunked data". Thing was I couldn't see any problem with the HTTP response. I tracked the problem down to the get_http_body function in ext/soap/php_http.c, where it reads the chunk size using php_stream_gets(). That's returning the chunk size plus the CR (0d) but leaving the LF (0a) unread. Then the unread LF gets read with HTTP chunk, and the attempt to read the next chunk size starts with the last character of the HTTP chunk, since it's behind one thanks to the unread LF. Here's a chunk of the response that throws it off, with the chunk size (01bc) in the middle, surrounded by CR/LF pairs. 0850 3b 20 63 68 61 72 73 65 74 3d 22 75 74 66 2d 38 |; charset="utf-8| 0860 22 0d 0a 0d 0a 30 30 30 30 30 31 62 63 0d 0a 3c |"01bc..<| 0870 65 6e 76 3a 45 6e 76 65 6c 6f 70 65 20 78 6d 6c |env:Envelope xml| I added a little code under the line that adjusts the http buffer allocation, and above the loop that reads the chunk, and this solved the problem for me: ch = php_stream_getc(stream); /* php_stream_gets may stop after CR and leave LF in the buffer. If so, we need to eat it. */ if (ch != '\n') { // Nope, it wasn't a LF. Put it at the start of the current buffer, and advance one character. http_buf[http_buf_size] = ch; len_size++; http_buf_size++; } This reads the next character, and if it is an LF it eats it, and if it isn't it adds it to the http buffer. I wanted to run this by someone more experienced hacking on the php source before going any further to make sure the bug is legit, and the fix looks at all sane. -- Edit bug report at http://bugs.php.net/bug.php?id=51775&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51775&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51775&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51775&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51775&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51775&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51775&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51775&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51775&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51775&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51775&r=support Expected behavior: http://bugs.php.net/fix.php?id=51775&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51775&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51775&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51775&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51775&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=51775&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51775&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51775&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51775&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51775&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51775&r=mysqlcfg