Home  >  Article  >  php教程  >  PHP安装攻略:常见问题解答(二)

PHP安装攻略:常见问题解答(二)

WBOY
WBOYOriginal
2016-06-13 12:38:05829browse

四、

问:当我将PHP和APACHE一起编译时,好象有问题。它总是说无法找到httpd.h文件,可事实上该文件时存在的。为什么?

答:你需要让PHP配置/安装脚本知道你的APACHE源码的最高级目录,而不是包含httpd.h文件的目录。也就是说,应该指定"--with-apache=/path/to/apache/"而不是"--with-apache=/path/to/apache/src"。


五、

问:我使用RPM安装了PHP,但APACHE却不能处理PHP文件。为什么?

答: 假设你使用RPM正确安装了PHP,那你必须反注或加入下面的几行到httpd.conf文件中:

#Extra Modules
AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perlc.
#Extra Modules
LoadModule php_module modules/mod_php.so
LoadModule php3_module modules/libphp3.so
LoadModule perl_module modules/libperl.so

另外,再加入:

AddType application/x-httpd-php3 .php3

到httpd.conf的全局部分,或到你需要提供PHP支持的部分。 

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