Bug #62631 [Opn->Dup]: Malformed error messages (contain invalid characters)

2012-07-21 Thread rasmus
Edit report at https://bugs.php.net/bug.php?id=62631&edit=1

 ID: 62631
 Updated by: ras...@php.net
 Reported by:bugs dot php dot net at majkl578 dot cz
 Summary:Malformed error messages (contain invalid
 characters)
-Status: Open
+Status: Duplicate
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Debian
 PHP Version:5.4.5
 Block user comment: N
 Private report: N

 New Comment:

Right, thought so.


Previous Comments:

[2012-07-22 03:29:57] bugs dot php dot net at majkl578 dot cz

Yes, 3.1.11-dev. After updating to 3.1.11 release, the problem seems to be gone.


[2012-07-22 03:13:00] ras...@php.net

Are you using APC? If so, which version?


[2012-07-22 03:09:19] bugs dot php dot net at majkl578 dot cz

Description:

After running a test script below, CLI SAPI correctly outputs an expected error 
message, but FPM SAPI (at least) doesn't. The error message contains some 
invalid characters after the class name. Also the name of class & method are 
completely missing in the message.
I also attached an url-encoded version (to preserve invalid characters) of the 
message caught by error_get_last() in a shutdown handler.

Test script:
---
bar();

Expected result:

Fatal error: Call to undefined method stdClass::bar() in /www/temp.php on line 
10

Actual result:
--
Fatal error: in /www/temp.php on line 10



URL-encoded version of the error message:
Fatal+Error+Call+to+undefined+method+stdClass%E0%08K%B4c%F0%CB%DB%0C%3A%3Abar()






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62631&edit=1


Bug #62631 [Fbk->Opn]: Malformed error messages (contain invalid characters)

2012-07-21 Thread bugs dot php dot net at majkl578 dot cz
Edit report at https://bugs.php.net/bug.php?id=62631&edit=1

 ID: 62631
 User updated by:bugs dot php dot net at majkl578 dot cz
 Reported by:bugs dot php dot net at majkl578 dot cz
 Summary:Malformed error messages (contain invalid
 characters)
-Status: Feedback
+Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Debian
 PHP Version:5.4.5
 Block user comment: N
 Private report: N

 New Comment:

Yes, 3.1.11-dev. After updating to 3.1.11 release, the problem seems to be gone.


Previous Comments:

[2012-07-22 03:13:00] ras...@php.net

Are you using APC? If so, which version?


[2012-07-22 03:09:19] bugs dot php dot net at majkl578 dot cz

Description:

After running a test script below, CLI SAPI correctly outputs an expected error 
message, but FPM SAPI (at least) doesn't. The error message contains some 
invalid characters after the class name. Also the name of class & method are 
completely missing in the message.
I also attached an url-encoded version (to preserve invalid characters) of the 
message caught by error_get_last() in a shutdown handler.

Test script:
---
bar();

Expected result:

Fatal error: Call to undefined method stdClass::bar() in /www/temp.php on line 
10

Actual result:
--
Fatal error: in /www/temp.php on line 10



URL-encoded version of the error message:
Fatal+Error+Call+to+undefined+method+stdClass%E0%08K%B4c%F0%CB%DB%0C%3A%3Abar()






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62631&edit=1


Bug #62631 [Opn->Fbk]: Malformed error messages (contain invalid characters)

2012-07-21 Thread rasmus
Edit report at https://bugs.php.net/bug.php?id=62631&edit=1

 ID: 62631
 Updated by: ras...@php.net
 Reported by:bugs dot php dot net at majkl578 dot cz
 Summary:Malformed error messages (contain invalid
 characters)
-Status: Open
+Status: Feedback
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Debian
 PHP Version:5.4.5
 Block user comment: N
 Private report: N

 New Comment:

Are you using APC? If so, which version?


Previous Comments:

[2012-07-22 03:09:19] bugs dot php dot net at majkl578 dot cz

Description:

After running a test script below, CLI SAPI correctly outputs an expected error 
message, but FPM SAPI (at least) doesn't. The error message contains some 
invalid characters after the class name. Also the name of class & method are 
completely missing in the message.
I also attached an url-encoded version (to preserve invalid characters) of the 
message caught by error_get_last() in a shutdown handler.

Test script:
---
bar();

Expected result:

Fatal error: Call to undefined method stdClass::bar() in /www/temp.php on line 
10

Actual result:
--
Fatal error: in /www/temp.php on line 10



URL-encoded version of the error message:
Fatal+Error+Call+to+undefined+method+stdClass%E0%08K%B4c%F0%CB%DB%0C%3A%3Abar()






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62631&edit=1


[PHP-BUG] Bug #62631 [NEW]: Malformed error messages (contain invalid characters)

2012-07-21 Thread bugs dot php dot net at majkl578 dot cz
From: bugs dot php dot net at majkl578 dot cz
Operating system: Debian
PHP version:  5.4.5
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Malformed error messages (contain invalid characters)

Description:

After running a test script below, CLI SAPI correctly outputs an expected
error message, but FPM SAPI (at least) doesn't. The error message contains
some invalid characters after the class name. Also the name of class &
method are completely missing in the message.
I also attached an url-encoded version (to preserve invalid characters) of
the message caught by error_get_last() in a shutdown handler.

Test script:
---
bar();

Expected result:

Fatal error: Call to undefined method stdClass::bar() in /www/temp.php on
line 10

Actual result:
--
Fatal error: in /www/temp.php on line 10



URL-encoded version of the error message:
Fatal+Error+Call+to+undefined+method+stdClass%E0%08K%B4c%F0%CB%DB%0C%3A%3Abar()

-- 
Edit bug report at https://bugs.php.net/bug.php?id=62631&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62631&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62631&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62631&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62631&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62631&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62631&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62631&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62631&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62631&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62631&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62631&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62631&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62631&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62631&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62631&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62631&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62631&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62631&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62631&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62631&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62631&r=mysqlcfg



Bug #52257 [Com]: module php5-librdf causes libxslt's security module to fail

2012-07-21 Thread jdmadea at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=52257&edit=1

 ID: 52257
 Comment by: jdmadea at gmail dot com
 Reported by:matth at mlalonde dot net
 Summary:module php5-librdf causes libxslt's security module
 to fail
 Status: Open
 Type:   Bug
 Package:XSLT related
 Operating System:   Ubuntu LTS
 PHP Version:5.3.2
 Block user comment: N
 Private report: N

 New Comment:

I have some PHP code using librdf. I use php from the command line to run unit 
tests. I also use it to generate documentation with phpDocumentor which, of 
course, uses libxslt. 

It took a while to work out why phpDocumentor was failing. The error, for the 
sake of people searching and having difficulty finding any info, was:

PHP Warning:  XSLTProcessor::importStylesheet(): error in 
/usr/share/php/phpDocumentor/src/phpDocumentor/Plugin/Core/Transformer/Writer/Xs
l.php on line 62


> It's using libxslt as part of the GRDDL rdf parser to execute XSLT scripts 
> off 
> the web, never from local files.  So it makes sense to refuse any local file 
> read/write as the default security policy.

That seems like an unnecessary policy to me. Surely remote files are generally 
less safe than local ones.


Previous Comments:

[2010-08-06 19:45:04] dave at dajobe dot org

(Found the add comment button!)

Just to explain a bit more why raptor does this.

It's using libxslt as part of the GRDDL rdf parser to execute XSLT scripts off 
the web, never from local files.  So it makes sense to refuse any local file 
read/write as the default security policy.

This does however conflict with general user-use of libxslt on local files in 
another module, such as PHP's xslt module.

So in one memory namespace, you need to be both restrictive and permissive, yet 
the *default* security policy can only be set libxslt-wide:
http://www.xmlsoft.org/XSLT/html/libxslt-security.html#xsltSetDefaultSecurityPrefs

The context-specific policy can be different:
http://www.xmlsoft.org/XSLT/html/libxslt-security.html#xsltSetCtxtSecurityPrefs


[2010-08-06 18:58:02] lsm...@php.net

some additional infos from Dave Beckett:
but anyway, more info at
http://bugs.librdf.org/mantis/view.php?id=379

I found I could duplicate the error and as I suspected if I made raptor skip 
over xsltSetSecurityPrefs()  and xsltSetDefaultSecurityPrefs() calls, the 
program works as expected.

I can probably patch raptor to fix this, then patch the librdf-php to use that 
fix, but that's quite indirect.

Seems all libxslt users in the same memory space will have this issue.


[2010-08-06 15:35:38] lsm...@php.net

to add some more context about the issue, i talked to the author of php rdf ext 
on the #reland freenode IRC channel:

