首页 > Web开发 > 详细

搭建LAMP中安装PHP遇到的故障

时间:2016-01-04 00:14:44      阅读:260      评论:0      收藏:0      [点我收藏+]

apache结合php遇到的故障

启动apache时出现错误:

/usr/local/apache2/bin/apachectl -t
AH00526: Syntax error on line 367 of /usr/local/apache2/conf/httpd.conf:
AddType requires at least two arguments, a mime type followed by one or more file extensions

AddType application/x-httpd-php.php  ,启动apache出现 AddType requires at least two arguments, a mime type followed by one or more file extensions。 这是因为在 "AddType application/x-httpd-php.php"中的"php.php" 应该要有一个空格 的"AddType application/x-httpd-php  .php"

重启apachel语法检测正常
[root@centos6 local]# /usr/local/apache2/bin/apachectl -t
Syntax OK

报服务器主机名描述警告

[root@centos6 local]# /usr/local/apache2/bin/apachectl -t
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using 192.168.25.113. Set the ‘ServerName‘ directive globally to suppress this message
Syntax OK
vi /usr/local/apache2/conf/httpd.conf
修改httpd.conf文件:
ServerName localhost:80


本文出自 “boyhack” 博客,请务必保留此出处http://461205160.blog.51cto.com/274918/1731086

搭建LAMP中安装PHP遇到的故障

原文:http://461205160.blog.51cto.com/274918/1731086

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!