I have a problem that drives me crazy in the last couple of hours: I cannot override the default directives error_reportingon my development machine (Debian 8 + php-fpm 5.6.29 + Nginx / 1.6. 2)
The php packages I use are:
$ dpkg
libapache2-mod-php5 install
php-console-table install
php5 install
php5-cli install
php5-common install
php5-curl install
php5-fpm install
php5-gd install
php5-intl install
php5-json install
php5-mcrypt install
php5-mysql install
php5-readline install
php5-xmlrpc install
php5-xsl install
Given the following simple script:
<?php
$initial_value = error_reporting();
error_reporting(E_PARSE);
$update_value = error_reporting();
printf(
"Initial value: %s\nFinal value: %s",
$initial_value,
$update_value
);
if I run it from cli, it works:
$ php test.php
But if I run this under php5-fpm, the output will be:
Initial value: 32767 Final value: 32767
What I tried:
- Set the value inside
php.ini(and just in case, check all the php.ini files listed in phpinfo();), but nothing. - I do not use
.user.inifiels (double checked) - I tried both with
error_reporting(E_PARSE)and ini_set('error_reporting', E_PARSE);. These directives should override INI files, right?
, ini php5-fpm ( , /)
, (display_errors, , ini , ini_set).
, ?