[15:23]  lsmith: it's not the php module, it's raptor which redland uses
[15:23]  it sets the libxslt security policy
[15:24]  http://librdf.org/raptor/api-1.4/raptor-section-
general.html#raptor-set-libxslt-security-preferences
[15:25]  it's hard to do - how is raptor/redland suppose to know when a 
calling application is also wanting to adjust parameters of a shared library
[15:26]  it's the calling app's responsibility - php in this case


[2010-07-30 10:55:44] penny at liip dot ch

I had exactly the same problem with the following versions:

libxslt1.1  1.1.24-2
php55.2.6.dfsg.1-1+lenny8
php5-librdf 1.0.7.1-1+b1

Purging php5-librdf fixed the problem.


[2010-07-06 00:46:03] matth at mlalonde dot net

Description:

I have been able to replicate under three environment running Ubuntu LTS php5 
(cli, cgi or mod_php), libxslt 1.1.26 and the php5 module and librdf0 and the 
php5 module.

With the above setup, any  call will fail 
with the error

XSLTProcessor::importStylesheet(): Local file read for /path/to/local/file.xsl 
refused

Using XSLCache will result in a segfault and no errors.

Removing php5's librdf module fixes the issue.

Test script:
---
# a.php 
load($xsl_filename);
$xsl->importStyleSheet($doc);

$doc->load($xml_filename);
echo $xsl->transformToXML($doc);

# collection.xml

 
  Fight for your mind
  Ben Harper
  1995
 
 
  Electric Ladyland
  Jimi Hendrix
  1997
 


# collection.xsl
http://www.w3.org/1999/XSL/Transform";>
 
 
 
 
  Hey! Welcome to 's sweet CD collection!
  
 
 
  
  by  - 
  
 


# collection2.xsl
http://www.w3.org/1999/XSL/Transform";>
 
 
 
  Hey! Welcome to 's sweet CD collection!
  
 
 
  
  by00  - 
  
 



Expected result:

A parsed XSLT document with the imported stylesheets. And no errors ;)

Act

Bug #62629 [Csd]: IteratorIterator doesn't delegate count() method

2012-07-21 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62629&edit=1

 ID: 62629
 Updated by: larue...@php.net
 Reported by:zoeslam at gmail dot com
 Summary:IteratorIterator doesn't delegate count() method
 Status: Closed
 Type:   Bug
 Package:SPL related
 Operating System:   Ubuntu 12.04
 PHP Version:5.4.5
 Assigned To:colder
 Block user comment: N
 Private report: N

 New Comment:

refer to the commit log of #62616


Previous Comments:

[2012-07-21 14:45:46] larue...@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




[2012-07-21 09:05:09] larue...@php.net

yeah, the reason should be the same.


[2012-07-21 08:29:44] zoeslam at gmail dot com

Description:

This bug report MAY be similar to:

https://bugs.php.net/bug.php?id=62616

But behave differently

Test script:
---
class MyFile extends SplFileObject
{
private $x = 10;
private $y = 20;

public function setX($x) { $this->x = $x; }
public function setY($y) { $this->y = $y; }

public function getX()   { return $this->x; }
public function count()  { return $this->y; }
}

$myFile = new MyFile(__FILE__);

var_dump($myFile->getX());
var_dump($myFile->count());

$myFile->setX(15);
$myFile->setY(25);

var_dump($myFile->getX());
var_dump($myFile->count());

$ii = new IteratorIterator($myFile);

var_dump($ii->getX());
var_dump($ii->count());

Expected result:

int(10)
int(20)
int(15)
int(25)
int(15)
int(25)

Actual result:
--
int(10)
int(20)
int(15)
int(25)
int(15)

Notice: Undefined property: IteratorIterator::$y in /tmp/it.php on line 12
NULL






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62629&edit=1


Bug #62629 [Asn->Csd]: IteratorIterator doesn't delegate count() method

2012-07-21 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62629&edit=1

 ID: 62629
 Updated by: larue...@php.net
 Reported by:zoeslam at gmail dot com
 Summary:IteratorIterator doesn't delegate count() method
-Status: Assigned
+Status: Closed
 Type:   Bug
 Package:SPL related
 Operating System:   Ubuntu 12.04
 PHP Version:5.4.5
 Assigned To:colder
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:

[2012-07-21 09:05:09] larue...@php.net

yeah, the reason should be the same.


[2012-07-21 08:29:44] zoeslam at gmail dot com

Description:

This bug report MAY be similar to:

https://bugs.php.net/bug.php?id=62616

But behave differently

Test script:
---
class MyFile extends SplFileObject
{
private $x = 10;
private $y = 20;

public function setX($x) { $this->x = $x; }
public function setY($y) { $this->y = $y; }

public function getX()   { return $this->x; }
public function count()  { return $this->y; }
}

$myFile = new MyFile(__FILE__);

var_dump($myFile->getX());
var_dump($myFile->count());

$myFile->setX(15);
$myFile->setY(25);

var_dump($myFile->getX());
var_dump($myFile->count());

$ii = new IteratorIterator($myFile);

var_dump($ii->getX());
var_dump($ii->count());

Expected result:

int(10)
int(20)
int(15)
int(25)
int(15)
int(25)

Actual result:
--
int(10)
int(20)
int(15)
int(25)
int(15)

Notice: Undefined property: IteratorIterator::$y in /tmp/it.php on line 12
NULL






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62629&edit=1


Bug #62616 [Ver->Csd]: ArrayIterator::count() from IteratorIterator instance gives Segmentation fault

2012-07-21 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62616&edit=1

 ID: 62616
 Updated by: larue...@php.net
 Reported by:zoeslam at gmail dot com
 Summary:ArrayIterator::count() from IteratorIterator
 instance gives Segmentation fault
-Status: Verified
+Status: Closed
 Type:   Bug
 Package:SPL related
 Operating System:   Ubuntu 12.04
 PHP Version:5.4.5
-Assigned To:colder
+Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:

[2012-07-21 14:43:52] larue...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=0c996613c0173708381f4bfcd28d2441360bc701
Log: Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance 
gives Segmentation fault)


[2012-07-21 08:31:22] zoeslam at gmail dot com

I've discovered a similar misbehaviour:

https://bugs.php.net/bug.php?id=62629


[2012-07-20 17:27:43] larue...@php.net

I've find the reason,  but seems not easy to fix.

$ii->count, will finally call to arrayObject->count (due to implemention of 
spl_dual_it_get_method).

but arrayObject->count will take the object as a spl_array_object, which is 
totally different struct with spl_dual_it_object, then in the 
spl_array_object_count_elements_helper , it will make the object struct 
mess(via 
update pos)


[2012-07-20 13:57:50] jpa...@php.net

I can reproduce on 5.3.14

I can only reproduce calling the method directly.
Calling count($ii) instead of $ii->count() wont segfault


[2012-07-20 12:54:55] f...@php.net

BT

#0  0x7fdfaf4221d8 in ?? ()
#1  0x00594a41 in spl_dual_it_free (intern=0x7fdfaf53fa20) at 
/opt/src/php-5.4.5/ext/spl/spl_iterators.c:1585
#2  spl_dual_it_dtor (_object=0x7fdfaf53fa20, handle=) at 
/opt/src/php-5.4.5/ext/spl/spl_iterators.c:2237
#3  0x006a7b20 in zend_objects_store_del_ref_by_handle_ex (handle=2, 
handlers=) at /opt/src/php-5.4.5/Zend/zend_objects_API.c:206
#4  0x006a7b63 in zend_objects_store_del_ref (zobject=0x7fdfaf53f990) 
at 
/opt/src/php-5.4.5/Zend/zend_objects_API.c:172
#5  0x00674082 in _zval_dtor (zvalue=) at /opt/src/php-
5.4.5/Zend/zend_variables.h:35
#6  _zval_ptr_dtor (zval_ptr=0x7fdfaf53fb30) at /opt/src/php-
5.4.5/Zend/zend_execute_API.c:438
#7  _zval_ptr_dtor (zval_ptr=0x7fdfaf53fb30) at /opt/src/php-
5.4.5/Zend/zend_execute_API.c:427
#8  0x0068e28b in zend_hash_apply_deleter (ht=ht@entry=0xd34508, 
p=p@entry=0x7fdfaf53fb18) at /opt/src/php-5.4.5/Zend/zend_hash.c:650
#9  0x0068fdd1 in zend_hash_reverse_apply (ht=0xd34508, 
apply_func=apply_func@entry=0x673f10 ) at /opt/src/php-
5.4.5/Zend/zend_hash.c:804
#10 0x0067438b in shutdown_destructors () at /opt/src/php-
5.4.5/Zend/zend_execute_API.c:217
#11 0x006826c0 in zend_call_destructors () at /opt/src/php-
5.4.5/Zend/zend.c:925
#12 0x00624805 in php_request_shutdown (dummy=dummy@entry=0x0) at 
/opt/src/php-5.4.5/main/main.c:1723
#13 0x00726004 in do_cli (argc=2, argv=0x7fff5ea442f8) at /opt/src/php-
5.4.5/sapi/cli/php_cli.c:1174
#14 0x00428455 in main (argc=2, argv=0x7fff5ea442f8) at /opt/src/php-
5.4.5/sapi/cli/php_cli.c:1364




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=62616


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62616&edit=1


Bug #62571 [Opn]: Postgres PDO connections fail after SIGCHLD called

2012-07-21 Thread spiros_ioannou at yahoo dot gr
Edit report at https://bugs.php.net/bug.php?id=62571&edit=1

 ID: 62571
 User updated by:spiros_ioannou at yahoo dot gr
 Reported by:spiros_ioannou at yahoo dot gr
 Summary:Postgres PDO connections fail after SIGCHLD called
 Status: Open
 Type:   Bug
 Package:PDO related
 Operating System:   Linux
 PHP Version:5.3.14
 Block user comment: N
 Private report: N

 New Comment:

When using persistent connections, even if reopening a new connection *after* 
forking, the connection fails. The only way to have DB connections is to reopen 
them after forking, with PDO::ATTR_PERSISTENT => false


Previous Comments:

[2012-07-16 00:12:14] spiros_ioannou at yahoo dot gr

I revoke the statement of SIGCHLD, it happens even without the handler in some 
situations, the behaviour seems erratic. Perhaps the database connection is 
shared with the children, and when the child dies the db variable the 
connection is closed. 

I tried closing the DB connection first thing on the child but with no results, 
the error still appears when the child dies.


[2012-07-15 23:27:50] spiros_ioannou at yahoo dot gr

Description:

When using pcntl_fork to fork children, and *only* the parent uses the Postgres 
PDO database connection, the connection becomes unusable after the first child 
exits and the signal handler is called. If SIGCHLD signal handler is omitted 
PDO works normally for parent. Tested with and without persistent connections.
Possible relevant bugs: 48447, 45797

Actual result:
--
PHP Warning:  PDOStatement::execute(): SQLSTATE[HY000]: General error: 7 server 
closed the connection unexpectedly
This probably means the server terminated abnormally






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62571&edit=1


[PHP-BUG] Req #62630 [NEW]: issues with starting FPM in conditions of high load

2012-07-21 Thread christian dot lawrence at calorieking dot com
From: christian dot lawrence at calorieking dot com
Operating system: 
PHP version:  5.4.5
Package:  FPM related
Bug Type: Feature/Change Request
Bug description:issues with starting FPM in conditions of high load

Description:

We had to start our FPM service during peak time, so traffic to the website
was already heavily loaded.  The FPM service is configured for pm =
dynamic.

To take the initial spike in load off the FPM service we tried to inflate
pm.start_servers only to discover that we can not set it higher than the
value of the pm.max_spare_servers setting.

The pm.max_spare_servers setting essentially defines the maximum number of
idle children in the pool, which when exceeded, FPM will kill off idle
children starting with the oldest first at a rate of one every second.

The reasoning is unclear why pm.start_servers should be possibly
constrained by such an "idle" pool size in the first place?

Pressing on, we also discovered issues with the pm.min_spare_servers
setting, which essentially defines the number of additional spare children
to spawn when the number of idle children in the pool drops below this
value.  This value can not be set higher than pm.max_spare_servers.  Again,
the reasoning behind this is unclear?

If pm.min_spare_servers is set to the same value as pm.max_spare_servers
then this means that the pool size can only grow in multiples of
pm.max_spare_servers or fewer.  Or so we thought...

It turns out that FPM is hard-coded to spawn no more than 32 children per
second only if pm.min_spare_servers is set to any value higher than 32.

As an extreme case, assume for the moment pm.max_children to be 256 and
there are 0 idle children at any point in time.  With pm.min_spare_servers
set to a value higher than 32 and pm.start_servers and pm.max_spare_servers
both set to 32, then starting FPM would take an additional 7 seconds to
spin up to maximum capacity.

Raising pm.max_spare_servers and hence pm.start_servers helps to reduce the
spin up time, but involves another reconfiguration and restart during
offpeak time to restore the original configuration.

