简体   繁体   中英

Can't load apache php5 module with apache2.4

I used Homebrew to install apache 2.4 and php 5.4 (also tried 5.6) (using Mac Osx Mavericks). When I try to load the php5 module I get the following error:

httpd: Syntax error on line 157 of /usr/local/apache-2.4.9/conf/httpd.conf: Cannot load /usr/local/opt/php56/libexec/apache2/libphp5.so into server: dlopen(/usr/local/opt/php56/libexec/apache2/libphp5.so, 10): Symbol not found: _unixd_config\n Referenced from: /usr/local/opt/php56/libexec/apache2/libphp5.so\n Expected in: /usr/local/apache-2.4.9/bin/httpd\n in /usr/local/opt/php56/libexec/apache2/libphp5.so

I tried re-installing php a few different ways I saw online with users having the same error, but to no avail:

brew install php55 --homebrew-apxs brew install php56 --with-mysql --with-homebrew-apache brew install -s php56

Anyone know how I could resolve this issue? Thanks in advance!

I was able to fix the issue by running the following: brew install 56 --with-apache

I'm not sure if that's ideal way to fix and am still having an issue rendering the php page (which might be related to a separate issue), but hopefully this helps someone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM