Home  >  Article  >  Backend Development  >  linux - 手动编译apache和php7,无法解析SegmentFault

linux - 手动编译apache和php7,无法解析SegmentFault

WBOY
WBOYOriginal
2016-06-06 20:21:451482browse

今天手动编译httpdPHP7,最终无法成功解析php,求助。

环境:

系统:Ubuntu 14.04
httpd版本:2.4.18
php版本:php7.0.1

html文件可以访问,但是php文件直接显示文件内容,有没有配置过的朋友,知道如何配置?

先谢谢各位了!!!

回复内容:

今天手动编译httpdPHP7,最终无法成功解析php,求助。

环境:

系统:Ubuntu 14.04
httpd版本:2.4.18
php版本:php7.0.1

html文件可以访问,但是php文件直接显示文件内容,有没有配置过的朋友,知道如何配置?

先谢谢各位了!!!

问题已解决,修改apache配置文件,如下:
文件路径:/usr/local/httpd/conf/httpd.conf
前面的路径为编译安装时的路径,在该文件最后面添加下面这句:

AddHandler application/x-httpd-php .php

感谢文章 centos手动编译安装apache、php、mysql

感谢分享! 我在ubuntu的路径/etc/apache2/apache2.conf,增加同样的话就能成了~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn