溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

搭建LAMP環(huán)境PHP無法解析問題

發(fā)布時間:2020-08-18 13:08:47 來源:網(wǎng)絡(luò) 閱讀:2175 作者:collglle_cx 欄目:web開發(fā)

                      PHP不能解析之判斷故障

1.  /usr/local/apache/bin/apachectl -M  //查看有沒有加載php5_module(shared)模塊;

2.  在/usr/local/apache2/modules/ 目錄下,查看有沒有加載libphp5.so模塊; 

3.  復(fù)查編譯的配置文件有否有誤:/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.    再找繼續(xù)找到: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時,建議加上兩個參數(shù)(以后用到就不需要再編譯): 

     --enable-modes-shared=most        //編譯加載最多的模塊

     --enalbe-modes-shared=all         //編譯加載所有模塊

 總之出現(xiàn)故障后,先要判斷問題的原因,這樣才有辦法應(yīng)對。   

                          

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI