1
vina
500 Internal Server Error
  • 2019/9/26 3:07

  • vina

  • Just popping in

  • Posts: 5

  • Since: 2018/3/16


I have error (500 Internal Server Error) after transfer to new server.

My xoops site:
version: 2.5.6

version PHP site in old server was 5.6 but this new server support version 7.3 only

please help me for solve this problem



2
vina
Re: XoopsPreload
  • 2018/3/16 20:38

  • vina

  • Just popping in

  • Posts: 5

  • Since: 2018/3/16


site was in old server in /home/
but site is in new server on /home2/
then I edited mainfile.php to thic change:

<?php
/**
 * XOOPS main configuration 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     GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @version     $Id: mainfile.dist.php 5192 2010-09-06 09:00:36Z forxoops $
 */

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''/home2/tshsp/public_html');

    
// For forward compatibility
    // Physical path to the XOOPS library directory WITHOUT trailing slash
    
define('XOOPS_PATH''/home2/tshsp/mylib');
    
// Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
    
define('XOOPS_VAR_PATH''/home2/tshsp/mydata');
    
// 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://www.tshsp.com');
    
define('XOOPS_URL''http://www.tshsp.com');

    
// Shall be handled later, don't forget!
    
define("XOOPS_CHECK_PATH"0);
    
// Protect against external scripts execution if safe mode is not enabled
    
if (XOOPS_CHECK_PATH && !@ini_get("safe_mode")) {
        if (
function_exists("debug_backtrace")) {
            
$xoopsScriptPath debug_backtrace();
            if (!
count($xoopsScriptPath)) {
                 die(
"XOOPS path check: this file cannot be requested directly");
            }
            
$xoopsScriptPath $xoopsScriptPath[0]["file"];
        } else {
            
$xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] :  $_SERVER["SCRIPT_FILENAME"];
        }
        if (
DIRECTORY_SEPARATOR != "/") {
            
// IIS6 may double the  chars
            
$xoopsScriptPath str_replace(strpos($xoopsScriptPath"\\"2) ? "\\" DIRECTORY_SEPARATOR"/"$xoopsScriptPath);
        }
        if (
strcasecmp(substr($xoopsScriptPath0strlen(XOOPS_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR"/"XOOPS_ROOT_PATH))) {
             exit(
"XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
        }
    }

    
// Secure file
    
require XOOPS_VAR_PATH '/data/secure.php';

    
define('XOOPS_GROUP_ADMIN''1');
    
define('XOOPS_GROUP_USERS''2');
    
define('XOOPS_GROUP_ANONYMOUS''3');

    if (!isset(
$xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
        include 
XOOPS_ROOT_PATH."/include/common.php";
    }

}


if (!isset(
$xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
        include 
XOOPS_ROOT_PATH."/include/common.php";
    } else {
    global 
$xoops$xoopsPreload;
    
defined('DS') or define('DS'DIRECTORY_SEPARATOR);
        require_once 
XOOPS_ROOT_PATH DS 'class' DS 'xoopsload.php';
        
XoopsLoad::load('preload');
        
$xoopsPreload =& XoopsPreload::getInstance();
    }

?>


but site have this problem yet!!



3
vina
Re: XoopsPreload
  • 2018/3/16 19:48

  • vina

  • Just popping in

  • Posts: 5

  • Since: 2018/3/16


the PATH settings in mainfile.php is correct
I think this problem is relate to setting of file php.ini
do it have relate XoopsPreload to php.ini?
Fatal error: Class 'XoopsPreload' not found in /home2/tshsp/public_html/index.php on line 31



4
vina
Re: XoopsPreload
  • 2018/3/16 17:40

  • vina

  • Just popping in

  • Posts: 5

  • Since: 2018/3/16


Database is transferred to new server also
username and password user of database is same and checked file xoops_data/data/secure.php
but this error message show me in home and other page of web site tshsp.com
Fatal error: Class 'XoopsPreload' not found in /home2/tshsp/public_html/index.php on line 31



5
vina
XoopsPreload
  • 2018/3/16 15:02

  • vina

  • Just popping in

  • Posts: 5

  • Since: 2018/3/16


I transferred my web site tshsp.com to another server
site do not open in new server and give me this error message:
Fatal error: Class 'XoopsPreload' not found in /home2/tshsp/public_html/index.php on line 31

Version XOOPS: 2.5.6
PHP: 5.2

when I changed version php to upper of 5.2 , site do not open and give me error message for "can not to connection database"




TopTop



Login

Username:
Password:

Lost Password? Register now!

Who's Online

69 user(s) are online (36 user(s) are browsing Support Forums)


Members: 0


Guests: 69


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