homebrew php54 log

本文介绍如何在Apache中启用PHP 5.4,包括修改httpd.conf文件加载PHP模块,设置php.ini路径,调整PEAR权限及配置,解决自定义扩展编译问题,以及如何通过修改PATH变量来指定使用的PHP版本。

To enable PHP in Apache add the following to httpd.conf and restart Apache:

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



The php.ini file can be found in:

/usr/local/etc/php/5.4/php.ini



✩✩✩✩ PEAR ✩✩✩✩

If PEAR complains about permissions, 'fix' the default PEAR permissions and config:

chmod -R ug+w /usr/local/Cellar/php54/5.4.26/lib/php
pear config-set php_ini /usr/local/etc/php/5.4/php.ini



✩✩✩✩ Extensions ✩✩✩✩

If you are having issues with custom extension compiling, ensure that

you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:

PATH="/usr/local/bin:$PATH"



PHP54 Extensions will always be compiled against this PHP. Please install them

using --without-homebrew-php to enable compiling against system PHP.

✩✩✩✩ PHP CLI ✩✩✩✩

If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc,

~/.zshrc, ~/.profile or your shell's equivalent configuration file:

export PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH"



Warning: Could not link php54. Unlinking...

Error: The `brew link` step did not complete successfully

The formula built, but is not symlinked into /usr/local

You can try again using `brew link php54'

转载于:https://my.oschina.net/gabriel/blog/212331

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值