How To Fix PHP.INI That Is Not Updating In An Apache Mac Setup

How To Fix PHP.INI That Is Not Updating In An Apache Mac Setup

If you issue the following command in terminal:

php --i | grep ini

This will show you the loaded pho configuration file. My output was this:

Loaded Configuration File:         /usr/local/etc/php/5.6/php.ini

But when I upgraded my MacOS from El Capitan to Sierra, updating the above file didn’t reflect any change on my development websites. WordPress was still showing 2 MB even though I was using the following:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

After googling here and there, I found a solution. Thanks to Gergely on stackoverflow here.

First use phpinfo to find out the current loaded file.

You would see:

Loaded Configuration File  None

now open your terminal:

cp /etc/php.in.default /etc/php.ini

Thats it. Make any change to the newly copied file and it would update in the webserver without any issues :-)

Original Article: https://www.ahmadmushtaq.com/php-ini-not-updating-in-an-apache-on-mac-setup/

要查看或添加评论,请登录

Ahmad Mushtaq , MBA的更多文章

  • Slick Carousal In RTL Mode

    Slick Carousal In RTL Mode

    I have been scratching my head all night to get this thing fixed! We have been using Slick Carousal in one of our…

    1 条评论
  • WordPress Admin Bar Not Showing On Front End For Custom Theme

    WordPress Admin Bar Not Showing On Front End For Custom Theme

    Some custom wordpress theme doesn’t show the admin bar into the theme page same with the wp_head() and the wp_footer()…

  • Creating A Bootable Ubuntu USB Drive, For PC, On A Mac

    Creating A Bootable Ubuntu USB Drive, For PC, On A Mac

    Steps: Download Ubuntu ISO Convert the Downloaded File Format hdiutil convert -format UDRW -o ~/path/to/target.img…

  • How To Speed Up Slow WordPress Admin

    How To Speed Up Slow WordPress Admin

    There can be many reasons a wordpress admin could get slow. First thing first, I used P3 plugin to find out which…

社区洞察

其他会员也浏览了