2009-12-07 50 views
0

當我的網站上傳頭像時,出現此錯誤。我在我的服務器上的php.ini中將「open_basedir =/home /」更改爲「open_basedir =」。這是一個專用的服務器,並在進行調整後重新啓動。open_basedir防止頭像上傳的錯誤

Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/source:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/source/public_html/lib/php/tru/directory.php on line 46 



Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/source:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/source/public_html/lib/php/tru/directory.php on line 46 

我還能做些什麼來解決這個問題?

+0

你有沒有檢查你只有一個php.ini文件?無需重新啓動,只需重新啓動apache與apachectl重新啓動http://www.electrictoolbox.com/article/apache/restart-apache/ – Cups 2009-12-07 21:59:05

回答

0

問題不在於open_basedir,它在你的圖片上傳中。仔細看看錯誤信息:

File(/) is not within the allowed path(s): 

我敢打賭,文件名/路徑應該是空的變量。