1
kiwiguy
Please Help!!!
  • 2004/8/22 9:28

  • kiwiguy

  • Friend of XOOPS

  • Posts: 295

  • Since: 2004/4/19


I have just moved my site and i changed my mainfile.php for the virtual and physical path everything went well apart from 1 small hitch after i changed one thing in the mainfile this came up

Quote:
Warning: main(/****/****/public_html//include/common.php): failed to open stream: No such file or directory in /****/*****/public_html/kiwisite/mainfile.php on line 93

Warning: main(): Failed opening '/****/*****/public_html//include/common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /****/*****/public_html/kiwisite/mainfile.php on line 93

Warning: main(/*****/****/public_html//class/xoopsblock.php): failed to open stream: No such file or directory in /****/****/public_html/kiwisite/header.php on line 28

Warning: main(): Failed opening '/****/*****/public_html//class/xoopsblock.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /*****/*****/public_html/kiwisite/header.php on line 28

Warning: main(/****/*****/public_html//class/template.php): failed to open stream: No such file or directory in /****/*****/public_html/kiwisite/header.php on line 62

Fatal error: main(): Failed opening required '/****/****/public_html//class/template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /****/*****/public_html/kiwisite/header.php on line 62


This only came up after i changed the section in mainfile which was this

Quote:
if (!isset($xoopsOption['nocommon'])) {
include XOOPS_ROOT_PATH."/include/common.php";


I had changed it to this

Quote:
if (!isset($xoopsOption['nocommon'])) {
include XOOPS_ROOT_PATH."kiwisite/include/common.php";


But after I had changed it to that it came up with error messages so i undid what i did and put it back to the original coding which was

Quote:
if (!isset($xoopsOption['nocommon'])) {
include XOOPS_ROOT_PATH."/include/common.php";


Thats when it came up with all the abpve stuff i first quoted.

kiwi

2
Mithrandir
Re: Please Help!!!

XOOPS_ROOT_PATH in mainfile.php should not have a trailing slash.

If your physical path is /****/*****/public_html/kiwisite then that is what you should write in XOOPS_ROOT_PATH. If you had a wrong XOOPS_ROOT_PATH and attempted to correct it by changing the include statement for include/common.php I can understand why it won't work as everything else using XOOPS_ROOT_PATH would be wrong.

3
kiwiguy
Re: Please Help!!!
  • 2004/8/22 10:14

  • kiwiguy

  • Friend of XOOPS

  • Posts: 295

  • Since: 2004/4/19


DELETED BY AUTHOR REFER TO RECENT POST

4
kiwiguy
Re: Please Help!!!
  • 2004/8/22 11:08

  • kiwiguy

  • Friend of XOOPS

  • Posts: 295

  • Since: 2004/4/19


I did what you said mithrandir and XOOPS_ROOT_PATH is correct there are no trailing "/" before the include/common.php and I still get these errors

Quote:
Warning: main(/*****/****/public_html/include/common.php): failed to open stream: No such file or directory in /(****/*****/public_html/kiwisite/mainfile.php on line 93

Warning: main(): Failed opening '/*****/*****/public_html/include/common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /****/*****/public_html/kiwisite/mainfile.php on line 93

Warning: main(/****/****/public_html/class/xoopsblock.php): failed to open stream: No such file or directory in /****/*****/public_html/kiwisite/header.php on line 28

Warning: main(): Failed opening '/*****/*****/public_html/class/xoopsblock.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /****/*****/public_html/kiwisite/header.php on line 28

Warning: main(/****/*****/public_html/class/template.php): failed to open stream: No such file or directory in /****/*****/public_html/kiwisite/header.php on line 62

Fatal error: main(): Failed opening required '/****/*****/public_html/class/template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /****/*****/public_html/kiwisite/header.php on line 62


So i would really appreciate some more help if possible please if not let me know so I can do a clean install

kiwiguy

5
kiwiguy
Re: Please Help!!!
  • 2004/8/22 11:46

  • kiwiguy

  • Friend of XOOPS

  • Posts: 295

  • Since: 2004/4/19


I managed to fix a couple of errors but still have probs

Quote:
Warning: main(home/kiwiguy/public_html/kiwisite/include/common.php): failed to open stream: No such file or directory in /home/kiwiguy/public_html/kiwisite/mainfile.php on line 93

Warning: main(): Failed opening 'home/kiwiguy/public_html/kiwisite/include/common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/****/public_html/kiwisite/mainfile.php on line 93

Warning: main(home/*****/public_html/kiwisite/class/template.php): failed to open stream: No such file or directory in /home/*****/public_html/kiwisite/header.php on line 62

Fatal error: main(): Failed opening required 'home/*****/public_html/kiwisite/class/template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/kiwisite/header.php on line 62


But i still need help fixing the rest as soon as I think I fixed it it comes back to the original errors in previous post

6
kiwiguy
Re: Please Help!!!
  • 2004/8/22 12:35

  • kiwiguy

  • Friend of XOOPS

  • Posts: 295

  • Since: 2004/4/19


Don't worry I am doing a clean install seems to me that nobody was able to help after 70 odd views thanks for the help LOLOLOLOL

7
Mithrandir
Re: Please Help!!!

Nobody able to help? Oh thank you very much.

As I see the problem it is because you cannot write the proper XOOPS_ROOT_PATH, which should start with the forward slash as in the error messages (If you read carefully, you'll notice that it says cannot open "home/....." in "/home/...." - the first one is the file to be opened i.e. XOOPS_ROOT_PATH."/etc. so that is manually inserted, but the second one is gathered by the server and hence a bit more reliable)

8
Belle
Re: Please Help!!!
  • 2004/8/27 10:22

  • Belle

  • Just popping in

  • Posts: 6

  • Since: 2004/8/27


i have the same problem

strange thing is that i only get the errors on some modules

http://www.fluks.be/modules/news/

works fine

http://www.fluks.be/modules/newbb/

gives an error

my header.php looks like this

<?php
// $Id: header.php,v 1.40 2004/06/13 05:47:31 Onokazu Exp $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// <https://xoops.org/> //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //

include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
if ($xoopsConfig['theme_set'] != 'default' && file_exists(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/theme.php')) {
// the old way..
$xoopsOption['theme_use_smarty'] = 0;
if (file_exists(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/lang-'.$xoopsConfig['language'].'.php')) {
include XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/lang-'.$xoopsConfig['language'].'.php';
} elseif (file_exists(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/lang-english.php')) {
include XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/lang-english.php';
}
$config_handler =& xoops_gethandler('config');
$xoopsConfigMetaFooter =& $config_handler->getConfigsByCat(XOOPS_CONF_METAFOOTER);
xoops_header(false);
include XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/theme.php';
$xoopsOption['show_rblock'] = (!empty($xoopsOption['show_rblock'])) ? $xoopsOption['show_rblock'] : 0;
// include Smarty template engine and initialize it
require_once XOOPS_ROOT_PATH.'/class/template.php';
$xoopsTpl = new XoopsTpl();
if ($xoopsConfig['debug_mode'] == 3) {
$xoopsTpl->xoops_setDebugging(true);
}
if ($xoopsUser != '') {
$xoopsTpl->assign(array('xoops_isuser' => true, 'xoops_userid' => $xoopsUser->getVar('uid'), 'xoops_uname' => $xoopsUser->getVar('uname'), 'xoops_isadmin' => $xoopsUserIsAdmin));
}
$xoopsTpl->assign('xoops_requesturi', htmlspecialchars($GLOBALS['xoopsRequestUri'], ENT_QUOTES));
include XOOPS_ROOT_PATH.'/include/old_functions.php';

if ($xoopsOption['show_cblock'] || (isset($xoopsModule) && preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname'))) {
$xoopsOption['show_rblock'] = $xoopsOption['show_cblock'] = 1;
}
themeheader($xoopsOption['show_rblock']);
if ($xoopsOption['show_cblock']) make_cblock(); //create center block
} else {
$xoopsOption['theme_use_smarty'] = 1;
// include Smarty template engine and initialize it
require_once XOOPS_ROOT_PATH.'/class/template.php';
$xoopsTpl = new XoopsTpl();
$xoopsTpl->xoops_setCaching(2);
if ($xoopsConfig['debug_mode'] == 3) {
$xoopsTpl->xoops_setDebugging(true);
}
$xoopsTpl->assign(array('xoops_theme' => $xoopsConfig['theme_set'], 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$xoopsConfig['theme_set'].'/', 'xoops_themecss'=> xoops_getcss($xoopsConfig['theme_set']), 'xoops_requesturi' => htmlspecialchars($GLOBALS['xoopsRequestUri'], ENT_QUOTES), 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
// Meta tags
$config_handler =& xoops_gethandler('config');
$criteria = new CriteriaCompo(new Criteria('conf_modid', 0));
$criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER));
$config =& $config_handler->getConfigs($criteria, true);
foreach (array_keys($config) as $i) {
// prefix each tag with 'xoops_'
$xoopsTpl->assign('xoops_'.$config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
}
//unset($config);
// show banner?
if ($xoopsConfig['banners'] == 1) {
$xoopsTpl->assign('xoops_banner', xoops_getbanner());
} else {
$xoopsTpl->assign('xoops_banner', '&nbsp;');
}
// Weird, but need extra <script> tags for 2.0.x themes
$xoopsTpl->assign('xoops_js', '//--></script><script type="text/javascript" src="'.XOOPS_URL.'/include/xoops.js"></script><script type="text/javascript"><!--');
// get all blocks and assign to smarty
$xoopsblock = new XoopsBlock();
$block_arr = array();
if ($xoopsUser != '') {
$xoopsTpl->assign(array('xoops_isuser' => true, 'xoops_userid' => $xoopsUser->getVar('uid'), 'xoops_uname' => $xoopsUser->getVar('uname'), 'xoops_isadmin' => $xoopsUserIsAdmin));
if (!empty($xoopsModule)) {
// set page title
$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name'));
if (preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname')) {
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(), $xoopsModule->getVar('mid'), true, XOOPS_BLOCK_VISIBLE);
} else {
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(), $xoopsModule->getVar('mid'), false, XOOPS_BLOCK_VISIBLE);
}
} else {
$xoopsTpl->assign('xoops_pagetitle', htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES));
if (!empty($xoopsOption['show_cblock'])) {
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(), 0, true, XOOPS_BLOCK_VISIBLE);
} else {
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(), 0, false, XOOPS_BLOCK_VISIBLE);
}
}
} else {
$xoopsTpl->assign(array('xoops_isuser' => false, 'xoops_isadmin' => false));
if (isset($xoopsModule)) {
// set page title
$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name'));
if (preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname')) {
$block_arr =& $xoopsblock->getAllByGroupModule(XOOPS_GROUP_ANONYMOUS, $xoopsModule->getVar('mid'), true, XOOPS_BLOCK_VISIBLE);
} else {
$block_arr =& $xoopsblock->getAllByGroupModule(XOOPS_GROUP_ANONYMOUS, $xoopsModule->getVar('mid'), false, XOOPS_BLOCK_VISIBLE);
}
} else {
$xoopsTpl->assign('xoops_pagetitle', htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES));
if (!empty($xoopsOption['show_cblock'])) {
$block_arr =& $xoopsblock->getAllByGroupModule(XOOPS_GROUP_ANONYMOUS, 0, true, XOOPS_BLOCK_VISIBLE);
} else {
$block_arr =& $xoopsblock->getAllByGroupModule(XOOPS_GROUP_ANONYMOUS, 0, false, XOOPS_BLOCK_VISIBLE);
}
}
}
foreach (array_keys($block_arr) as $i) {
$bcachetime = $block_arr[$i]->getVar('bcachetime');
if (empty($bcachetime)) {
$xoopsTpl->xoops_setCaching(0);
} else {
$xoopsTpl->xoops_setCaching(2);
$xoopsTpl->xoops_setCacheTime($bcachetime);
}
$btpl = $block_arr[$i]->getVar('template');
if ($btpl != '') {
if (empty($bcachetime) || !$xoopsTpl->is_cached('db:'.$btpl)) {
$xoopsLogger->addBlock($block_arr[$i]->getVar('name'));
$bresult =& $block_arr[$i]->buildBlock();
if (!$bresult) {
continue;
}
$xoopsTpl->assign_by_ref('block', $bresult);
$bcontent =& $xoopsTpl->fetch('db:'.$btpl);
$xoopsTpl->clear_assign('block');
} else {
$xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime);
$bcontent =& $xoopsTpl->fetch('db:'.$btpl);
}
} else {
$bid = $block_arr[$i]->getVar('bid');
if (empty($bcachetime) || !$xoopsTpl->is_cached('db:system_dummy.html', 'blk_'.$bid)) {
$xoopsLogger->addBlock($block_arr[$i]->getVar('name'));
$bresult =& $block_arr[$i]->buildBlock();
if (!$bresult) {
continue;
}
$xoopsTpl->assign_by_ref('dummy_content', $bresult['content']);
$bcontent =& $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid);
$xoopsTpl->clear_assign('block');
} else {
$xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime);
$bcontent =& $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid);
}
}
switch ($block_arr[$i]->getVar('side')) {
case XOOPS_SIDEBLOCK_LEFT:
$xoopsTpl->append('xoops_lblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
break;
case XOOPS_CENTERBLOCK_LEFT:
if (!isset($show_cblock)) {
$xoopsTpl->assign('xoops_showcblock', 1);
$show_cblock = 1;
}
$xoopsTpl->append('xoops_clblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
break;
case XOOPS_CENTERBLOCK_RIGHT:
if (!isset($show_cblock)) {
$xoopsTpl->assign('xoops_showcblock', 1);
$show_cblock = 1;
}
$xoopsTpl->append('xoops_crblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
break;
case XOOPS_CENTERBLOCK_CENTER:
if (!isset($show_cblock)) {
$xoopsTpl->assign('xoops_showcblock', 1);
$show_cblock = 1;
}
$xoopsTpl->append('xoops_ccblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
break;
case XOOPS_SIDEBLOCK_RIGHT:
if (!isset($show_rblock)) {
$xoopsTpl->assign('xoops_showrblock', 1);
$show_rblock = 1;
}
$xoopsTpl->append('xoops_rblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
break;
}
unset($bcontent);
}
//unset($block_arr);
if (!isset($show_rblock)) {
$xoopsTpl->assign('xoops_showrblock', 0);
}
if (!isset($show_cblock)) {
$xoopsTpl->assign('xoops_showcblock', 0);
}
if (xoops_getenv('REQUEST_METHOD') != 'POST' && !empty($xoopsModule) && !empty($xoopsConfig['module_cache'][$xoopsModule->getVar('mid')])) {
$xoopsTpl->xoops_setCaching(2);
$xoopsTpl->xoops_setCacheTime($xoopsConfig['module_cache'][$xoopsModule->getVar('mid')]);
if (!isset($xoopsOption['template_main'])) {
$xoopsCachedTemplate = 'db:system_dummy.html';
} else {
$xoopsCachedTemplate = 'db:'.$xoopsOption['template_main'];
}
// generate safe cache Id
$xoopsCachedTemplateId = 'mod_'.$xoopsModule->getVar('dirname').'|'.md5(str_replace(XOOPS_URL, '', $GLOBALS['xoopsRequestUri']));
if ($xoopsTpl->is_cached($xoopsCachedTemplate, $xoopsCachedTemplateId)) {
$xoopsLogger->addExtra($xoopsCachedTemplate, $xoopsConfig['module_cache'][$xoopsModule->getVar('mid')]);
$xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch($xoopsCachedTemplate, $xoopsCachedTemplateId));
$xoopsTpl->xoops_setCaching(0);
if (!headers_sent()) {
header ('Content-Type:text/html; charset='._CHARSET);
}
$xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html');
if ($xoopsConfig['debug_mode'] == 2 && $xoopsUserIsAdmin) {
$dummyfile = 'dummy_'.time().'.html';
$fp = fopen(XOOPS_CACHE_PATH.'/'.$dummyfile, 'w');
fwrite($fp, $xoopsLogger->dumpAll());
fclose($fp);
echo '<script language=javascript>
debug_window = openWithSelfMain("'.XOOPS_URL.'/misc.php?action=showpopups&type=debug&file='.$dummyfile.'", "popup", 680, 450);
</script>';
}
exit();
}
} else {
$xoopsTpl->xoops_setCaching(0);
}
if (!isset($xoopsOption['template_main'])) {
// new themes using Smarty does not have old functions that are required in old modules, so include them now
include XOOPS_ROOT_PATH.'/include/old_theme_functions.php';
// need this also
$xoopsTheme['thename'] = $xoopsConfig['theme_set'];
ob_start();
}
}
?>

Login

Who's Online

128 user(s) are online (73 user(s) are browsing Support Forums)


Members: 0


Guests: 128


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits