简体   繁体   中英

OS X 10.10 - apache will not run PHP from homebrew

I have installed php55 with homebrew to get postgresql support and linked the php module in apache.

LoadModule php5_module    /usr/local/opt/php55/libexec/apache2/libphp5.so

Still my phpinfo() - shows PHP 5.5.20 (the built in OS X). But from terminal I get PHP 5.5.26.

What can I do to fix this and force apache to use PHP 5.5.26?

I solved this. I solved this with removing PHP55 (brew uninstall php55 and related php pdo_psql) and reinstalling (brew install php55 --with-postgresql) since I needed postgresql support. I then made sure apache was stopped and started it again. I needed to edit the php.ini file that is now at

/usr/local/etc/php/5.5/php.ini

Everything seems fine now and using the new PHP55 I installed with homebrew.

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