PEAK XOOPS - protector with xoops 2.0.15 ! pre-post check gives blank page! hlp in englishin japanese

protector with xoops 2.0.15 ! pre-post check gives blank page! hlp

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/2 16:42
sofia  企霹始   Posts: 3
Hello,

Recently i have installed protector (nice one!) module (latest v.) on a fresh installation of xoops 2.0.15. I have followed carefully the istallation read me and the installation of the module was ok. After install when i inserted the required lines for pre/post check in mainfile i got a black page without any errors in the bger.!!?? Have i done something wrong?

Pls help!!

regards
sofia
Votes:12 Average:7.50
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/4 7:23
GIJOE  黎扦烦菱   Posts: 4110
- remove pre/post check in mainfile.php
- log in your site as the admin
- turn PHP debug on
- try to add pre/post check into mainfile.php again

Votes:11 Average:6.36
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/4 23:41
sofia  企霹始   Posts: 3
Hi GIJOE,

From the debuger i got:
Fatal error: Cannot redeclare class xos_kernel_xoops2 in C:\html\xoops\htdocs\include\common.php on line 40
what can i do from here?

thanks

sofia
Votes:12 Average:7.50
Previous post - Next post | Parent - Children.1 .2 | Posted on 2006/9/5 6:22
GIJOE  黎扦烦菱   Posts: 4110
Perhaps you mistook patching into mainfile.php

eg. double common (wrong)
	define("XOOPS_GROUP_ADMIN", "1");
	define("XOOPS_GROUP_USERS", "2");
	define("XOOPS_GROUP_ANONYMOUS", "3");


	include( XOOPS_ROOT_PATH . '/modules/protector/include/precheck.inc.php' ) ;

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

	include( XOOPS_ROOT_PATH . '/modules/protector/include/postcheck.inc.php' ) ;


    foreach ( array('GLOBALS', '_SESSION', 'HTTP_SESSION_VARS', '_GET', 'HTTP_GET_VARS', '_POST', 'HTTP_POST_VARS', '_COOKIE', 'HTTP_COOKIE_VARS', '_REQUEST', '_SERVER', 'HTTP_SERVER_VARS', '_ENV', 'HTTP_ENV_VARS', '_FILES', 'HTTP_POST_FILES', 'xoopsDB', 'xoopsUser', 'xoopsUserId', 'xoopsUserGroups', 'xoopsUserIsAdmin', 'xoopsConfig', 'xoopsOption', 'xoopsModule', 'xoopsModuleConfig', 'xoopsRequestUri') as $bad_global ) {
        if ( isset( $_REQUEST[$bad_global] ) ) {
            header( 'Location: '.XOOPS_URL.'/' );
            exit();
        }
    }

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

Right mainfile.php of 2.0.15 should be ...

	define("XOOPS_GROUP_ADMIN", "1");
	define("XOOPS_GROUP_USERS", "2");
	define("XOOPS_GROUP_ANONYMOUS", "3");

    foreach ( array('GLOBALS', '_SESSION', 'HTTP_SESSION_VARS', '_GET', 'HTTP_GET_VARS', '_POST', 'HTTP_POST_VARS', '_COOKIE', 'HTTP_COOKIE_VARS', '_REQUEST', '_SERVER', 'HTTP_SERVER_VARS', '_ENV', 'HTTP_ENV_VARS', '_FILES', 'HTTP_POST_FILES', 'xoopsDB', 'xoopsUser', 'xoopsUserId', 'xoopsUserGroups', 'xoopsUserIsAdmin', 'xoopsConfig', 'xoopsOption', 'xoopsModule', 'xoopsModuleConfig', 'xoopsRequestUri') as $bad_global ) {
        if ( isset( $_REQUEST[$bad_global] ) ) {
            header( 'Location: '.XOOPS_URL.'/' );
            exit();
        }
    }

	include( XOOPS_ROOT_PATH . '/modules/protector/include/precheck.inc.php' ) ;

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

	include( XOOPS_ROOT_PATH . '/modules/protector/include/postcheck.inc.php' ) ;

Votes:9 Average:7.78
Previous post - Next post | Parent - No child | Posted on 2006/9/6 18:46
sofia  企霹始   Posts: 3
Hi GIJOE,

Its working ok!!!!

Thanks for your help ...and sorry for my ignorance!

sofia
Votes:13 Average:6.92
Previous post - Next post | Parent - No child | Posted on 2006/9/20 3:36
gibaphp  惧霹始 From: Brasil - S  Posts: 22
Ok, my mainfile.php is correct, but

ps: Php debug is enabled


Quote:
foreach ( array('GLOBALS', '_SESSION', 'HTTP_SESSION_VARS', '_GET', 'HTTP_GET_VARS', '_POST', 'HTTP_POST_VARS', '_COOKIE', 'HTTP_COOKIE_VARS', '_REQUEST', '_SERVER', 'HTTP_SERVER_VARS', '_ENV', 'HTTP_ENV_VARS', '_FILES', 'HTTP_POST_FILES', 'xoopsDB', 'xoopsUser', 'xoopsUserId', 'xoopsUserGroups', 'xoopsUserIsAdmin', 'xoopsConfig', 'xoopsOption', 'xoopsModule', 'xoopsModuleConfig', 'xoopsRequestUri') as $bad_global ) {
if ( isset( $_REQUEST[$bad_global] ) ) {
header( 'Location: '.XOOPS_URL.'/' );
exit();
}
}

include( XOOPS_ROOT_PATH . '/modules/protector/include/precheck.inc.php' ) ;

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

include( XOOPS_ROOT_PATH . '/modules/protector/include/postcheck.inc.php' ) ;



But for eliminat notice in php5 ??

Quote:
Notice: Undefined variable: xoopsDB in file /modules/protector/include/postcheck.inc.php line 17
Notice: Trying to get property of non-object in file /modules/protector/include/postcheck.inc.php line 17
Notice: Undefined variable: elt in file /class/xoopsform/form.php line 457

Notice not welcome for php5.

Exist one form for elimite this notice ?

Thanks
Votes:14 Average:6.43

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!