1
The file in your xoops_lib has a minor error in it. Due to the way preloads work there is no need for a database checking function to be there as if you are loading common file differently for example with
webcams 1.15 with
session cookies, the preload will
float at maximum size of memory and cause a
CRITICAL error.
xoops_lib/modules/protector/include/precheck.inc.php should read as follows:
if (!defined('PROTECTOR_PRECHECK_INCLUDED')) {
require_once dirname(__FILE__).'/precheck_functions.php' ;
define( 'PROTECTOR_PRECHECK_INCLUDED' , 1 ) ;
define( 'PROTECTOR_VERSION' , file_get_contents( dirname(__FILE__).'/version.txt' ) ) ;
// set $_SERVER['REQUEST_URI'] for IIS
if ( empty( $_SERVER[ 'REQUEST_URI' ] ) ) { // Not defined by IIS
// Under some configs, IIS makes SCRIPT_NAME point to php.exe :-(
if ( !( $_SERVER[ 'REQUEST_URI' ] = @$_SERVER['PHP_SELF'] ) ) {
$_SERVER[ 'REQUEST_URI' ] = $_SERVER['SCRIPT_NAME'];
}
if ( isset( $_SERVER[ 'QUERY_STRING' ] ) ) {
$_SERVER[ 'REQUEST_URI' ] .= '?' . $_SERVER[ 'QUERY_STRING' ];
}
}
protector_prepare() ;
}
xoops_lib/modules/protector/include/postcheck.inc.php should read as follows:
if (!defined('PROTECTOR_POSTCHECK_INCLUDED')) {
require_once dirname(__FILE__).'/postcheck_functions.php' ;
if( ! defined( 'PROTECTOR_PRECHECK_INCLUDED' ) ) {
require dirname(__FILE__).'/precheck.inc.php' ;
return ;
}
define( 'PROTECTOR_POSTCHECK_INCLUDED' , 1 ) ;
if( ! class_exists( 'Database' ) ) return ;
protector_postcommon() ;
}