强制Apache2使用Homebrew的php56

编程入门 行业动态 更新时间:2024-10-05 23:22:45
本文介绍了强制Apache2使用Homebrew的php56的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

所以我从

brew reinstall php56 --with-apache

这很好用,然后我将httpd.conf修改为

This worked fine I then amended httpd.conf to include

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

但是在使用PHP 5.6.24对phpinfo进行检查时,这是错误的,那就是MacOS本机版本.酿造版本为5.6.26.

But upon inspection of phpinfo its using PHP 5.6.24 which is wrong, thats the MacOS native version. The brew version is 5.6.26.

由于某种原因,我的Apache2配置被忽略了-或我修改了错误的文件.我在/etc/apche2/httpd.conf

For some reason my Apache2 config is being ignored - or I have amended the wrong file. The one I changed as in /etc/apche2/httpd.conf

这是我的先前的问题与使APCu正常运行有关.它适用于PHP的酿造版本,但不适用于本机PHP版本.因此,我想强制Apache2将Brew版本与APCu一起使用.

This is a follow on from my previous question related to getting APCu working. Its working for the brew version of PHP but is not working for the the native PHP version. Therefore I want to force Apache2 to use the brew version with APCu.

推荐答案

事实证明,我正在重新启动apache,但是它不能正常工作.

I was restarting apache, but it was not working it turns out.

重新启动我的整个计算机可以正常工作,然后Apache使用了正确版本的PHP.

Restarting my whole machine did work and apache then used the correct version of PHP.

显然,killall httpd也具有相同的效果.尽管我还没有尝试过.

Apparently killall httpd has the same effect too. Although I have not tried that.

更多推荐

强制Apache2使用Homebrew的php56

本文发布于:2023-11-02 06:53:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551672.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Homebrew

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!