0
我在一臺服務器上託管多個站點,其中大多數站點在用戶登錄時使用會話。多個站點上的PHP會話
例如,如果用戶登錄成功,我有一個會話變量$_SESSION["loggedin"] = 'yes'
。
這是在多個網站上相同的,但如果我登錄到說2點,同時他們中的一個將停止工作,並顯示以下錯誤:
Warning: session_start() [function.session-start]: open(/tmp/sess_8f7b4997fbfdd08855a410ae4638821f, O_RDWR) failed: Permission denied (13) in /home/theboaty/public_html/new_site/admin/authorisation.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/theboaty/public_html/new_site/admin/authorisation.php:2) in /home/theboaty/public_html/new_site/admin/authorisation.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at /home/theboaty/public_html/new_site/admin/authorisation.php:2) in /home/theboaty/public_html/new_site/admin/authorisation.php on line 5
Warning: Unknown: open(/tmp/sess_8f7b4997fbfdd08855a410ae4638821f, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
注:authorisation.php
將檢查loggedin
會話變量以查看用戶是否已登錄
你分享(或目的或無意)站點之間的相同的會話ID? –
添加新站點時,只會複製代碼。沒有實現目的 – charlie
如果您使用Firefox,可以通過右鍵單擊頁面並選擇「查看頁面信息 - >安全 - > Cookie」來訪問cookie管理器。 –