PHP configuration "sticks"
I'm having some real trouble updating my php.ini file. I need to change the memory_limit value, but the changes are not being picked up. Here's some background info:
I'm running cPanel 11.50 (but this issue was there with 11.48 also), and I'm using PHP 5.4.42 and Apache 2.4.12 on Cloudlinux. I use suPHP, and I have disabled the use of per-user php.ini files. In other words, the global php.ini file is the only one that should matter.
When I check the output of phpinfo(), the value for memory_limit remains the same no matter how many times I restart apache " or even the whole server. And this is despite the fact that the correct php.ini file is being read.
It's almost like the old php.ini values are cached somewhere. Could that be the case?
-
When you load the phpinfo page, there's a configuration item that you can look for that shows the loaded php.ini it's reading from. That will show you which INI is being loaded. I hope this helps! 0 -
Yeah, I already checked that. It's loading the correct php.ini file, but for some reason it's not parsing the changes to that file. It's quite strange. 0 -
The php.ini is not being cached. suPHP does not cache any data. Once the script exits, it closes all files. So either: [LIST] - The file you think is being used is not the file actually being used.
- There are multiple directives in the php.ini being used. I see the second situation often and it even tripped me up on a php-fpm pool configuration yesterday. I could not get logging to work and then finally realized I missed a duplicate directive.
0 -
Good call, rackaid. That could indeed be the case, but I assure you it's not. I have been down all those roads looking for answers, but I have found none. However, the plot thickens now, as I have just discovered that some changes I made about 4 hours ago were just picked up. Let me explain. In a desparate attempt to resolve this issue, I tried to place a partial php.ini file in /usr/local/lib/php.ini.d/ I have another partial ini file there, which I believe helped me resolve a similar issue I had a while back, when I was trying to change the timezone. At first, when I was trying earlier today, placing the extra file there had no effect at all. phpinfo() still reported the old value for memory_limit. In fact, according to phpinfo(), the extra ini file didn't even exist in that directory. However, now the file exists (according to phpinfo()), and appears to have been parsed!? Why would there be a 4 hour delay in Apache/PHP picking up on the existence of a new ini file? And why is the change not picked up instantly in the first place, when I simply make changes to the global ini file? I tend to prefer my plots a lot thinner than this one... 0 -
Hi, Are you using phpselector ?. Try switching to system php in such cases Thanks, Anoop 0 -
Why would there be a 4 hour delay in Apache/PHP picking up on the existence of a new ini file? And why is the change not picked up instantly in the first place, when I simply make changes to the global ini file? 0 -
No, I am not using phpselector. Have been using system PHP all along. 0
Please sign in to leave a comment.
Comments
7 comments