今天我們?cè)谡{(diào)試服務(wù)器的時(shí)候出現(xiàn)了一個(gè)錯(cuò)誤,下面是錯(cuò)誤的內(nèi)容
Warning: session_start(): open(C:/Program Files/php/sessiontempsess_0cde28de3ce1a2e2cc8e8723b5a40279, O_RDWR) failed: Permission denied (13) in D:home400mzmxxxwebsyssiteinstalldatainstall.php on line 7
Warning: Unknown(): open(C:/Program Files/php/sessiontempsess_0cde28de3ce1a2e2cc8e8723b5a40279, 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 (C:/Program Files/php/sessiontemp) in Unknown on line 0
通過(guò)以上的錯(cuò)誤我們可以看到是因?yàn)闆](méi)有了臨時(shí)目錄造成的,
解決辦法:
修改php.ini中的session.auto_start = 0 為 session.auto_start = 1
重啟IIS調(diào)試!
如果還提示以下類似的警告:
Warning: session_start() [function.session-start]: open(/tmpsess_84cb589ea249708b09c3d5e6836fdd0d, O_RDWR) failed: No such file or directory (2) in E:webhtdocs111.php on line 9
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at E:webhtdocs111.php:8) in E:webhtdocs111.php on line 9
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at E:webhtdocs111.php:8) in E:webhtdocs111.php on line 9
Warning: Unknown(): open(/tmpsess_84cb589ea249708b09c3d5e6836fdd0d, O_RDWR) failed: No such file or directory (2) 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 就是 session變量需要系統(tǒng)的臨時(shí)空間
session.save_path = "設(shè)置一個(gè)有效文件夾的絕對(duì)路徑"
(比如 session.save_path = "C:WINDOWStemp" )
session.save_path =前面的 “;”分號(hào)去掉
另外編輯該文件夾的權(quán)限 添加EVERYONE 有寫(xiě)入修改權(quán)限即可!
掃一掃
關(guān)注新圖聞科技
全國(guó)咨詢熱線
186-0984-0880