Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(F:/Windo

來源:互聯網
上載者:User

好久沒有寫日誌了,也有段時間沒有系統寫PHP代碼了。回顧下可能的問題:

 

Warning

: session_start() [function.session-start

]:
open_basedir restriction in effect. File(F:/Windows/TEMP/) is not
within the allowed path(s): (E:/foot/;E:/APMServ5.2.6/tmp/uploadtemp/;) in E:/foot/login/login.php

on line 4

Fatal error

: session_start() [<a
href='function.session-start'>function.session-start</a>]:
Failed to initialize storage module: files (path: ) in E:/foot/login/login.php

on line 4

 

開啟了session_start()後出現了這個問題。

 

看了下博文:

http://topic.csdn.net/u/20091114/11/c3d69f26-51a6-48b2-9510-b613c53baee1.html?r=61284075

他的最後的解決方案還是無法真正解決問題,於是我在http://iwj.me/study/257.html上面找到瞭解決方法,我覺得方便,

因為根據我的實際經驗,修改.ini檔案是很容易出錯的。因為該設定檔不是僅僅服務一個程式,所以修改設定檔,帶來的後果

可能有很大的影響。通過

 

ini_set
(
'session.save_path'
,
dirname
(
__FILE__
)
.
'/../dirname/'
)
;
就可以脫離一些涉及到全域變數的問題。相對比較能接受。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.