Leveraging Brew-Installed PHP with Apache
Utilizing Homebrew to install extensions like mcrypt for PHP can sometimes lead to discrepancies between the PHP versions used by Brew and Apache. To address this, it's essential to determine any differences and configure Apache to incorporate Brew-installed PHP.
Step 1: Differentiating PHP Versions
Step 2: Employing Brew-Installed PHP with Apache
LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch>
Additional Resources
For more detailed information, consult the official Homebrew documentation:
The above is the detailed content of How to Use Brew-Installed PHP with Apache for Compatibility. For more information, please follow other related articles on the PHP Chinese website!