php.ini does not get reloaded when i restart apache. WHY???
Moderator: General Moderators
php.ini does not get reloaded when i restart apache. WHY???
This is the first time ever I'm dealing with PHP (I'm a Java guy), and this has not been a pleasant experience (on top of php problems I have a fever, so stick with me...)
I'm running Fedora 5, Apache 2.2.0 (I think), PHP 5.1.6. All compiled, freshly installed. All seems to run fine. I even installed a SugarCRM thingy (a giant php prog) and it worked just fine.
The other day I was reading php.ini and I realized I don't have a a log file specified (error_log). So I put in "/var/log/php", do /etc/init.d/httpd restart. I check my logs folder - no php in there. I play some more with php.ini, and no matter what I do - the changes don't get reflected, php is still working, and I don't get any errors in apache logs (or /var/log/messages).
I even tried setting engine = Off in php.ini - PHP still works.
I check my phpinfo() - I AM editing the correct file.
So, feeling desparate, I delete that file just to see what happens. I restart apache - WTF, php still works, everything works, no errors. ARGGHHHHH.
I remember reading somewhere that if your php.ini is faulty, PHP will use some other default php.ini which's stored in some secret folder or something like that. So I move php-recommended.ini into php.ini. Restart the server - same old crap, everything works, no errors, php.ini changes aren't reflected.
I'm getting pretty desparate not being able to figure this out. Any help is greatly appreciated.
I'm running Fedora 5, Apache 2.2.0 (I think), PHP 5.1.6. All compiled, freshly installed. All seems to run fine. I even installed a SugarCRM thingy (a giant php prog) and it worked just fine.
The other day I was reading php.ini and I realized I don't have a a log file specified (error_log). So I put in "/var/log/php", do /etc/init.d/httpd restart. I check my logs folder - no php in there. I play some more with php.ini, and no matter what I do - the changes don't get reflected, php is still working, and I don't get any errors in apache logs (or /var/log/messages).
I even tried setting engine = Off in php.ini - PHP still works.
I check my phpinfo() - I AM editing the correct file.
So, feeling desparate, I delete that file just to see what happens. I restart apache - WTF, php still works, everything works, no errors. ARGGHHHHH.
I remember reading somewhere that if your php.ini is faulty, PHP will use some other default php.ini which's stored in some secret folder or something like that. So I move php-recommended.ini into php.ini. Restart the server - same old crap, everything works, no errors, php.ini changes aren't reflected.
I'm getting pretty desparate not being able to figure this out. Any help is greatly appreciated.
According to http://distrowatch.com/table.php?distribution=fedora fc5 ships with php 5.1.2.
So exactly how did you install apache and php?
So exactly how did you install apache and php?
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Moved to Apache, IIS, and Web Servers.
Pay Attention Everah.
Pay Attention Everah.
Last edited by John Cartwright on Wed Nov 15, 2006 9:48 pm, edited 1 time in total.
Please, please, PLEASE
read my post before posting.
My fedora 5 (I didn't install it myself) didn't come with php, it only came with apache.
read my post before posting.
I searched my system and it is the only php.ini file (except for php.ini-dist and php.ini-recommended which are located in the source folder).I check my phpinfo() - I AM editing the correct file.
My fedora 5 (I didn't install it myself) didn't come with php, it only came with apache.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Is this a personal computer or a server? If it is a personal computer you can install PHP from the GUI interface so that it works as an Apache Module on your system. If you compiled PHP then you are going to have more than one php.ini file on your system (one in the location where PHP was built and one in the location that make install creates).ivj wrote:I searched my system and it is the only php.ini file (except for php.ini-dist and php.ini-recommended which are located in the source folder).
My fedora 5 (I didn't install it myself) didn't come with php, it only came with apache.
nickvd: It doesn't matter if I turn it on or off - my logfile doesn't get reloaded. If I turn it on in the code - there are no errors regarding the php.ini or anything.
Everah: It's a server, no GUIs here. I did compile PHP but there are no php.inis (except for the -recommended and -dist ones (like I've mentioned earlier)), and phpinfo() points to the file I'm editing.
If I delete that file, I can still run apache and PHP will work. What conf file does it use? phpinfo() gives me a path that doesn't exist, so wtf?
Everah: It's a server, no GUIs here. I did compile PHP but there are no php.inis (except for the -recommended and -dist ones (like I've mentioned earlier)), and phpinfo() points to the file I'm editing.
If I delete that file, I can still run apache and PHP will work. What conf file does it use? phpinfo() gives me a path that doesn't exist, so wtf?
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Many startup errors will fail the loading of PHP. When used as a module, this means the web server will likely fail to load too. Every time I've had something error the startup, it was always output to the console (or desktop.)ivj wrote:Ok... but if I have a file in there and it's syntax is bad.. does it use all the defaults too? Shouldn't it write out the errors somewhere or something?