11

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?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Jimme
  • 201
  • 2
  • 3
  • 7
  • 1
    Check that you’re editing the _right_ php.ini – phpinfo will tell you which one is used. – CBroe Jan 13 '16 at 17:55
  • Try using `ini_set()` directly in php file. And make sure you are editing *right* php ini file. – VeeeneX Jan 13 '16 at 17:56
  • 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 Jan 14 '16 at 18:39
  • I had this line uncommented, it needs to be commented Default Value: `E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED` – FosAvance Nov 14 '16 at 14:22

4 Answers4

24

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 Linux, 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
    
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Nikos Gkikas
  • 251
  • 2
  • 5
3

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

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!

helencrump
  • 1,351
  • 1
  • 18
  • 27
Mikey
  • 2,606
  • 1
  • 12
  • 20
  • Yes both these files exist in the directory along with C:\xampp\php\php.ini. But there's no point in changing the name and replacing the php.ini file that already exists in that directory is there? – Jimme Jan 14 '16 at 18:44
0

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
XPS
  • 140
  • 1
  • 5