I need libphp7.so module to configure apache on Centos(我需要 libphp7.so 模块来在 Centos 上配置 apache)
问题描述
我按照这个 link 的教程在我的 Centos 6.5 和 apache 上使用 php7 或 phpng.
I follow the tutorial of this link to use php7 or phpng on my Centos 6.5 with apache.
我可以在控制台中执行 php 脚本,但我希望能够使用 Apache 服务器运行 php 脚本.
I can execute php scripts in the console but I would like to be able to run php scripts using the Apache Server.
我需要一些帮助,因为我找不到 libphp7.so 模块.我不知道我是否必须构建它或什么.
I need some help because I can't find the libphp7.so module. I don't know if I have to build it or what.
推荐答案
我相信你需要将 --with-apxs2
添加到你的配置脚本中.根据您提供的链接,我在配置标志中没有看到.--with-apxs2
将构建共享的 Apache 2.0 处理程序模块".您可能还需要确保在您的 apache 配置中拥有:
I believe you need to add --with-apxs2
to your configure script. According to the link you provided I do not see that in the configure flags. --with-apxs2
will "Build shared Apache 2.0 Handler module". You may also need to make sure in your apache configuration you have:
<FilesMatch .php$>
SetHandler application/x-httpd-php
</FilesMatch>
我第一次构建 php7 时它只是显示源代码而不是执行它,但是添加它会导致它执行代码.
The first time I built php7 it just displayed the source rather than execute it, but adding that caused it to execute the code.
如果你想用 Docker 试试,我刚刚在 https://registry.hub.docker.com/u/silintl/php7/ 您也可以只查看 Dockerfile,其中包含用于安装和配置它的所有命令.
If you want to try it out with Docker I just created a Docker image for PHP7 at https://registry.hub.docker.com/u/silintl/php7/ You can also just view the Dockerfile which includes all the commands used to install and configure it.
这篇关于我需要 libphp7.so 模块来在 Centos 上配置 apache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我需要 libphp7.so 模块来在 Centos 上配置 apache


- 没有作曲家的 PSR4 自动加载 2022-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- Laravel 仓库 2022-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01