1
madDan
Confused by protector setup
  • 2010/1/8 11:07

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


Hi

I have recently taken over administering our XOOPS based site it was previously on 2.0.18 (I think) I did a fresh install of 2.4.2 and got more or less the old modules used updated where possible and working.

I then this week carried out the update to 2.4.3


The site is working but I have a few conflicts with the advice on here.


Where I am getting confused is by the use of Protector.

Currently our mainfile .php has to have

Quote:
include XOOPS_TRUST_PATH.'/modules/protector/include/precheck.inc.php' ;
include XOOPS_TRUST_PATH.'/modules/protector/include/postcheck.inc.php' ;


in the mainfile for the site to function

currently our site is along these lines

Trusted directory
   ¦
   ¦
modules
(protector in here)--¦
                     ¦
                     ¦
www directory--¦
                                       ¦
                                       ¦
                                       ¦
-----xoops 
                                       ¦     httdocs
                                       ¦     directory 
-------- modules
                                       ¦                  
(all including protector)
                                       
¦
                                       ¦
                                       ¦
                                       ¦
                                       ¦
-----a.n.other folder¦---xoops data
                                                             ¦
                                                             ¦
---xoops lib



Is this correct?

or should it be along the lines of


Trusted directory
   ¦
   ¦
modules 
(all including
 protector in here
)--¦
                     ¦
                     ¦
www directory--¦
                                       ¦
                                       ¦
                                       ¦
-----xoops 
                                       ¦     httdocs
                                       ¦     directory 
-------- modules
                                       ¦                  
(protector on its own)
                                       
¦
                                       ¦
                                       ¦
                                       ¦
                                       ¦
-----a.n.other folder¦---xoops data
                                                             ¦
                                                             ¦
---xoops lib



I am confused why I have to have the pre and post checks in the main file.


Like I say the site works my various paths are set in mainfile.php protector detects various things

I do have other issues but one step at a time and considering this is the first time I have tried anything like this, it has been a bit of a leap of faith but aided by the excellent information on here.



System Overview

XOOPS Version XOOPS 2.4.3
PHP Version 5.2.11
mySQL Version 5.1.39-community
Server API isapi
OS WINNT
safe_mode Off
register_globals On
magic_quotes_gpc Off
allow_url_fopen On
fsockopen On
post_max_size 60M
max_input_time 600
output_buffering 1
max_execution_time 30
memory_limit 256M
file_uploads On
upload_max_filesize 60M

2
Mamba
Re: Confused by protector setup
  • 2010/1/8 12:00

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


In 2.4.3 please remove the "precheck" and "postcheck" from the mainfile.php, and they are not needed anymore (thanks to using Preloads). This is described in Point 7 of "
Upgrading from XOOPS 2.0.* above 2.0.14 and 2.2.* (using the full package)" of Release notes

For the diagram of where the /xoops_data and /xoops_lib, please take a look at the Installation Guide

BTW - you better upgrade your PHP version to PHP 5




3
madDan
Re: Confused by protector setup
  • 2010/1/8 12:15

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


Hi if I remove those lines the site does not run!

Like I stated, I did a complete fresh build of 2.4.2 ie backed up my old site (just incase) then I did a clean build into an empty folder, then set about rebuilding the site from the base core.

Re the PHP I am on


System Overview

XOOPS Version XOOPS 2.4.3
PHP Version 5.2.11
mySQL Version 5.1.39-community

does it need to be 5.0 only?


I'll check the layout when at home sourceforge is blocked at work :) but the libraries and data appear to work, or are they not allowed to be in another directory?

4
Mamba
Re: Confused by protector setup
  • 2010/1/8 12:34

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Sorry, my mistake about the PHP version - you're fine with what you have, I thought I saw that you have still PHP4.

Quote:
Hi if I remove those lines the site does not run!

Something is wrong with your configuration, or with the directories for Protector.

Try to disable Protector and then see if the Website works.

Again, in 2.4.3 there should be no need the Precheck/Postcheck in the mainfile.php

5
madDan
Re: Confused by protector setup
  • 2010/1/8 12:55

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


Thanks for the tips, is it possible that when I deleted the original site that the server still actually had files on the drive, as I had to recreate the same XOOPS folder name as people linked posts within the forums, so that when I moved over the new build there could have been stuuf there albeit invisible to me via ftp?

I may try to rebuild the whole site again on xampp at home from 2.4.3 fresh install - to see what differences there are.

I have deactivated protector and removed the lines from mainfile and the site works, it also worked before removing the lines with protector deactivated.


The version that protector reports is 3.41 I selected the install from the build on XOOPS 2.4.2 as far as I am aware we never had protector previously.

6
madDan
Re: Confused by protector setup
  • 2010/1/8 13:01

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


interesting I reactivated it and now it works without the lines, it does give the warning within the module about the precheck lines missing from the mainfile, but at least the site doesn't fail to load.

I have to sort the database factory patch also.


7
ghia
Re: Confused by protector setup
  • 2010/1/8 13:14

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


The xoops_data and xoops_lib folders are to be moved to your secure directory. The path definitions in mainfile have to be adapted to that situtation.

8
madDan
Re: Confused by protector setup
  • 2010/1/8 13:15

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


A side effect is now that the protector module config options page gives a blank page on setting any options with the go button.

One step foreward.....

9
madDan
Re: Confused by protector setup
  • 2010/1/8 13:30

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


@ghia

the library and data folders do match the settings in the mainfile

10
trabis
Re: Confused by protector setup
  • 2010/1/8 13:57

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

madDan wrote:
interesting I reactivated it and now it works without the lines, it does give the warning within the module about the precheck lines missing from the mainfile, but at least the site doesn't fail to load.

I have to sort the database factory patch also.



That means that preloads are not being loaded. Make sure you are using protector module that comes with core package in both modules and xoops_lib/modules folder.

Login

Who's Online

213 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 213


more...

Donat-O-Meter

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

Latest GitHub Commits