title: Safe working with multiple *.ini in php
body: <p>Im facing with Ubuntu PHP configuration. There is main php.ini file and directory where are stored more *.ini files.</p>
  
  <p><strong>QUESTION 1:</strong> How the PHP loading this *.ini files?</p>
  
  <ul>
  <li>Load first php.ini and then on some place another files?</li>
  <li>If so in which position in php.ini or in which order?</li>
  </ul>
  
  <p><strong>QUESTION 2:</strong> How PHP order files in ini directory? It seems alphabetically but are there other "system" than its file name?</p>
  
  <p><strong>QUESTION 3:</strong> Why Ubuntu default installation insert into additional <code>*.ini</code> only loading directives <code>extension=nameofextesion.so</code> and configuration of this extension leave in <code>php.ini</code>? Are there any reason to split loading module and its configuration?</p>
  
  <p><strong>Example:</strong>
  <code>20-mysql.ini</code> contains loafing mysql extension.</p>
  
  <pre><code>extension=mysql.so
  </code></pre>
  
  <p><code>php.ini</code> contains <code>mysql.*</code> directives. Eg.</p>
  
  <pre><code>mysql.allow_local_infile = On
  mysql.allow_persistent = On
  etc.
  </code></pre>
  
  <p>Untill now I worked with single php.ini so this is new questions for me.
  Thanks for any opinion or best practices.</p>
  
  <p>cervenak</p>