LifeType 中文開發論壇

支援 => 安裝與設定 => 主題作者是: gtth008 於 五月 03, 2006, 05:27:28 上午



主題: 檔案中心無法上傳檔案
作者: gtth008五月 03, 2006, 05:27:28 上午
最近重新安裝lifetype,卻發生檔案中心無法上傳檔案的問題,以前好像也發生過,因有一陣子沒摸lifetype,腦袋不靈光了。
錯誤訊息如下:
Exception message: fopen(): open_basedir restriction in effect. File(/var/tmp/php6yyW1W) is not within the allowed path(s): (/usr/local/www/data)
Error code: 2
-- Backtrace --
/mnt/vol1/www/data/blog/class/gallery/getid3/getid3.php(180): fopen
/mnt/vol1/www/data/blog/class/gallery/dao/galleryresources.class.php(476): getid3.analyze
/mnt/vol1/www/data/blog/class/action/admin/adminaddresourceaction.class.php(78): galleryresources.addresource
/mnt/vol1/www/data/blog/class/controller/controller.class.php(309): adminaddresourceaction.perform
/mnt/vol1/www/data/blog/admin.php(39): admincontroller.process

Exception message: fopen(/var/tmp/php6yyW1W): failed to open stream: Operation not permitted
Error code: 2
-- Backtrace --
/mnt/vol1/www/data/blog/class/gallery/getid3/getid3.php(180): fopen
/mnt/vol1/www/data/blog/class/gallery/dao/galleryresources.class.php(476): getid3.analyze
/mnt/vol1/www/data/blog/class/action/admin/adminaddresourceaction.class.php(78): galleryresources.addresource
/mnt/vol1/www/data/blog/class/controller/controller.class.php(309): adminaddresourceaction.perform
/mnt/vol1/www/data/blog/admin.php(39): admincontroller.process

Exception message: copy(): open_basedir restriction in effect. File(/var/tmp/php6yyW1W) is not within the allowed path(s): (/usr/local/www/data)
Error code: 2
-- Backtrace --
/mnt/vol1/www/data/blog/class/file/file.class.php(377): copy
/mnt/vol1/www/data/blog/class/file/fileuploads.class.php(123): file.rename
/mnt/vol1/www/data/blog/class/file/fileuploads.class.php(57): fileuploads.my_move_uploaded_file
/mnt/vol1/www/data/blog/class/gallery/dao/galleryresourcestorage.class.php(240): fileuploads.processfile
/mnt/vol1/www/data/blog/class/gallery/dao/galleryresources.class.php(498): galleryresourcestorage.storeupload
/mnt/vol1/www/data/blog/class/action/admin/adminaddresourceaction.class.php(78): galleryresources.addresource
/mnt/vol1/www/data/blog/class/controller/controller.class.php(309): adminaddresourceaction.perform
/mnt/vol1/www/data/blog/admin.php(39): admincontroller.process

Exception message: Cannot modify header information - headers already sent by (output started at /mnt/vol1/www/data/blog/class/object/exception.class.php:37)
Error code: 2
-- Backtrace --
/mnt/vol1/www/data/blog/class/view/view.class.php(316): header
/mnt/vol1/www/data/blog/class/view/admin/adminview.class.php(106): view.render
/mnt/vol1/www/data/blog/class/view/admin/admintemplatedview.class.php(36): adminview.render
/mnt/vol1/www/data/blog/class/view/admin/adminresourceslistview.class.php(104): admintemplatedview.render
/mnt/vol1/www/data/blog/class/controller/controller.class.php(329): adminresourceslistview.render
/mnt/vol1/www/data/blog/admin.php(39): admincontroller.process

Exception message: Cannot modify header information - headers already sent by (output started at /mnt/vol1/www/data/blog/class/object/exception.class.php:37)
Error code: 2
-- Backtrace --
/mnt/vol1/www/data/blog/class/view/view.class.php(177): header
/mnt/vol1/www/data/blog/class/view/view.class.php(318): adminresourceslistview.sendcontenttype
/mnt/vol1/www/data/blog/class/view/admin/adminview.class.php(106): view.render
/mnt/vol1/www/data/blog/class/view/admin/admintemplatedview.class.php(36): adminview.render
/mnt/vol1/www/data/blog/class/view/admin/adminresourceslistview.class.php(104): admintemplatedview.render
/mnt/vol1/www/data/blog/class/controller/controller.class.php(329): adminresourceslistview.render
/mnt/vol1/www/data/blog/admin.php(39): admincontroller.process


主題: Re: 檔案中心無法上傳檔案
作者: markwu五月 03, 2006, 09:59:56 上午
請參考:http://forum.lifetype.org.tw/index.php?topic=2242.0

Mark


主題: Re: 檔案中心無法上傳檔案
作者: gtth008五月 03, 2006, 10:25:27 上午
Mark:

伺服器我自己架的,該機器架moodle可借由php上傳檔案,我記得以前好像改過php.ini,
但一陣子沒碰,真給它忘了。

今天趕著辦研習,昨晚架好站後,只剩這個問題未解。


主題: Re: 檔案中心無法上傳檔案
作者: gtth008五月 03, 2006, 11:00:59 上午
OK!我把php上傳的目錄改到 /(根目錄),問題解決了。

不過檔案中心gif縮圖使用GD似乎無解。


主題: Re: 檔案中心無法上傳檔案
作者: markwu五月 03, 2006, 11:21:12 上午
那就要改用 imagemagick 了!

Mark