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?
If there’s a problem beginners face with phpinfo it’s not that it’s hard to get working. It’s that it’s an incredibly large amount of information, much of which will make little or no sense.
Wikipedia tells us that the prefix came from a shortened version of “initialization”. In any case, that convention pervades PHP. These files are all pretty similar. They’ll have a number of values set in lines that are going to look pretty familiar to any programmer, like:
Changes made to the php.ini file will not take effect until you restart the server. If you're running MAMP or similar local hosting software, you might need to edit a php.ini template file rather than the loaded php.ini file. In MAMP on a Mac, for example, go to File → Edit template → PHP (php.ini) → [your php version].
However, the fifth line in matters a lot: it’s tells you which configuration file PHP loaded, in our case it’s the one at /etc/php5/fpm/php.ini. (The line is labelled: “Loaded Configuration File.”) Why is that useful?
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
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With