LifeType 中文開發論壇

支援 => 安裝與設定 => 主題作者是: alecli 於 四月 16, 2005, 03:09:13 下午



主題: 剛剛安裝好了..但出現錯誤...
作者: alecli四月 16, 2005, 03:09:13 下午
主機:AMD Athlon 2200+ XP
環境:RedHat Linux 7.3
plog 1.0

問題一: template_cache_enabled 已關閉....
進入 /index.php?blogId=1
會出現以下訊息

Exception message: fopen(): SAFE MODE Restriction in effect. The script whose uid is 504 is not allowed to access /home/virtual/site2/fst/var/www/html/blog/tmp/20498 owned by uid 48
Error code: 2
-- Backtrace --
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/core/core.write_file.php(30): fopen
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/core/core.write_compiled_resource.php(30): smarty_core_write_file
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/Smarty.class.php(1450): smarty_core_write_compiled_resource
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/Smarty.class.php(1279): template._compile_resource
/home/virtual/site2/fst/var/www/html/blog/class/template/template.class.php(120): smarty.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/smartyview.class.php(190): template.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/blogview.class.php(212): smartyview.render
/home/virtual/site2/fst/var/www/html/blog/class/view/errorview.class.php(46): blogview.render
/home/virtual/site2/fst/var/www/html/blog/class/controller/controller.class.php(325): errorview.render
/home/virtual/site2/fst/var/www/html/blog/index.php(41): blogcontroller.process

Exception message: fopen(./tmp/20498/4260c5871533c): failed to open stream: Success
Error code: 2
-- Backtrace --
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/core/core.write_file.php(30): fopen
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/core/core.write_compiled_resource.php(30): smarty_core_write_file
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/Smarty.class.php(1450): smarty_core_write_compiled_resource
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/Smarty.class.php(1279): template._compile_resource
/home/virtual/site2/fst/var/www/html/blog/class/template/template.class.php(120): smarty.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/smartyview.class.php(190): template.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/blogview.class.php(212): smartyview.render
/home/virtual/site2/fst/var/www/html/blog/class/view/errorview.class.php(46): blogview.render
/home/virtual/site2/fst/var/www/html/blog/class/controller/controller.class.php(325): errorview.render
/home/virtual/site2/fst/var/www/html/blog/index.php(41): blogcontroller.process

Exception message: Smarty error: problem writing temporary file './tmp/20498/4260c5871533c'
Error code: 512
-- Backtrace --
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/Smarty.class.php(1108): trigger_error
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/core/core.write_file.php(31): template.trigger_error
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/core/core.write_compiled_resource.php(30): smarty_core_write_file
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/Smarty.class.php(1450): smarty_core_write_compiled_resource
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/Smarty.class.php(1279): template._compile_resource
/home/virtual/site2/fst/var/www/html/blog/class/template/template.class.php(120): smarty.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/smartyview.class.php(190): template.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/blogview.class.php(212): smartyview.render
/home/virtual/site2/fst/var/www/html/blog/class/view/errorview.class.php(46): blogview.render
/home/virtual/site2/fst/var/www/html/blog/class/controller/controller.class.php(325): errorview.render
/home/virtual/site2/fst/var/www/html/blog/index.php(41): blogcontroller.process

Exception message: fetch(): Unable to access ./tmp/20498/%%-44^%%-44349963^error.template.php
Error code: 2
-- Backtrace --
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/Smarty.class.php(1281): fetch
/home/virtual/site2/fst/var/www/html/blog/class/template/template.class.php(120): smarty.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/smartyview.class.php(190): template.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/blogview.class.php(212): smartyview.render
/home/virtual/site2/fst/var/www/html/blog/class/view/errorview.class.php(46): blogview.render
/home/virtual/site2/fst/var/www/html/blog/class/controller/controller.class.php(325): errorview.render
/home/virtual/site2/fst/var/www/html/blog/index.php(41): blogcontroller.process

Exception message: fetch(./tmp/20498/%%-44^%%-44349963^error.template.php): failed to open stream: Success
Error code: 2
-- Backtrace --
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/Smarty.class.php(1281): fetch
/home/virtual/site2/fst/var/www/html/blog/class/template/template.class.php(120): smarty.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/smartyview.class.php(190): template.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/blogview.class.php(212): smartyview.render
/home/virtual/site2/fst/var/www/html/blog/class/view/errorview.class.php(46): blogview.render
/home/virtual/site2/fst/var/www/html/blog/class/controller/controller.class.php(325): errorview.render
/home/virtual/site2/fst/var/www/html/blog/index.php(41): blogcontroller.process

Exception message: fetch(): Failed opening './tmp/20498/%%-44^%%-44349963^error.template.php' for inclusion (include_path='.:/php/includes:/usr/share/php')
Error code: 2
-- Backtrace --
/home/virtual/site2/fst/var/www/html/blog/class/template/smarty/Smarty.class.php(1281): fetch
/home/virtual/site2/fst/var/www/html/blog/class/template/template.class.php(120): smarty.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/smartyview.class.php(190): template.fetch
/home/virtual/site2/fst/var/www/html/blog/class/view/blogview.class.php(212): smartyview.render
/home/virtual/site2/fst/var/www/html/blog/class/view/errorview.class.php(46): blogview.render
/home/virtual/site2/fst/var/www/html/blog/class/controller/controller.class.php(325): errorview.render
/home/virtual/site2/fst/var/www/html/blog/index.php(41): blogcontroller.process


問題二:如果將打開了template_cache_enabled 這個設定...
會出現mkdir(): safe mode 的message......

請問我應該怎樣設定我的主機?謝謝


主題: 剛剛安裝好了..但出現錯誤...
作者: chris四月 16, 2005, 04:01:23 下午
你的 /tmp 沒有設定 CHMOD 為 777
plog 不能夠寫入 /tmp 。


主題: 剛剛安裝好了..但出現錯誤...
作者: alecli四月 16, 2005, 04:07:16 下午
引用自: chris
你的 /tmp 沒有設定 CHMOD 為 777
plog 不能夠寫入 /tmp 。


確定是777....

我估計是mkdir()函數不能使用...


主題: 剛剛安裝好了..但出現錯誤...
作者: lss四月 16, 2005, 05:39:58 下午
引用
.............SAFE MODE Restriction in effect. ..........

如果是自己的主機,把PHP的安全模式關掉。
找到 /etc/php.ini 修改為 safe_mode=0 或將這行註解掉,然後重新啟動 apache。[/code]


主題: 剛剛安裝好了..但出現錯誤...
作者: alecli四月 16, 2005, 08:10:18 下午
引用自: lss
引用
.............SAFE MODE Restriction in effect. ..........

如果是自己的主機,把PHP的安全模式關掉。
找到 /etc/php.ini 修改為 safe_mode=0 或將這行註解掉,然後重新啟動 apache。[/code]

我試過了。。safe_mode=Off 一樣出現這個問題....


主題: 剛剛安裝好了..但出現錯誤...
作者: markwu四月 16, 2005, 11:12:33 下午
你能把 整個 blog 的目錄的 owner 改成 504 試試看嗎?

Mark


主題: 剛剛安裝好了..但出現錯誤...
作者: alecli四月 17, 2005, 09:41:21 上午
引用自: markwu
你能把 整個 blog 的目錄的 owner 改成 504 試試看嗎?

Mark


是不是CHMOD blog 為504?

這樣就不能進入..


主題: 剛剛安裝好了..但出現錯誤...
作者: markwu四月 18, 2005, 10:13:19 上午
safe_mode 會造成 無法讀取的參數有兩個:

safe_mode = On
safe_mode_gid = Off

你能改成

safe_mode = Off
safe_mode_gid = On

在試一下嗎?再不行,我也不知道原因了。要請 Linux 高手幫忙了!

Mark


主題: 剛剛安裝好了..但出現錯誤...
作者: markwu四月 18, 2005, 02:43:52 下午
還有一個方法,你把 template_cache_enabled 這一個選項關掉試試看!

全部站台管控 » 模版設定 » template_cache_enabled

就是不讓 pLog 使用 smarty cache 的功能。

Mark


主題: 剛剛安裝好了..但出現錯誤...
作者: ahxi五月 29, 2005, 06:51:33 下午
引用自: markwu
還有一個方法,你把 template_cache_enabled 這一個選項關掉試試看!

全部站台管控 » 模版設定 » template_cache_enabled

就是不讓 pLog 使用 smarty cache 的功能。

Mark


我关闭了这个,还是不行 :'(

还有办法吗?


主題: 剛剛安裝好了..但出現錯誤...
作者: markwu五月 30, 2005, 11:21:26 上午
引用自: ahxi


我关闭了这个,还是不行 :'(

还有办法吗?


Hi ahxi:

你跟 alecli 的問題是一樣的嗎?能把錯誤訊息 post 上來嗎?

Mark


主題: 剛剛安裝好了..但出現錯誤...
作者: ahxiao五月 30, 2005, 12:32:51 下午
是啊,错误信息同楼主一样。

安 全模式问题。

我还跑到plogworld论坛搜索了一下,这个问题好像无解。

还好,我空间商通过空间管理后台提供一个安全模式修复的功能,但是只能修复已经存在的文件夹权限,新建的还是会出错。。

于是我写了个程序,把以后可能注册的文件夹都建立了,从1-n00,建了几百个,然后到空间后台修复了一下,,包括以后建立的都可以了~~

出现这种问题~~:-S 看来只能联系空间商解决权限问题了


主題: 剛剛安裝好了..但出現錯誤...
作者: markwu五月 30, 2005, 12:50:35 下午
引用自: ahxiao
是啊,错误信息同楼主一样。

安 全模式问题。

我还跑到plogworld论坛搜索了一下,这个问题好像无解。

还好,我空间商通过空间管理后台提供一个安全模式修复的功能,但是只能修复已经存在的文件夹权限,新建的还是会出错。。

于是我写了个程序,把以后可能注册的文件夹都建立了,从1-n00,建了几百个,然后到空间后台修复了一下,,包括以后建立的都可以了~~

出现这种问题~~:-S 看来只能联系空间商解决权限问题了


看來你者樣作是唯一的方法了,聯絡一下主機商,因為這是他們的設定問題。如果他們不改,那麼換主機商可能是唯一的方式了。

Mark