5
votes

this has been bothering me for ages and after searching loads of answers and trying out suggestions I just can't get php_info() values to change on my localhost setup, or the related phpMyAdmin max 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, restart apache and MySQL... reload 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 max upload size), and then when i go to phpmyadmin the max 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 no php.ini file there. So I created one with the values I wanted... no success!

Any ideas?! This is really annoying me!!

Thanks,

Jimme

3
Check that you’re editing the right php.ini – phpinfo will tell you which one is used. - CBroe
Try using ini_set() directly in php file. And make sure you are editing right php ini file. - VeeeneX
phpinfo() and ini_set both state:'Configuration File (php.ini) Path: C:\WINDOWS','Loaded Configuration File: C:\xampp\php\php.ini'. So I'm editing C:\xampp\php\php.ini but no changes are occuring - Jimme
I had this line uncommented, it needs to be commented Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED - FosAvance

3 Answers

10
votes

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
1. For Red Hat, CentOs, Fedora etc

sudo systemctl restart php-fpm.service  

2. For Debian based systems (like ubuntu)

sudo service php-fpm restart

or

sudo service php7.0-fpm restart

Hope that helps.

1
votes

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!

0
votes

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!