title: PHP-FPM unable to override error_reporting?
body: <p>I have a problem that's driving me crazy in the last couple of hours: I can't override the default value of <code>error_reporting</code> directive on my development machine (Debian 8 + php-fpm 5.6.29 + Nginx/1.6.2)</p>
  
  <p>The php packages i'm using:</p>
  
  <pre><code>$ dpkg --get-selections | grep php
  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
  </code></pre>
  
  <p>Considering the following dead-simple script:</p>
  
  <pre><code>&lt;?php
  $initial_value = error_reporting(); // Just read the current value
  
  error_reporting(E_PARSE); // Lets set it to something else.
  
  $update_value = error_reporting(); // Read again.
  
  printf(
    "Initial value: %s\nFinal value: %s",
    $initial_value,
    $update_value
  );
  </code></pre>
  
  <p>if I run it from cli, it works:</p>
  
  <pre><code>$ php test.php
  // output: Initial value: 22527 Final value: 4
  </code></pre>
  
  <p>But if I run this under php5-fpm, the output is:</p>
  
  <pre><code>Initial value: 32767 Final value: 32767
  </code></pre>
  
  <p>What I've tried:</p>
  
  <ul>
  <li>Set the value inside <code>php.ini</code> (and checked all php.ini's files listed into <code>phpinfo();</code>, just in case) but nothing.</li>
  <li>Im not using <code>.user.ini</code> fiels (checked twice)</li>
  <li>Tried both with <code>error_reporting(E_PARSE)</code> and <code>ini_set('error_reporting', E_PARSE);</code>. Those directive should override the ini files, right?</li>
  </ul>
  
  <p>Of course after every edits to ini files I did restart php5-fpm process (tried also stop and then start instead of restart/reload)</p>
  
  <p>A strange thing is that <strong>I can actually override other parameters</strong> (<code>display_errors</code> for example, works both from ini files and from <code>ini_set</code> calls).</p>
  
  <p>So, what am I missing so far?</p>