我在服务器上托管了多个站点,其中大多数站点在用户登录时使用会话。
例如,$_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
会话变量以查看用户是否已登录