今天在安裝Views模組時,出現了PHP的錯誤:
fatal error allowed memory size of xxxxxx bytes exhausted (tried to allocate XXXX bytes) in php
雖然猜測是記憶體不足,但是卻不知道該如何改,幸好Google上已有解決的方法。

因為我是申請0000webhost的免費空間來,所以先到CPanel去開啟「File Manager」

登入之後,找到[Drupal根目錄]/sites/default/settings.php,待會要修改它的內容,
但是權限只有r--r--r--,所以必須先更改權限

在檔案列表頁面按下「Chmod」,並將權限先全部打開


回到檔案列表後,按下「Edit」編輯setings.php,並加入下列字串:
ini_set('memory_limit', '128M');

儲存之後,記得把權限再改回r--r--r--

參考資料來源:https://drupal.org
arrow
arrow
    全站熱搜

    keven 發表在 痞客邦 留言(0) 人氣()