我需要libphp7.so模块来在Centos上配置apache [英] I need libphp7.so module to configure apache on Centos

查看:1542
本文介绍了我需要libphp7.so模块来在Centos上配置apache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循此链接的教程,以在apache的Centos 6.5上使用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添加到您的配置脚本中.根据您提供的链接,在configure标志中看不到该链接. --with-apxs2将构建共享的Apache 2.0 Handler模​​块".您可能还需要确保在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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