Chrome Extension

Why is upload_max_filesize not changing on mac for php

I am trying to change the default value of upload_max_filesize in php from 2M to 10M. I have found the php.ini file on my system at /etc/php.ini.default and changed upload_max_filesize value but when I am checking it using phpinfo() function it is showing defaut 2M value inside table. I have also restarted the apache server using sudo apachectl restart command but no luck.

1 Answers

You should copy /etc/php.ini.default to /etc/php.ini first and then restart the apache server. When php.ini file will be present on the location - /etc/ then the settings will be configured from this file not the php.ini.default. To copy file run below command

sudo cp /etc/php.ini.default /etc/php.ini

Now restart apache server by below command

sudo apachectl restart
Search history ×