To avoid such a costly spin up time under high load conditions followed by
an unnecessary reconfiguration later, it is beneficial to initially start a
high number of children with a slow kill off of excess idle children when
demand recedes, rather than a slow ramp up of children to meet the demand.

I propose the following changes be made:

 1. The configuration constraint for pm.start_servers be replaced with it
having a value between 1 and pm.max_children inclusive and not a value
between pm.min_spare_servers and pm.max_spare_servers inclusive (the notion
of pm.min_spare_servers as a lower constraint for pm.start_servers is
nonsensical).

 2. The configuration constraint for pm.min_spare_servers be replaced with
it having a value between 1 and (pm.max_children - pm.max_spare_servers)
inclusive.  If this value is 0, then there will be no growth in pool size
(c.f.: pm = static).

 3. The default value for pm.start_servers be changed from
(pm.min_spare_servers + ((pm.max_spare_servers - pm.min_spare_servers)/2))
to (pm.max_spare_servers + pm.min_spare_servers).

 4. The configuration documentation and the manual for FPM be updated to
take note of the above changes.

 5. Update the manual that the fact that FPM will spawn additional spare
children at a rate of no more than 32 children/second and kill of idle
children at a rate of 1 child/second.



-- 
Edit bug report at https://bugs.php.net/bug.php?id=62630&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62630&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62630&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62630&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62630&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62630&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62630&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62630&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62630&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62630&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62630&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62630&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62630&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62630&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62630&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62630&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=6

Req #45002 [Com]: __get() and __set() don't work for static variable calls

2012-07-21 Thread zsolt94 at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=45002&edit=1

 ID: 45002
 Comment by: zsolt94 at gmail dot com
 Reported by:jb2386 at hotmail dot com
 Summary:__get() and __set() don't work for static variable
 calls
 Status: Open
 Type:   Feature/Change Request
 Package:Feature/Change Request
 Operating System:   Any
 PHP Version:5.2.6
 Block user comment: N
 Private report: N

 New Comment:

Please import this feature into mainline PHP. We are still looking for this 
patch.


Previous Comments:

[2011-05-19 12:03:08] allesbesser at gmail dot com

Please use the patch by thekid for the next release.  We really need this.


[2011-03-30 19:26:04] marious dot alex at gmail dot com

This would be a really useful feature that I have been wishing for, for at 
least 
two years.
How come this has not been implemented when it is such a simple feature that 
has 
also been requested since 2008?


[2010-06-25 12:22:21] temporary dot hole at googlemail dot com

I have an idea to use this for a static registry class, would be really useful 
for keeping 'application-wide' data out of global variables.

I have no idea how to apply this patch, is it possible to use the above 
mentioned .diff on PHP 5.3.1 ?


[2010-05-14 09:13:41] vincentbab at gmail dot com

I would really apreciate this feature too


[2009-09-24 10:23:05] peter dot rother at gmail dot com

'Twould be seriously nice to have this feature…please let us know if 
anything can be done soon.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=45002


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=45002&edit=1


Bug #62629 [Opn]: IteratorIterator doesn't delegate count() method

2012-07-21 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=62629&edit=1

 ID: 62629
 Updated by: larue...@php.net
 Reported by:zoeslam at gmail dot com
 Summary:IteratorIterator doesn't delegate count() method
 Status: Open
 Type:   Bug
 Package:SPL related
 Operating System:   Ubuntu 12.04
 PHP Version:5.4.5
-Assigned To:
+Assigned To:colder
 Block user comment: N
 Private report: N

 New Comment:

yeah, the reason should be the same.


Previous Comments:

[2012-07-21 08:29:44] zoeslam at gmail dot com

Description:

This bug report MAY be similar to:

https://bugs.php.net/bug.php?id=62616

But behave differently

Test script:
---
class MyFile extends SplFileObject
{
private $x = 10;
private $y = 20;

public function setX($x) { $this->x = $x; }
public function setY($y) { $this->y = $y; }

public function getX()   { return $this->x; }
public function count()  { return $this->y; }
}

$myFile = new MyFile(__FILE__);

var_dump($myFile->getX());
var_dump($myFile->count());

$myFile->setX(15);
$myFile->setY(25);

var_dump($myFile->getX());
var_dump($myFile->count());

$ii = new IteratorIterator($myFile);

var_dump($ii->getX());
var_dump($ii->count());

Expected result:

int(10)
int(20)
int(15)
int(25)
int(15)
int(25)

Actual result:
--
int(10)
int(20)
int(15)
int(25)
int(15)

Notice: Undefined property: IteratorIterator::$y in /tmp/it.php on line 12
NULL






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62629&edit=1


Bug #62616 [Com]: ArrayIterator::count() from IteratorIterator instance gives Segmentation fault

2012-07-21 Thread zoeslam at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=62616&edit=1

 ID: 62616
 Comment by: zoeslam at gmail dot com
 Reported by:zoeslam at gmail dot com
 Summary:ArrayIterator::count() from IteratorIterator
 instance gives Segmentation fault
 Status: Verified
 Type:   Bug
 Package:SPL related
 Operating System:   Ubuntu 12.04
 PHP Version:5.4.5
 Assigned To:colder
 Block user comment: N
 Private report: N

 New Comment:

I've discovered a similar misbehaviour:

https://bugs.php.net/bug.php?id=62629


Previous Comments:

[2012-07-20 17:27:43] larue...@php.net

I've find the reason,  but seems not easy to fix.

$ii->count, will finally call to arrayObject->count (due to implemention of 
spl_dual_it_get_method).

but arrayObject->count will take the object as a spl_array_object, which is 
totally different struct with spl_dual_it_object, then in the 
spl_array_object_count_elements_helper , it will make the object struct 
mess(via 
update pos)


[2012-07-20 13:57:50] jpa...@php.net

I can reproduce on 5.3.14

I can only reproduce calling the method directly.
Calling count($ii) instead of $ii->count() wont segfault


[2012-07-20 12:54:55] f...@php.net

BT

#0  0x7fdfaf4221d8 in ?? ()
#1  0x00594a41 in spl_dual_it_free (intern=0x7fdfaf53fa20) at 
/opt/src/php-5.4.5/ext/spl/spl_iterators.c:1585
#2  spl_dual_it_dtor (_object=0x7fdfaf53fa20, handle=) at 
/opt/src/php-5.4.5/ext/spl/spl_iterators.c:2237
#3  0x006a7b20 in zend_objects_store_del_ref_by_handle_ex (handle=2, 
handlers=) at /opt/src/php-5.4.5/Zend/zend_objects_API.c:206
#4  0x006a7b63 in zend_objects_store_del_ref (zobject=0x7fdfaf53f990) 
at 
/opt/src/php-5.4.5/Zend/zend_objects_API.c:172
#5  0x00674082 in _zval_dtor (zvalue=) at /opt/src/php-
5.4.5/Zend/zend_variables.h:35
#6  _zval_ptr_dtor (zval_ptr=0x7fdfaf53fb30) at /opt/src/php-
5.4.5/Zend/zend_execute_API.c:438
#7  _zval_ptr_dtor (zval_ptr=0x7fdfaf53fb30) at /opt/src/php-
5.4.5/Zend/zend_execute_API.c:427
#8  0x0068e28b in zend_hash_apply_deleter (ht=ht@entry=0xd34508, 
p=p@entry=0x7fdfaf53fb18) at /opt/src/php-5.4.5/Zend/zend_hash.c:650
#9  0x0068fdd1 in zend_hash_reverse_apply (ht=0xd34508, 
apply_func=apply_func@entry=0x673f10 ) at /opt/src/php-
5.4.5/Zend/zend_hash.c:804
#10 0x0067438b in shutdown_destructors () at /opt/src/php-
5.4.5/Zend/zend_execute_API.c:217
#11 0x006826c0 in zend_call_destructors () at /opt/src/php-
5.4.5/Zend/zend.c:925
#12 0x00624805 in php_request_shutdown (dummy=dummy@entry=0x0) at 
/opt/src/php-5.4.5/main/main.c:1723
#13 0x00726004 in do_cli (argc=2, argv=0x7fff5ea442f8) at /opt/src/php-
5.4.5/sapi/cli/php_cli.c:1174
#14 0x00428455 in main (argc=2, argv=0x7fff5ea442f8) at /opt/src/php-
5.4.5/sapi/cli/php_cli.c:1364


[2012-07-20 11:54:38] f...@php.net

Reproducible on Debian wheezy with 5.4.0 and 5.4.5.


[2012-07-20 08:13:34] vanidlesky dot jr at gmail dot com

VanZCool




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=62616


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62616&edit=1


[PHP-BUG] Bug #62629 [NEW]: IteratorIterator doesn't delegate count() method

2012-07-21 Thread zoeslam at gmail dot com
From: zoeslam at gmail dot com
Operating system: Ubuntu 12.04
PHP version:  5.4.5
Package:  SPL related
Bug Type: Bug
Bug description:IteratorIterator doesn't delegate count() method

Description:

This bug report MAY be similar to:

https://bugs.php.net/bug.php?id=62616

But behave differently

Test script:
---
class MyFile extends SplFileObject
{
private $x = 10;
private $y = 20;

public function setX($x) { $this->x = $x; }
public function setY($y) { $this->y = $y; }

public function getX()   { return $this->x; }
public function count()  { return $this->y; }
}

$myFile = new MyFile(__FILE__);

var_dump($myFile->getX());
var_dump($myFile->count());

$myFile->setX(15);
$myFile->setY(25);

var_dump($myFile->getX());
var_dump($myFile->count());

$ii = new IteratorIterator($myFile);

var_dump($ii->getX());
var_dump($ii->count());

Expected result:

int(10)
int(20)
int(15)
int(25)
int(15)
int(25)

Actual result:
--
int(10)
int(20)
int(15)
int(25)
int(15)

Notice: Undefined property: IteratorIterator::$y in /tmp/it.php on line 12
NULL

-- 
Edit bug report at https://bugs.php.net/bug.php?id=62629&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62629&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62629&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62629&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62629&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62629&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62629&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62629&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62629&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62629&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62629&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62629&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62629&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62629&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62629&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62629&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62629&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62629&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62629&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62629&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62629&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62629&r=mysqlcfg



Bug #62623 [Opn]: Class 'COM' not found

2012-07-21 Thread bugzilla33 at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=62623&edit=1

 ID: 62623
 User updated by:bugzilla33 at gmail dot com
 Reported by:bugzilla33 at gmail dot com
 Summary:Class 'COM' not found
 Status: Open
 Type:   Bug
 Package:COM related
 Operating System:   win7
 PHP Version:5.4.5
 Block user comment: N
 Private report: N

 New Comment:

Please modify php.ini's in package, add:
;extension=php_com_dotnet.dll

and

update
http://www.php.net/manual/en/com.installation.php


Previous Comments:

[2012-07-21 07:35:32] bugzilla33 at gmail dot com

There is no:
;extension=php_com_dotnet.dll
in original php.ini,

why?


[2012-07-21 00:22:16] hankmanw7 at home dot nl

As of PHP 5.4.5 and above the COM extension isn't compiled into PHP anymore.
It'll still be delivered with the standard PHP release but must be enclosed
with the "extension = php_com_dotnet.dll" directive in php.ini.


[2012-07-20 20:30:20] bugzilla33 at gmail dot com

This problem is on Apache 2.2.21.
PHP via module.


[2012-07-20 20:01:01] bugzilla33 at gmail dot com

Description:

Class 'COM' not found. Bug introduced in PHP 5.4.5 VC9.

Test script:
---


Expected result:

PHP 5.4.4 include COM Class.

Actual result:
--
Fatal error: Class 'COM' not found in C:\htdocs\test.pl\1.php on line 2







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62623&edit=1


Bug #62623 [Com]: Class 'COM' not found

2012-07-21 Thread bugzilla33 at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=62623&edit=1

 ID: 62623
 Comment by: bugzilla33 at gmail dot com
 Reported by:bugzilla33 at gmail dot com
 Summary:Class 'COM' not found
 Status: Open
 Type:   Bug
 Package:COM related
 Operating System:   win7
 PHP Version:5.4.5
 Block user comment: N
 Private report: N

 New Comment:

There is no:
;extension=php_com_dotnet.dll
in original php.ini,

why?


Previous Comments:

[2012-07-21 00:22:16] hankmanw7 at home dot nl

As of PHP 5.4.5 and above the COM extension isn't compiled into PHP anymore.
It'll still be delivered with the standard PHP release but must be enclosed
with the "extension = php_com_dotnet.dll" directive in php.ini.


[2012-07-20 20:30:20] bugzilla33 at gmail dot com

This problem is on Apache 2.2.21.
PHP via module.


[2012-07-20 20:01:01] bugzilla33 at gmail dot com

Description:

Class 'COM' not found. Bug introduced in PHP 5.4.5 VC9.

Test script:
---


Expected result:

PHP 5.4.4 include COM Class.

Actual result:
--
Fatal error: Class 'COM' not found in C:\htdocs\test.pl\1.php on line 2







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62623&edit=1