歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 29, 2024, 03:30:38 下午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  在虛擬主機安裝的問題(open_basedir restrict) « 上篇主題 下篇主題 »
頁: 1 [2] 3
作者 主題: 在虛擬主機安裝的問題(open_basedir restrict)  (閱讀 45358 次)
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #15 於: 三月 21, 2005, 09:56:37 上午 »

結果如何?解了嗎?

你的主機商願意把這兩行加進去嗎?

程式碼:
php_admin_value safe_mode 1 
php_admin_value open_base_dir /home/xxxx.com.tw/


Mark
已記錄

ellenlee
新手見習
*
文章: 10


檢視個人資料
« 回覆文章 #16 於: 三月 24, 2005, 07:45:37 下午 »

我昨晚試著從0.32升級到1.0
結果發生跟樓主相同的情形
可是我到我的php.ini去看, safe mode是off的
而用phpinfo()看到的php的系統資料顯示open_basedir
Local Value是顯示為/home/httpd/vhosts/我的帳號/httpdocs:/tmp
Master Value是顯示為no value

我的主機是半專屬主機,可以由我自己去改php.ini
請問我應該將phpini如何改呢??
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #17 於: 三月 25, 2005, 01:25:12 下午 »

如果沒記錯,應該是把

程式碼:
safe_mode = On
open_basedir = "/home/xxxx.com.tw/"


加到 php.ini 就可以了。

Mark
已記錄

ellenlee
新手見習
*
文章: 10


檢視個人資料
« 回覆文章 #18 於: 三月 25, 2005, 05:43:57 下午 »

引用自: markwu
如果沒記錯,應該是把

程式碼:
safe_mode = On
open_basedir = "/home/xxxx.com.tw/"


加到 php.ini 就可以了。

Mark

cody說的意思好像是要把
php_admin_value safe_mode 1
php_admin_value open_base_dir /home/xxxx.com.tw/

這兩條關起來
那意思應該是要safe_mode = off 吧
而不是Mark你說的 On
可是其實我的本來就是 off 的狀態
因為用On的話會限制許多php函式無法執行
另一個open_basedir要關起來
怎麼關我就不會了
麻煩懂得的大大了
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #19 於: 三月 25, 2005, 07:17:50 下午 »

引用自: ellenlee
引用自: markwu
如果沒記錯,應該是把

程式碼:
safe_mode = On
open_basedir = "/home/xxxx.com.tw/"


加到 php.ini 就可以了。

Mark

cody說的意思好像是要把
php_admin_value safe_mode 1
php_admin_value open_base_dir /home/xxxx.com.tw/

這兩條關起來
那意思應該是要safe_mode = off 吧
而不是Mark你說的 On
可是其實我的本來就是 off 的狀態
因為用On的話會限制許多php函式無法執行
另一個open_basedir要關起來
怎麼關我就不會了
麻煩懂得的大大了


Ha ... 我看錯了!

你的 open_basedir 在 php.ini 前面有 ; 嗎?如果有就是關起來了!

假設你的 php.ini 裡面本來就是關的,那看看 http.conf 中是否有

php_admin_value open_base_dir /home/xxxx.com.tw/

把他給 remark 掉。

Mark
已記錄

ellenlee
新手見習
*
文章: 10


檢視個人資料
« 回覆文章 #20 於: 三月 25, 2005, 11:21:29 下午 »

我的php.ini裡是顯示如下的
;open_basedir =

open_basedir應該也是關起來的
也就是說我的safe mode與open_basedir都是關起來的

我將0.32的plog整個移到現在的半專屬主機之後,summary裡的「最新發表的文章」就無法再更新
但整個plog其他功能都是正確的
如果我刪去tmp這資料夾裡所有暫存的資料,若執行到summary.php或admin.php時
第一次執行時它就會出現像Blowfish 所說的
Exception message: is_readable(): open_basedir restriction in effect. File(/usr/share/pear/plugins/compiler.cycle.php) is not within the allowed path(s): (/home/httpd/vhosts/我的帳號/httpdocs:/tmp)
Error code: 2
-- Backtrace --
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/core/core.get_include_path.php(34): is_readable
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/core/core.assemble_plugin_filepath.php(54): smarty_core_get_include_path
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1378): smarty_core_assemble_plugin_filepath
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(588): smarty_compiler._get_plugin_filepath
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(544): smarty_compiler._compile_compiler_tag
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1498): smarty_compiler._compile_file
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1433): template._compile_source
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1271): template._compile_resource
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/template.class.php(83): smarty.fetch
/home/httpd/vhosts/我的帳號/httpdocs/plog/summary.php(179): template.fetch
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/controller/controller.class.php(118): summaryview.render
/home/httpd/vhosts/我的帳號/httpdocs/plog/summary.php(190): controller.process

Exception message: is_readable(): open_basedir restriction in effect. File(/usr/share/pear/plugins/block.cycle.php) is not within the allowed path(s): (/home/httpd/vhosts/我的帳號/httpdocs:/tmp)
Error code: 2
-- Backtrace --
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/core/core.get_include_path.php(34): is_readable
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/core/core.assemble_plugin_filepath.php(54): smarty_core_get_include_path
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1378): smarty_core_assemble_plugin_filepath
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(663): smarty_compiler._get_plugin_filepath
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(546): smarty_compiler._compile_block_tag
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1498): smarty_compiler._compile_file
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1433): template._compile_source
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1271): template._compile_resource
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/template.class.php(83): smarty.fetch
/home/httpd/vhosts/我的帳號/httpdocs/plog/summary.php(179): template.fetch
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/controller/controller.class.php(118): summaryview.render
/home/httpd/vhosts/我的帳號/httpdocs/plog/summary.php(190): controller.process

可是當我發表完一篇文章後,它自動在tmp裡又生出了檔案就好了,執行到summary.php不會再有問題,但在執行有些admin.php的功能時則會再出現上頭的那些錯誤訊息
而且那summary裡的「最新發表的文章」無法再更新

其實我原本是要升級到1.0的,而我也真的那麼做了三次
但沒有一次成功,至少我每次的問題都嘗試著去解決了
最後一次就是出現在這個tmp,以及使用者的模版執行錯誤(因為我預設都是用reic的,然後我也沒辦法請每個人都去改回grey)
呼~真的是要經歷好幾次失敗呢
於是我看到四月一日會有正式版出來,我就想說先恢復到0.32好了,等4/1之後再一次去解決會出現的問題
沒想到,我搬個主機,連0.32的summary裡的「最新發表的文章」都出了問題 嚎啕大哭
已記錄
lss
我不是被~拉~~出來的,不要叫我大大!
總版主
超級會員
*****
文章: 1511



檢視個人資料 個人網站
« 回覆文章 #21 於: 三月 26, 2005, 10:08:29 上午 »

open_basedir 的預設值應該是沒有限制,而且你的 php.ini 裡沒有設定,那應該是主機商在 httpd.conf 裡設定了。

我是還沒找到 httpd.conf 裡的設定和 php.ini 裡的設定衝突時,那個設定是優先的?由此看來,似乎 httpd.conf 的設定值優先了。

找主機商解決吧!
已記錄

沒找過 常見問題集或不知道 如何在 LifeType 中文開發論壇發問的人,恕不回答問題
ellenlee
新手見習
*
文章: 10


檢視個人資料
« 回覆文章 #22 於: 三月 26, 2005, 10:55:28 上午 »

引用自: lss
open_basedir 的預設值應該是沒有限制,而且你的 php.ini 裡沒有設定,那應該是主機商在 httpd.conf 裡設定了。

我是還沒找到 httpd.conf 裡的設定和 php.ini 裡的設定衝突時,那個設定是優先的?由此看來,似乎 httpd.conf 的設定值優先了。

找主機商解決吧!

謝謝lss的回答
我租用的主機是半專屬主機,它可以讓我使用ssh自行更改php.ini以及 httpd.conf 等等apache組態檔
我之前看過httpd.conf,這檔裡面就完全沒有open_basedir這個設定喔
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #23 於: 三月 26, 2005, 11:08:09 上午 »

Hi ellenlee:

幫個忙!把 class/template/smarty/core/core.get_inlcude path.php 改為

引用
function smarty_core_get_include_path(&$params, &$smarty)
{
    static $_path_array = null;

    if(!isset($_path_array)) {
        $_ini_include_path = ini_get('include_path');

        if(strstr($_ini_include_path,';')) {
            // windows pathnames
            $_path_array = explode(';',$_ini_include_path);
        } else {
            $_path_array = explode(':',$_ini_include_path);
        }
    }
   
    print_r($_path_array);  
 
    foreach ($_path_array as $_include_path) {
        if (@is_readable($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) {
               $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path'];
            return true;
        }
    }
    return false;
}


我想看系統傳給你的 include_path 是什麼?執行後麻煩把結果 post 上來。

Mark
已記錄

ellenlee
新手見習
*
文章: 10


檢視個人資料
« 回覆文章 #24 於: 三月 26, 2005, 11:50:19 上午 »

Array (
  • => . [1] => /usr/share/pear )
Exception message: is_readable(): open_basedir restriction in effect. File(/usr/share/pear/plugins/compiler.cycle.php) is not within the allowed path(s): (/home/httpd/vhosts/我的帳號/httpdocs:/tmp)
Error code: 2
-- Backtrace --
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/core/core.get_include_path.php(37): is_readable
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/core/core.assemble_plugin_filepath.php(54): smarty_core_get_include_path
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1378): smarty_core_assemble_plugin_filepath
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(588): smarty_compiler._get_plugin_filepath
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(544): smarty_compiler._compile_compiler_tag
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1498): smarty_compiler._compile_file
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1433): template._compile_source
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1271): template._compile_resource
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/template.class.php(83): smarty.fetch
/home/httpd/vhosts/我的帳號/httpdocs/plog/summary.php(179): template.fetch
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/controller/controller.class.php(118): summaryview.render
/home/httpd/vhosts/我的帳號/httpdocs/plog/summary.php(190): controller.process
Array (
  • => . [1] => /usr/share/pear )
