1
Anonymous
Protector 2.57
  • 2006/12/1 13:03

  • Anonymous

  • Posts: 0

  • Since:


Hi,

I've downloaded and installed the latest version of the Protector module and read the FAQ. My problem is that I can't get the code in the README file to "take" when I past it into mainfile.php

I'm a complete newb at this but can follow instruction. Trouble is I think that the instructions in the README are flawed.

The README file says:

Quote:

README says:

After XOOPS Protector is installed, edit your mainfile.php like this:
define('XOOPS_GROUP_ADMIN''1');
    
define('XOOPS_GROUP_USERS''2');
    
define('XOOPS_GROUP_ANONYMOUS''3');

    [
color=ff0000]include( XOOPS_ROOT_PATH '/modules/protector/include/precheck.inc.php' ) ;[/color]
    if (!isset(
$xoopsOption['nocommon']) [color=0000ff]&& XOOPS_ROOT_PATH != ''[/color] ) {
        include 
XOOPS_ROOT_PATH."/include/common.php";
    }
    [
color=ff0000]include( XOOPS_ROOT_PATH '/modules/protector/include/postcheck.inc.php' ) ;[/color]

If the blue colored part is different from your mainfile.php, don't mind it.


I've selected that part of the code which starts:

define('XOOPS_GROUP_ADMIN', '1');

and ends:

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

and copied it to mainfile.php overwriting the original three "define groups" lines. I deleted the square brackets and the stuff inside 'em (even I know know that!).

Remembering to set the rescue password first.....I uploaded the amended mainfile.php (having set the CHMOD to 777 first!) and then visited my site.

I got the white screen and was asked for the rescue password. This didn't work, so I restored the original mainfile.php (backups are great, aren't they?!) and got back in. When I checked the rescue password in the Protector module it looks like my original 9-letter/4 number password had been overwritten by something at least twice as long.

What am I doing wrong? Is that code pasted into mainfile.php (without the square brackets) correct and in the right place? What's with the rescue password business?

All help gratefully received.

Many thanks

2
Anonymous
Re: Protector 2.57
  • 2006/12/1 13:07

  • Anonymous

  • Posts: 0

  • Since:


Ah......seeing the code like it appears above has given me a clue.......

Sorry guys, no need to reply, but please don't delete this thread for a couple of days

3
Dave_L
Re: Protector 2.57
  • 2006/12/1 14:36

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Basically, all you need to do is insert the two "red" lines at the appropriate places in mainfile.php. Don't make any other changes.

If you're not experienced at editing .php files, make a backup copy of mainfile.php first.

4
Anonymous
Re: Protector 2.57
  • 2006/12/1 14:46

  • Anonymous

  • Posts: 0

  • Since:


Quote:

Dave_L wrote:
Basically, all you need to do is insert the two "red" lines at the appropriate places in mainfile.php. Don't make any other changes.


That is the conclusion that I came to.

The README file in the docs misled me a bit - I'd read it as meaning that all the code after the "XOOPS_GROUPS" bits needed installing.

Why couldn't it have put it as simply as you just did, and without all that [square brackets] malarky?

Hopefully, my hair will grow back soon

Quote:

Dave_L wrote:
If you're not experienced at editing .php files, make a backup copy of mainfile.php first.


That much I knew to do, hence my being able to get back into my site.

5
Lance_
Re: Protector 2.57
  • 2006/12/1 15:14

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


The mainfile.php has had changes made to it since the latest releases of 2.0, the readme was made back near 2.0.7, so the changes have been been reflected in it.

Hence the hint to not bother with the different blue parts and only copy in the red text.

Cheers.

PS. This will be useful for documentation as usually, when a question like this arises, we'll have 3 or 4 other users ask the same question within 3 days.
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

6
MadFish
Re: Protector 2.57
  • 2006/12/1 15:31

  • MadFish

  • Friend of XOOPS

  • Posts: 1056

  • Since: 2003/9/27


I've just about finished some documentation of the Protector module. You can download the draft here.

There are a few things I'm not sure of (highlighted in yellow). If anyone can fill in the gaps please email me so I can finish it and get it up on the docs site.

7
Anonymous
Re: Protector 2.57
  • 2006/12/1 17:39

  • Anonymous

  • Posts: 0

  • Since:


Thank you MadFish - mainfile.php now as it should be

As for the "register globals off" thingy, how important is it and is it really as simple to sort as editing/uploading the .htaccess file that came with the module? If so, what should the CHMOD setting be - 444?

Sorry for so many questions

Login

Who's Online

229 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

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

Latest GitHub Commits