How to Install PHP APC on macOS
macOS PHP APC Quick Start Guide
This tutorial will guide you step-by-step on How to Install PHP Accelerator APC module on macOS.
The PHP Accelerator APC is good to enhance Performances on strong Frameworks needing some Power like Symfony.
To Install it on Mac you do Not need to Recompile PHP but Only to Execute a Simple Procedure…
If you Get in Stuck During Installation you will Find a Link 2 Detailed Troubleshooting Post at the Article Bottom.
![PHP APC Quick Start for Mac - Featured](https://tutorialforlinux.com/wp-content/media/dg139/intro/redAppleOnBlackApproved.jpg)
How to Install Homebrew for macOS
Update Pear Channels:
sudo pear update-channels
Install Pcre:
sudo brew install pcre
Install APC by Pecl:
sudo pecl install apc
If you encounter a problem in Installation best to Update brew with:
sudo brew updateLatest you should insert the following lines in you php.ini (Source):
extension=apc.so
/napc.enabled=1
/napc.shm_segments=1
/napc.shm_size=32M
/napc.cache_by_default=1
/napc.stat=1
/napc.rfc1867=1
//For Drupal upload progress.
/napc.stat=7200 //2 hours
Remember to Set on php.ini the “extension_dir” with the Path to your newly installed apc.so!
If you do Not find where is located Search for “apc.so” in Finder…
If you Can’t Succeed with This then Try with MacPorts (Example) the module php5-apc by:
sudo port install php-APCOr:
sudo port install php-APCu
Troubleshooting:
Mac APC Installation Troubleshooting
Bless the Lord!