I'm 'redoing' a site after an attempted hack.
XOOPS 2.0.16 all installed okay, used admin a few times, and as I had already uploaded the protector files in their appropriate paths, went to modules in admin and it gave me some msg about XOOPS_TRUST_PATH not being defined or something.
Anyway, read up the docs on all this and am positive I have all the files uploaded correctly for Protector v3. Then I modified mainfile.php as follows:
define('XOOPS_TRUST_PATH','/home/username/trustpathname');
include XOOPS_TRUST_PATH.'/modules/protector/include/precheck.inc.php' ;
if (!isset($xoopsOption['nocommon']) && XOOPS_ROOT_PATH != '') {
include XOOPS_ROOT_PATH."/include/common.php";
}
include XOOPS_TRUST_PATH.'/modules/protector/include/postcheck.inc.php' ;
Uploaded mainfile.php, and now I can't login to XOOPS, msg ..
Quote:
DB connection failed, or wrong XOOPS_DB_PREFIX in mainfile.php, or broken config table, or broken Protector installation
which I see is coming from the file XOOPS_TRUST_PATH.'/modules/protector/class/protector.php'
// Preferences (for performance, I dare to use an irregular method)
$result = @mysql_query( "SELECT conf_name,conf_value FROM ".XOOPS_DB_PREFIX."_config WHERE conf_title like '".$constpref."%'" , $conn ) ;
if( ! $result || mysql_num_rows( $result ) < 5 ) {
die( 'DB connection failed, or wrong XOOPS_DB_PREFIX in mainfile.php, or broken config table, or broken Protector installation.' ) ;
}
I see from the install instructions from
here , it mentions a 'config' path or file ??
Quote:
Turn permission of XOOPS_TRUST_PATH/modules/protector/configs writable
There is definitely no 'config' path or file in the Protector v3 archive.
No doubt this is a catch-22, the module Protector installation must create the ../config path or file , and also add the row into the 'config' table.
But I can't install the Protector module, as i can't login. :(