Skip to content

Instantly share code, notes, and snippets.

@neilghosh
Last active November 16, 2015 11:41
Show Gist options
  • Save neilghosh/780a9286582ea5b6d910 to your computer and use it in GitHub Desktop.
Save neilghosh/780a9286582ea5b6d910 to your computer and use it in GitHub Desktop.
Fix PHP 5.3 Apache in OS X El Capitan

I was fooling arroung PHP to get openssl and currupted the installation

later started to get following error while attempting to start apache

sudo apachectl restart
httpd: Syntax error on line 32 of /usr/local/etc/apache2/2.2/httpd.conf: Cannot load /usr/local/opt/php53/libexec/apache2/libphp5.so into server: dlopen(/usr/local/opt/php53/libexec/apache2/libphp5.so, 10): Symbol not found: _ap_unixd_config\n  Referenced from: /usr/local/opt/php53/libexec/apache2/libphp5.so\n  Expected in: /usr/local/Cellar/httpd22/2.2.29/bin/httpd\n in /usr/local/opt/php53/libexec/apache2/libphp5.so

reinstalling php53 gave me zlib not found error brew reinstall php53 --homebrew-apxs

checking if the location of ZLIB install directory is defined... no
configure: error: Cannot find libz

finally fixed by running the following

brew reinstall php53 --homebrew-apxs
xcode-select --install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment