:::
Tad Tools 工具包

Tadtool無法更新

discuss pic 2023-08-08 13:59:06
老師您好:
安裝tadtool後在做system模組更新時跳出下列錯誤:
警告: is_dir(): open_basedir restriction in effect. File(/home) is not within the allowed path(s): (/home/httpd/vhosts/bestcheng.com.tw/:/tmp/) 在檔案中的第 /modules/tadtools/class/Utility.php 列 312
警告: mkdir(): open_basedir restriction in effect. File(/home) is not within the allowed path(s): (/home/httpd/vhosts/bestcheng.com.tw/:/tmp/) 在檔案中的第 /modules/tadtools/class/Utility.php 列 315
警告: is_dir(): open_basedir restriction in effect. File(/home) is not within the allowed path(s): (/home/httpd/vhosts/bestcheng.com.tw/:/tmp/) 在檔案中的第 /modules/tadtools/class/Utility.php 列 315
錯誤: RuntimeException: Directory "/home" was not created 在檔案中的第 /modules/tadtools/class/Utility.php 列 316

後來我把/modules/tadtools/class/Utility.php 列311~318的如下列內容刪除就可以了。
//若目錄不存在的話建立目錄
if ($mk_dir != '' && !is_dir($mk_dir)) {
umask(000);
//若建立失敗秀出警告訊息
if (!mkdir($mk_dir, 0777) && !is_dir($mk_dir)) {
throw new \RuntimeException(sprintf('Directory "%s" was not created', $mk_dir));
}
}

請問,這樣做會有什麼影響嗎?
discuss pic 2023-08-08 14:18:51
tad

影響大囉~

未來裝模組將不會自動產生目錄

discuss pic 2023-08-08 15:51:38
老師您好:

請問我要怎麼解決這個困境?請 指導
discuss pic 2023-08-08 15:58:05
tad

一般不會有這種問題(從來也沒人遇過)

所以,在不清楚貴站整體環境下,無法給出任何建議

:::

http%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_discuss%2Fdiscuss.php%3FBoardID%3D6%26DiscussID%3D10382%26g2p%3D1

計數器

今天: 3356335633563356
昨天: 2259225922592259
總計: 7952154795215479521547952154795215479521547952154