PHP.ini does not load
- by Jonathan Park
Ok this is probably just me not knowing enough about php but here it goes.
I'm on Ubuntu Hardy. I have a custom compiled version of PHP which I have compiled with these parameters.
./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
I have used the command pecl install pecl_http 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 extension=http.so line in my php.ini.
That worked fine. Until I added these compilation options in order to add imap
--with-openssl
--with-kerberos
--with-imap
--with-imap-ssl
Which failed because I needed the c-client library which I fixed by apt-get install libc-client-dev After which php compiles fine and I have working imap support, woo.
HOWEVER, now all my calls to HttpRequest which is part of the pecl_http extention in http.so result in Fatal error: Class 'HttpRequest' not found 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.
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.
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.
Edit it appears that only some of the php.ini settings are being listened to. Is there a way to test my php.ini?
Edit Edit 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.
Edit Edit Edit 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.
Configuration File (php.ini) Path /etc/php.ini
Loaded Configuration File (none)
Edit Edit Edit Edit 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