Exception message: is_readable(): open_basedir restriction in effect. File(/usr/share/pear/plugins/block.cycle.php) is not within the allowed path(s): (/home/httpd/vhosts/我的帳號/httpdocs:/tmp)
Error code: 2
-- Backtrace --
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/core/core.get_include_path.php(37): is_readable
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/core/core.assemble_plugin_filepath.php(54): smarty_core_get_include_path
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1378): smarty_core_assemble_plugin_filepath
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(663): smarty_compiler._get_plugin_filepath
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(546): smarty_compiler._compile_block_tag
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1498): smarty_compiler._compile_file
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1433): template._compile_source
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/smarty/Smarty.class.php(1271): template._compile_resource
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/template/template.class.php(83): smarty.fetch
/home/httpd/vhosts/我的帳號/httpdocs/plog/summary.php(179): template.fetch
/home/httpd/vhosts/我的帳號/httpdocs/plog/class/controller/controller.class.php(118): summaryview.render
/home/httpd/vhosts/我的帳號/httpdocs/plog/summary.php(190): controller.process


to mark, 以上是我在0.32版本的summary.php執行後的結果
我剛才又發現,會員新發表的文章會在summary的最新發表文章出現
但我自己的plog不行(是第一個建立的)
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #25 於: 三月 26, 2005, 12:11:20 下午 »

Hi ellen:

你的 php.ini 中的 inlcude path 裡面有 /usr/share/pear 這一個嗎?如果有?可以把他先拿掉試試嗎?

Mark
已記錄

ellenlee
新手見習
*
文章: 10


檢視個人資料
« 回覆文章 #26 於: 三月 26, 2005, 02:13:06 下午 »

hi markwu,我的php.ini裡沒有/usr/share/pear這些敘述

需要我整個php.ini寄給你看看嗎??
已記錄
lss
我不是被~拉~~出來的,不要叫我大大!
總版主
超級會員
*****
文章: 1511



檢視個人資料 個人網站
« 回覆文章 #27 於: 三月 26, 2005, 02:24:52 下午 »

hi ellenlee:
請問你的主機商是那一家?請提供一下連結。
我想,雖然你可以改 httpd.conf 和 php.ini ,但是有一些設定值應該仍被主機商控制,是不能由虛擬主機覆寫的。

……難道………,改了設定值,必需重新啟動 apache ,……

先看看那家主機商提供什麼樣的環境吧!
已記錄

沒找過 常見問題集或不知道 如何在 LifeType 中文開發論壇發問的人,恕不回答問題
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #28 於: 三月 26, 2005, 02:51:40 下午 »

sigh ....

完全不知你的主機怎麼設定的!我只能用很賤的方法:

你把上面那個檔案的

引用
$_ini_include_path = ini_get('include_path');


改為

引用
// $_ini_include_path = ini_get('include_path');
$_ini_include_path = ".";


我相信應該就可以了!但這是治標並非治本。

Mark
已記錄

ellenlee
新手見習
*
文章: 10


檢視個人資料
« 回覆文章 #29 於: 三月 26, 2005, 09:51:20 下午 »

引用自: lss
hi ellenlee:
請問你的主機商是那一家?請提供一下連結。
我想,雖然你可以改 httpd.conf 和 php.ini ,但是有一些設定值應該仍被主機商控制,是不能由虛擬主機覆寫的。

……難道………,改了設定值,必需重新啟動 apache ,……

先看看那家主機商提供什麼樣的環境吧!

我使用的是威博達http://www.webdsn.net/所提供的半專屬主機,他們上游的主機好像是在美國,我沒問過

我若改了apache組態設定值,那就一定得重新啟動它
可是我都還沒因為plog而改過httpd.conf 和 php.ini,所以應該不必重新啟動它吧
我租用的主機是有點類似專屬主機的那種,就是那種我可以自己裝設軟體在主機上的,還有幾乎所有設定管理等都要自己動手



引用自: markwu
sigh ....

完全不知你的主機怎麼設定的!我只能用很賤的方法:

你把上面那個檔案的

引用
$_ini_include_path = ini_get('include_path');


改為

引用
// $_ini_include_path = ini_get('include_path');
$_ini_include_path = ".";


我相信應該就可以了!但這是治標並非治本。

Mark

謝謝Mark與lss這兩天的幫忙
我已經有點累累的了,實在是佩服兩位的熱心與耐心
我打算等四月一日過後正式版出來再更新到1.0
到時候應該又有一段漫長的修改的路要走
謝謝兩位了 眨眼睛
已記錄
頁: 1 [2] 3
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  在虛擬主機安裝的問題(open_basedir restrict) « 上篇主題 下篇主題 »
    前往: