温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

搭建LAMP环境PHP无法解析问题

发布时间:2020-08-18 13:08:47 来源:网络 阅读:2166 作者:collglle_cx 栏目:web开发

                      PHP不能解析之判断故障

1.  /usr/local/apache/bin/apachectl -M  //查看有没有加载php5_module(shared)模块;

2.  在/usr/local/apache2/modules/ 目录下,查看有没有加载libphp5.so模块; 

3.  复查编译的配置文件有否有误:/usr/local/apache2/conf/httpd.conf

  1. 修改apache的配置文件httpd.conf

  2.       vim /usr/local/apache2/conf/httpd.conf

  3.    在httpd.conf中找到: AddType application/x-gzip .gz .tgz” 在该行下面添加

  4.      “AddType application/x-httpd-php .php”

  5.    再找继续找到:DirectoryIndex index.html”,把此行修改成

  6.      “DirectoryIndex index.html index.htm index.php”

  7.     再找到: “#ServerName www.example.com:80”把此行修改成

  8.        “ServerName localhost:80” 保存后退

4.  使用命令查看主配置文件是否有误:/usr/local/apache2/bin/apachectl -t

5.  在编译安装apache时,建议加上两个参数(以后用到就不需要再编译): 

     --enable-modes-shared=most        //编译加载最多的模块

     --enalbe-modes-shared=all         //编译加载所有模块

 总之出现故障后,先要判断问题的原因,这样才有办法应对。   

                          

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI