好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

lamp环境无法解析php环境

lamp环境无法解析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

修改apache的配置文件httpd.conf

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

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

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

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

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

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

“ServerName localhost:80” 保存后退 

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

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

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

推荐教程:PHP视频教程

以上就是lamp环境无法解析php环境的详细内容,更多请关注Gxl网其它相关文章!

查看更多关于lamp环境无法解析php环境的详细内容...

  阅读:41次