cls_template.php 錯誤

2016-07-07 15:37 来源:www.chinab4c.com 作者:ecshop专家

Yuki - Powered by ECShop剛安裝完ecshop 2.62, 去到首頁就出現這個問題,
Warning
: file_put_contents() [[url=function.file-put-contents]function.file-put-contents[/url]]: SAFE MODE Restriction in effect. The script whose uid is "MySQL DataBase" is not allowed to access /home/vhosts/"My website"/temp/caches/8 owned by uid 48 in /home/vhosts/"My website"/includes/cls_template.php on line 198

請高手指教...

回答:
是否使用默认模板?清除一下缓存试试。

問題一樣,換了V2.51時就沒有這問題,但上傳圖片時會出現
Warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. The script whose uid is 193330 is not allowed to access /home/vhosts/yuki.freevar.com/images/200903 owned by uid 48 in /home/vhosts/yuki.freevar.com/includes/lib_common.php on line 3103

Warning: copy() [function.copy]: SAFE MODE Restriction in effect. The script whose uid is 193330 is not allowed to access /home/vhosts/yuki.freevar.com/images/200903 owned by uid 48 in /home/vhosts/yuki.freevar.com/includes/lib_common.php on line 3107

Warning: copy(/home/vhosts/yuki.freevar.com/images/200903/1238208657997412716.jpg) [function.copy]: failed to open stream: No such file or directory in /home/vhosts/yuki.freevar.com/includes/lib_common.php on line 3107

这种问题主要是服务器启用了php安全模式,所以php文件再执行的时候被检查文件所有者就是UID,把目录的所有者改成自己用户的UID,即可,一般程序自动生成的文件所有者为apache用户