Reputation: 241
I just can't get php_info() values to change on my localhost setup, or the related phpMyAdmin maximum file size.
So I have located the PHP file that phpinfo states is being loaded. I have changed the three parameters:
upload_max_filesize
post_max_size
memory_limit
Saved the file, restarted Apache and MySQL, reloaded the phpinfo() page... no changes.
I've also tried putting a .htaccess file in the web root folder with changes to these parameters. This is reflected in phpinfo in the local value (the master value still says 2M for maximum upload size), and then when I go to phpMyAdmin the maximum upload size is still 2M...
I've looked for a php.ini file in C://windows as this is where phpinfo() states the master value is derived from. But there isn't any php.ini file there. So I created one with the values I wanted... no success!
How can I fix this?
Upvotes: 15
Views: 15916
Reputation: 2633
I had a very strange issue where for some reason the first line of my php.ini had ][PHP]
instead of [PHP]
and that wasn't generating any errors so I was lucky enough to see it.
I probably pasted the config from somewhere else and omitted deleting the extra ]
and that caused me some headaches. I did changes in the file, no errors, but the changes weren't reflected.
Upvotes: 0
Reputation: 330
That happen for me, php.ini changes do not affect in phpinfo()
The reason is, that several php-fpm installed into the system and command was not reload config
service php-fpm restart
Proper command to reload service php74-php-fpm restart in my case:
service php74-php-fpm restart
Upvotes: 0
Reputation: 301
I came across the same issue.
Check if php-fpm is running by this command:
ps aux | grep php-fpm
php-fpm stands for "FastCGI Process Manager" for PHP and it was probably built in your system. If so, you have to restart it. Assuming you are on a Linux system type:
For Red Hat Linux, CentOS, Fedora, etc.
sudo systemctl restart php-fpm.service
For Debian-based systems (like Ubuntu)
sudo service php-fpm restart
or
sudo service php7.0-fpm restart
Upvotes: 29
Reputation: 57
Don't do what I did... I changed max_input_vars from 1000 to 10000 but never noticed that the line was commented out by default.
; max_input_vars = 10000
I couldn't figure out why the value displayed in phpinfo() wouldn't change.
Doh!
Upvotes: 3
Reputation: 2704
Have you attempted to look for php.ini-development
/ php.ini-production
? If you update php.ini-development
and then remove the -development
then you should be good to go I believe.
Don't do what I did though and update the php.ini-development
file and forget to remove the -development
... I spent far too long wondering why the settings weren't updating!
Upvotes: 0