愛踢瑞士刀快速選單
Join our feeds to automatically receive the latest headlines, news, and information formatted for your club's website or news reader.

錯誤訊息:Error during session start

錯誤訊息如下:

Error during session start; 
please check your PHP and/or webserver log file and configure your 
PHP installation properly. Also ensure that cookies are enabled in your browser.
session_start(): open(SESSION_FILE, O_RDWR) failed: Permission denied (13)
session_start(): Failed to read session data: files (path: /var/lib/php/session)

根據以往經驗判斷,一般經常會出現在新建好系統或是系統更新後,
多數會在使用phpmyadmin出現,或是程式使用session時候出現。
真正原因在於/var/lib/php資料夾權限不足。

解決方式有兩種:

1.將資料夾權限打開成777。

chmod 777 /var/lib/php/session

2.將資料夾擁有者改為網頁伺服器

CentOS

sudo chown nginx:nginx -R /var/lib/php/session

Ubuntu

sudo chown www-data:www-data -R /var/lib/php/session

Comments are closed.