:::
校園網站輕鬆架一般討論區

請教:自訂區塊預覽時出現錯誤訊息,謝謝您!

discuss pic 2015-08-16 16:11:13
Warning: require(C:/my_xoops/www/xoops_data/data/secure.php): failed to open stream: No such file or directory in C:\my_xoops\www\mainfile.php on line 131 Fatal error: require(): Failed opening required 'C:/my_xoops/www/xoops_data/data/secure.php' (include_path='.;C:/my_xoops/home/us_pear/PEAR') in C:\my_xoops\www\mainfile.php on line 131
discuss pic 2015-08-16 16:17:48
tad
XOOPS是那一版?更新成功了?
看起來是新的資料庫配舊的程式碼?
discuss pic 2015-08-16 16:19:11
我的C:/my_xoops/www/xoops_data/data/下有secure.php這個檔案
discuss pic 2015-08-16 16:21:02
我現在重新安裝輕鬆架(舊的my_xoops資料夾改名),沒匯入舊的資料庫,只是練習XOOPS的使用,謝謝您!
discuss pic 2015-08-16 16:22:39
tad
我好混亂啊....
請確定「C:/my_xoops/www/xoops_data/data/secure.php」路徑完全正確,且該檔案有存在...
discuss pic 2015-08-16 16:37:43
xoops_data資料夾不在www內,它跟www同一層

discuss pic 2015-08-16 16:39:26
在mainfile.php 第79行
    define('XOOPS_VAR_PATH', "{$xoop_up_path}/xoops_data");

discuss pic 2015-08-16 16:40:19
tad
所以是mainfile.php裡面的設定錯了
確定是輕鬆架?因為輕鬆架的mainfile.php是自動取得路徑的,理論上不會有此問題。
discuss pic 2015-08-16 16:41:23
mainfile.php....

if (!defined("XOOPS_MAINFILE_INCLUDED")) {
    define("XOOPS_MAINFILE_INCLUDED", 1);

    // XOOPS Physical Paths

    // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash
    define('XOOPS_ROOT_PATH', "{$root_path}");

    // For forward compatibility
    // Physical path to the XOOPS library directory WITHOUT trailing slash
    define('XOOPS_PATH', "{$xoop_up_path}/xoops_lib");
    // Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
    define('XOOPS_VAR_PATH', "{$xoop_up_path}/xoops_data");
    // Alias of XOOPS_PATH, for compatibility, temporary solution
    define("XOOPS_TRUST_PATH", XOOPS_PATH);

    // URL Association for SSL and Protocol Compatibility
    $http = 'http://';
    if (!empty($_SERVER['HTTPS'])) {
        $http = ($_SERVER['HTTPS']=='on') ? 'https://' : 'http://';
    }
    define('XOOPS_PROT', $http);

    // XOOPS Virtual Path (URL)
    // Virtual path to your main XOOPS directory WITHOUT trailing slash
    // Example: define('XOOPS_URL', 'http://localhost');
    define('XOOPS_URL', "{$ip}");

/*
discuss pic 2015-08-16 16:42:55
確定是輕鬆架,今天把舊的my_xoops資料夾改名後才重裝的
discuss pic 2015-10-14 12:46:23
我也有相同問題,我的錯誤訊息是:
Warning: require(/var/www/html/xoops_data/data/secure.php): failed to open stream: No such file or directory in /var/www/html/mainfile.php on line 131

Fatal error: require(): Failed opening required '/var/www/html/xoops_data/data/secure.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/mainfile.php on line 131

已悉依本站手冊說明設定,版本皆爲最新版。
discuss pic 2015-10-14 12:50:05
tad
請確認有無 /var/www/html/xoops_data/data/secure.php 這個路徑和檔案...
discuss pic 2015-10-15 12:07:47
discuss pic 2015-10-15 12:52:19
tad
並沒有
圖是 /var/www/xoops_data/data/secure.php
而非 /var/www/html/xoops_data/data/secure.php
discuss pic 2015-10-15 22:19:36
請問老師,所以輕鬆架不能放在 /var/www/的子目錄下嗎?
二、放置在 /var/www 的範例(主網站)
5.要放置在 /var/www/的子目錄下應該也行,例如自訂一個叫做 myxoops 的子目錄:/var/www/myxoops html,但其位置應該是這樣:
  • /var/www/myxoops html(把原先的 public_html 改名為 myxoops)
  • /var/www/xoops_data(不可移出到 var/xoops_data)
  • /var/www/xoops_lib(不可移出到 var/xoops_lib)
我目前是把/var/www/myxoops 改爲 /var/www/html。
我應該改爲下面的路徑嗎?
  • /var/www
  • /var/xoops_data
  • /var/xoops_lib
discuss pic 2015-10-21 21:52:58
tad老師您好:又要麻煩您了!
我改爲下面的路徑後,
  • /var/www
  • /var/xoops_data
  • /var/xoops_lib
出現的錯誤訊息是:
Warning: require(/var/www/xoops_data/data/secure.php): failed to open stream: No such file or directory in /var/www/mainfile.php on line 131

Fatal error: require(): Failed opening required '/var/www/xoops_data/data/secure.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/mainfile.php on line 131

我是用輕鬆架,我的mainfile.php是否需修改?
discuss pic 2015-10-21 21:59:05
tad
mainfile.php 的內容到底是什麼啊?
若原來可以,那就別改了啊...
discuss pic 2015-10-21 22:08:44
沒有改哦!
 /var/www/html
/var/www/xoops_data
/var/www/xoops_lib
錯誤訊息是:
Warning: require(/var/www/html/xoops_data/data/secure.php): failed to open stream: No such file or directory in /var/www/html/mainfile.php on line 131

Fatal error: require(): Failed opening required '/var/www/html/xoops_data/data/secure.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/mainfile.php on line 131

改爲下面的路徑後,
  • /var/www
  • /var/xoops_data
  • /var/xoops_lib
出現的錯誤訊息是:
Warning: require(/var/www/xoops_data/data/secure.php): failed to open stream: No such file or directory in /var/www/mainfile.php on line 131

Fatal error: require(): Failed opening required '/var/www/xoops_data/data/secure.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/mainfile.php on line 131

discuss pic 2015-10-21 22:13:21
tad
不然乾脆這樣放吧
  • /var/www
  • /var/www/xoops_data
  • /var/www/xoops_lib

discuss pic 2015-10-21 22:42:21
路過的訪客
老師,
Warning: require(/var/xoops_data/data/secure.php): failed to open stream: No such file or directory in /var/www/mainfile.php on line 131

Fatal error: require(): Failed opening required '/var/xoops_data/data/secure.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/mainfile.php on line 131
discuss pic 2015-10-21 22:55:32
tad
真是怪了...mainfile.php 既然沒有動
為什麼引入的 xoops_data 卻跑來跑去?
一下子說沒有     /var/www/xoops_data/data/secure.php 這個檔
一下子又說沒有 /var/xoops_data/data/secure.php 這個檔
一點都不合理

discuss pic 2015-10-21 23:10:05
tad
discuss pic 2015-10-21 23:21:00
tad
明明底下這樣是OK的啊!
  • /var/www
  • /var/xoops_data
  • /var/xoops_lib

discuss pic 2015-10-21 23:32:48
新增區塊時有訊息,請看圖
discuss pic 2015-10-21 23:41:31
tad
基本上,那可以無視...
discuss pic 2015-10-22 00:02:06
原來如此,成功了,謝謝老師!
:::

快速登入


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

計數器

今天: 6304630463046304
昨天: 8625862586258625
總計: 8036911803691180369118036911803691180369118036911