Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php.ini upload_max_filesize not updating

Tags:

linux

php

apache

I'm running CentOS 6.4. I've made changed to my php.ini file in the /etc folder. I have changed the upload_max_filesize from 2M to 50M so it reads:

upload_max_filesize = 50M

I've also changed the post_max_size to 52M so it reads:

post_max_size = 52M

Now I have restarted Apache using both the service httpd restart command and the /sbin/service command but when I go into my root html directory in /var/www/html and open my test phpinfo() file the values for upload_max_filesize and post_max_filesize are still the default 2M and 8M values respectively.

Have I missed something?

like image 726
twigg Avatar asked Jun 21 '13 14:06

twigg


3 Answers

I had to do this.

service php-fpm restart
like image 111
Brian Avatar answered Oct 22 '22 00:10

Brian


The latest php versions doesn't allow direct php.ini changes.

  1. Look for "Scan this dir for additional .ini files" directory in your phpinfo() output and create whatever-file-name.ini in this location.

  2. Put your custom variables in it.

  3. Restart the webserver.

like image 23
Dmytro Sukhovoy Avatar answered Oct 22 '22 00:10

Dmytro Sukhovoy


check the loading configuration file (php.ini) from the o/p of phpinfo(). Make sure that you have made changes in the right configuration file (php.ini file)

like image 3
Leo Prince Avatar answered Oct 21 '22 23:10

Leo Prince