title: PHP.ini does not load automatically even though it exists at the config location
body: <p>Ok this is probably just me not knowing enough about php but here it goes.</p>
  
  <p>I'm on Ubuntu Hardy. I have a custom compiled version of PHP which I have compiled with these parameters.</p>
  
  <pre><code>./configure
  --enable-soap
  --with-zlib
  --with-mysql
  --with-apxs2=[correct path]
  --with-config-file-path=[correct path]
  --with-mysqli
  --with-curlwrappers
  --with-curl
  --with-mcrypt
  </code></pre>
  
  <p>I have used the command <code>pecl install pecl_http</code> to install the http.so extension.  It is in the correct module directory for my php.ini.  My php.ini is loading and I can change things within the ini and effect php.  I have included the <code>extension=http.so</code> line in my php.ini.  </p>
  
  <p>That worked fine.  Until I added these compilation options in order to add imap</p>
  
  <pre><code>--with-openssl
  --with-kerberos
  --with-imap
  --with-imap-ssl
  </code></pre>
  
  <p>Which failed because I needed the c-client library which I fixed by <code>apt-get install libc-client-dev</code> After which php compiles fine and I have working imap support, woo.</p>
  
  <p>HOWEVER, now all my calls to HttpRequest which is part of the pecl_http extention in http.so result in <code>Fatal error: Class 'HttpRequest' not found</code> errors. I figure the http.so module is no longer loading for one reason or another but I cannot find any errors showing the reason.</p>
  
  <p>You might say "Have you tried undoing the new imap setup?"  To which I will answer.  Yes I have.  I directly undid all my config changes and uninstalled the c-client library and I still can't get it to work.  I thought that's weird... I have made no changes that would have resulted in this issue.  After looking at that I have also discovered that not only is the http extension no longer loading but all my extensions loaded via php.ini are no longer loading. </p>
  
  <p>Can someone at least give me some further debugging steps?  So far I have tried enabling all errors including startup errors in my php.ini which works for other errors, but I'm not seeing any startup errors either on command line or via apache.  And yet again the php.ini appears to be being parsed given that if I run php_info() I get settings that are in the php.ini.</p>
  
  <p><strong>Edit</strong> it appears that only some of the php.ini settings are being listened to.  Is there a way to test my php.ini?</p>
  
  <p><strong>Edit Edit</strong> It appears I am mistaken again and the php.ini is not being loaded at all any longer. However, If I run php_info() I get that it's looking for my php.ini in the correct location.</p>
  
  <p><strong>Edit Edit Edit</strong> My config is at the config file path location below but it says no config file loaded.  WTF Permission issue?  It is currently 644 so everyone should be able to read it if not write it. I tried making it 777 and that didn't work.</p>
  
  <pre><code>Configuration File (php.ini) Path   /etc/php.ini
  Loaded Configuration File   (none)
  </code></pre>
  
  <p><strong>Edit Edit Edit Edit</strong> By loading the ini on the command line using the -c command I am able to run my files and using -m shows that my modules load
  So nothing is wrong with the php.ini</p>
  
  <p><strong>Edit Edit Edit Edit Edit</strong> I have had it pointed out to me that my ini directory config should be a path to find the php.ini file in not the file itself.  To this end I have tried settings /etc,/etc/, and letting php set the default directory then moving my ini file into that directory.  All fail :( </p>
  
  <p><strong>Edit Edit Edit Edit Edit</strong> I have had it pointed out to me that my ini directory config should be a path to find the php.ini file in not the file itself.  To this end I have tried settings /etc,/etc/, and letting php set the default directory then moving my ini file into that directory.  All fail :(</p>
  
  <p><strong>Edit Edit Edit Edit Edit Edit</strong> Further info, command line run of php --ini and ls of dir it points at in the php settings.  Also run with -c option on command line where the run succeeds and not when i don't include -c</p>
  
  <pre><code>j@j:/usr/local/lib$ php -ini | grep Configuration
  Configuration File (php.ini) Path =&gt; /usr/local/lib
  Loaded Configuration File =&gt; (none)
  Configuration
  j@j:/usr/local/lib$ ls /usr/local/lib
  php  php.ini  python2.5  site_ruby
  j@j:/usr/local/lib$ php -c /usr/local/lib/php.ini /var/www/toolbelt/test.php
  j@j:/usr/local/lib$ php /var/www/toolbelt/test.php
  
  Fatal error: Class 'HttpRequest' not found in /var/www/toolbelt/test.php on line 7
  jonathan@jonathan:/usr/local/lib$
  </code></pre>
  
  <p><strong>Edit Edit Edit Edit Edit Edit Edit</strong> Further info. Utilizing the strace method shown in another stack exchange article I tested to see if there were any attempts to open the ini file made in the loading of php.  There were not</p>
  
  <pre><code>j@j:/usr/local/lib$ sudo strace  -e trace=open php -ini 2&gt;&amp;1 |grep  php.ini
  Configuration File (php.ini) Path =&gt; /usr/local/lib
  j@j:/usr/local/lib$ sudo strace  -e trace=open php -ini 2&gt;&amp;1 |grep  /usr/local/lib
  Configuration File (php.ini) Path =&gt; /usr/local/lib
  extension_dir =&gt; /usr/local/lib/php/extensions/no-debug-non-zts-20060613 =&gt; /usr/local/lib/php/extensions/no-debug-non-zts-20060613
  include_path =&gt; .:/usr/local/lib/php =&gt; .:/usr/local/lib/php
  </code></pre>