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环境的细致内容,更多请关注ki4网别的相干文章!