I was using the old 1.x.x.x distro on my first live server and this started causing the host problems so they booted me onto a scripting server. Here i had the site working ok and upgraded to 2.3.x. and again all worked fine. Then they moved me back to a live server (different server) and i get this error message.
I really need so help with this one.
It could be caused by a php version problem i can look into this.
Below is what my index file looks like. (line 25 is 'include "mainfile.php";')
/**
* XOOPS global index file
*
* 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.
*
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package core
* @since 2.0.0
* @author Kazumi Ono
* @author Skalpa Keo
* @author Taiwen Jiang
* @version $Id: index.php 2712 2009-01-22 10:06:01Z phppp $
*/
/**
* redirects to installation, if XOOPS is not installed yet
**/
include "mainfile.php";
//check if start page is defined
if ( isset($xoopsConfig['startpage']) && $xoopsConfig['startpage'] != "" && $xoopsConfig['startpage'] != "--" ) {
// Temporary solution for start page redirection
define("XOOPS_STARTPAGE_REDIRECTED", 1);
global $xoopsModuleConfig;
$module_handler =& xoops_gethandler('module');
$xoopsModule =& $module_handler->getByDirname($xoopsConfig['startpage']);
if (!$xoopsModule || !$xoopsModule->getVar('isactive')) {
include_once XOOPS_ROOT_PATH . "/header.php";
echo ""
. _MODULENOEXIST . "";
include_once XOOPS_ROOT_PATH . "/footer.php";
exit();
}
$moduleperm_handler =& xoops_gethandler('groupperm');
if ($xoopsUser) {
if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), $xoopsUser->getGroups())) {
redirect_header(XOOPS_URL, 1, _NOPERM, false);
exit();
}
$xoopsUserIsAdmin = $xoopsUser->isAdmin($xoopsModule->getVar('mid'));
} else {
if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), XOOPS_GROUP_ANONYMOUS)) {
redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
exit();
}
}
if ($xoopsModule->getVar('hasconfig') == 1 || $xoopsModule->getVar('hascomments') == 1 || $xoopsModule->getVar( 'hasnotification' ) == 1) {
$xoopsModuleConfig = $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid'));
}
chdir( 'modules/' . $xoopsConfig['startpage'] . '/' );
xoops_loadLanguage('main', $xoopsModule->getVar('dirname', 'n'));
$parsed = parse_url(XOOPS_URL);
$url = isset($parsed['scheme']) ? $parsed['scheme'].'://' : 'http://';
if ( isset( $parsed['host'] ) ) {
$url .= $parsed['host'];
if ( isset( $parsed['port'] ) ) {
$url .= ':' . $parsed['port'];
}
} else {
$url .= $_SERVER['HTTP_HOST'];
}
$_SERVER['REQUEST_URI'] = substr(XOOPS_URL, strlen($url)) . '/modules/' . $xoopsConfig['startpage'] . '/index.php';
include XOOPS_ROOT_PATH . '/modules/' . $xoopsConfig['startpage'] . '/index.php';
exit();
} else {
$xoopsOption['show_cblock'] =1;
$xoopsOption['template_main'] = "db:system_homepage.html";
include "header.php";
include "footer.php";
}
?>
and the mainfile.php looks a bit like this (edited on paths for security).
// XOOPS Physical Paths
// Physical path to the XOOPS documents (served) directory WITHOUT trailing slash
define( 'XOOPS_ROOT_PATH', '/physicalpathtomysite/colournation.com/user/htdocs' );
// For forward compatibility
// Physical path to the XOOPS library directory WITHOUT trailing slash
define( 'XOOPS_PATH', '/physicalpathtomysite/colournation.com/user/htdocs/xoops_lib' );
// Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
define( 'XOOPS_VAR_PATH', '/physicalpathtomysite/colournation.com/user/htdocs/xoops_data' );
// Alias of XOOPS_PATH, for compatibility, temporary solution
define("XOOPS_TRUST_PATH", XOOPS_PATH);
// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define( 'XOOPS_URL', 'http://www.colournation.com' );
define( 'XOOPS_URL', 'http://www.colournation.com' );
and can you confirm that this is the look for mailnfile.php for the latest version 2.3.x of xoops?
Last time to swap servers all i had to do was to change the physical path and it all worked again.
Andrew