1
wishcraft
precheck.inc.php & postcheck.inc.php - Protector Preloads

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' ) ;
    
define'PROTECTOR_VERSION' file_get_contentsdirname(__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' ) ;
    if( ! 
class_exists'Database' ) ) return ;
    
protector_postcommon() ;
}
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

Login

Who's Online

388 user(s) are online (294 user(s) are browsing Support Forums)


Members: 0


Guests: 388


more...

Donat-O-Meter

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

Latest GitHub Commits