Bug #71340 [Com]: php_admin_value[error_reporting] in fpm pool conf can be bypassed in user code

From: Date: Thu, 28 Jan 2016 12:24:09 +0000
Subject: Bug #71340 [Com]: php_admin_value[error_reporting] in fpm pool conf can be bypassed in user code
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198944@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71340&edit=1

 ID:                 71340
 Comment by:         gpointorama at gmail dot com
 Reported by:        gpointorama at gmail dot com
 Summary:            php_admin_value[error_reporting] in fpm pool conf
                     can be bypassed in user code
 Status:             Open
 Type:               Bug
 Package:            FPM related
 Operating System:   Ubuntu 14.04.3 LTS
 PHP Version:        7.0.2
 Block user comment: N
 Private report:     N

 New Comment:

Can someone give feedback on this?

It's a problematic breaking change and is not mentioned in the migration guide or php doc.

We do shared hosting and this php_admin_value[error_reporting] config, not bypassable by user code,
give us the ability to simplify third party code management a lot.

We rely on this in production and we used it successfully with magento wordpress drupal moodle and
others without any contraindication.

php_admin_value setted ini options values should not be bypassable/changed by user code  even if the
option is error_reporting, as all previous version of php have done.

please fix this incompatible and wrong behavior in php7!


Previous Comments:
------------------------------------------------------------------------
[2016-01-11 18:24:13] gpointorama at gmail dot com

Description:
------------
We are doing some tests before upgrading to php7 and found this change in behavior between php5 and
php7:

setting

php_admin_value[error_reporting] = E_ALL & ~E_NOTICE

in some fpm pool configuration can be bypassed in user code calling error_reporting()

the php5 version we are using was:

PHP 5.5.9-1ubuntu4.14 (fpm-fcgi) (built: Oct 28 2015 01:38:24)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

and the php7 one is from:

https://launchpad.net/~ondrej/+archive/ubuntu/php-7.0
PHP 7.0.2-1+deb.sury.org~trusty+1 (fpm-fcgi)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies










Test script:
---------------
error_reporting(E_ALL); //in php5 this call have no effect and php_admin_value[error_reporting] wins
over
$a = array();
echo $a['b']; //should not trigger: Notice: Undefined index: b, because error_reporting
still be E_ALL & ~E_NOTICE



------------------------------------------------------------------------



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


Thread (28 messages)

« previous php.bugs (#198944) next »