1
barryc
Can't access admin after upgrading
  • 2009/11/29 1:37

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Hi,

I've tried twice to upgrade my test 2.3.3 site to 2.4.1. After the first attempt failed, I restored the 2.3.3 files and tried again. I found that I had to change the permissions on file include/license.php from 644 to 777, even though I am upgrading from a 2.3.3 system. After that, the upgrade seemed to go OK and I can access the home page. However, I cannot access the admin pages. When I access mysite/admin.php I get the following errors (I turned on error reporting for the site before the second attempt):

Quote:
Fatal error: Class 'ProtectorRegistry' not found in /home1/barrycne/public_html/aka/modules/protector/mytrustdirname.php on line 8

None All Errors (3) Queries (16) Blocks (0) Extra (2) Timers(5)

Errors Notice: Constant _DB_POSLINE_DESC already defined in file /modules/backup/language/english/modinfo.php line 24 Warning: include_once(/home1/barrycne/xoops_lib23/modules/protector/class/registry.php) [function.include-once]: failed to open stream: No such file or directory in file /modules/protector/mytrustdirname.php line 7

Warning: include_once() [function.include]: Failed opening '/home1/barrycne/xoops_lib23/modules/protector/class/registry.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in file /modules/protector/mytrustdirname.php line 7


Can anyone suggest what the problem might be?

barryC

2
Mamba
Re: Can't access admin after upgrading
  • 2009/11/29 2:16

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


I think, you have two "Trust Path" directories with Protector in them. Try to find the duplicate and delete it.

3
ghia
Re: Can't access admin after upgrading
  • 2009/11/29 4:40

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Or you have to comment the pre and post check for protector in the mainfile.php, while this is now done with preloads.

4
barryc
Re: Can't access admin after upgrading
  • 2009/11/29 4:51

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


OK, I was careful not to end up with two xoops_lib dirs. I did not have two trust path dirs, or at least not two copies of xoops_lib, but the Protector module was already installed in my 2.3.3 version in the regular modules dir. The upgrade to 2.4.1 has a dir for protector in xoops_lib/modules. I assume that is where it is meant to be installed in 2.4.1? I saw that but did not realize that it constituted a duplicate copy.

I changed the name of the protector dir in the regular modules dir to test this and now I can see the admin pages. However, this obviously isn't right because I see the message module file protector not found. I suspect that the /modules/protector dir should only contain the files in the upgrade package and that the rest of the protector module files reside in /xoops_lib/modules/protector. Is that right? If not, please advise me.

I think this is really confusing. Surely the upgrade readme should say something about how to deal with the Protector module if it is already installed in the modules dir, other than removing those precheck/postcheck lines, that is?

Right now I have all the original protector files in the "old" modules/protector dir, with the new files in the upgrade having overwritten the corresponding old file, or having been added. What should I do now?

The other thing that is worth mentioning is that the readme states that include/license.php should be set to 777 if upgrading from 2.4.0. That implies that you don't have to change the perms if upgrading from 2.3.x. In my case, after copying the files, license.php was set to 644. Should it be left that way or set to 777?

barryC

5
Mamba
Re: Can't access admin after upgrading
  • 2009/11/29 5:33

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
I think this is really confusing. Surely the upgrade readme should say something about how to deal with the Protector module if it is already installed in the modules dir, other than removing those precheck/postcheck lines, that is?

That's what is being said in the instructions:

Quote:
2. Overwrite files in XOOPS directory on your server with the content of /htdocs
* make sure that you copy the content of /xoops_lib to whatever directory you keep it on the server now (e.g. if you moved it outside of the Document Root), then delete the /xoops_lib directory. There can NOT be two directories with the content of /xoops_lib

What version of Protector did you have on your 2.3.3 installation? I assume, you had a "XOOPS_TRUST_PATH" for the protector, correct? That's where the content of "xoops_lib" from 2.4.1 should go.


6
barryc
Re: Can't access admin after upgrading
  • 2009/11/29 6:00

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Mamba,

I think we are talking at cross purposes. I understood the comments in the readme about not duplicating the xoops_lib dir and copying the files in the upgrade package from xoops-lib into the corresponding dir on the server, which in my case is outside the server root, as recommended, as well as having a modified name.

The problem is that one is told to upload the files in the upgrade package to the server, overwriting the corresponding files that are already there. My 2.3.3 XOOPS installation was running Protector 3.2.2. The files for that were in the /modules/protector dir.

In the upgrade package there are a small number of files in the htdocs/modules/protector dir. Those got copied to the /modules dir on my server. This left quite a few other files already in that dir intact. There is a folder xoops_lib/modules/protector in the upgrade package. That got copied to my trust path dir (i.e. my name modified xoops-lib dir, above the server root).

These are the dirs and files that are in /modules/protector now. Note there is a folder preload (which I think is from the 2.3.3 version and another called preloads, from 2.4.1. I suspect that one should replace the modules/protector folder with the one in htdocs/modules/protector, deleting the other files. A number of these are duplicated in xoops_lib/modules/protector.

/modules/protector/admin/
/modules/protector/blocks/
/modules/protector/images/
/aka/modules/protector/index.css
/modules/protector/index.php
/modules/protector/module_icon.php
/modules/protector/mytrustdirname.php
/modules/protector/notification_update.php
/modules/protector/notification.php
/modules/protector/oninstall.php
/modules/protector/onuninstall.php
/modules/protector/onupdate.php
/modules/protector/preload
modules/protector/preloads
/modules/protector/search.php
/modules/protector/xoops_version.php

In other words, I am not clear what files the /modules/protector dir should contain and what should be in xoops_lib/modules/protector. Hopefully you can straighten me out on that.

The point I was trying to make about the readme was meant to cover this situation.

Sorry for the long post but I hope it explains my dilemma.

barryC

7
Mamba
Re: Can't access admin after upgrading
  • 2009/11/29 6:17

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
In the upgrade package there are a small number of files in the htdocs/modules/protector dir. Those got copied to the /modules dir on my server. This left quite a few other files already in that dir intact. There is a folder xoops_lib/modules/protector in the upgrade package. That got copied to my trust path dir (i.e. my name modified xoops-lib dir, above the server root).

Correct!

Quote:
In other words, I am not clear what files the /modules/protector dir should contain and what should be in xoops_lib/modules/protector. Hopefully you can straighten me out on that.


In your case delete all the files from the /modules/protector directory on your server, and copy again the files from /modules/protector on 2.4.1.

From what you said, you don't have to do anything with your /xoops_lib directory

Let me know, if it worked....

8
barryc
Re: Can't access admin after upgrading
  • 2009/11/29 7:26

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Well, I found the readme in xoops_lib/modules/protector and that makes it clear that you need all the files in both the /modules/protector and xoops_lib/modules/protector dirs. So, I uploaded the complete /modules/protector files and once again got the original error. I looked again at my mainfile.php and found that the last several lines are like this:

define'XOOPS_GROUP_ADMIN''1' );
     
define'XOOPS_GROUP_USERS''2' );
     
define'XOOPS_GROUP_ANONYMOUS''3' );

      
// Temporary solution for extra protector module. To be refactored     // Set the following value as true if you want to enable protector module
     
$ENABLE_PROTECTOR true;

     if ( !empty(
$ENABLE_PROTECTOR) ) {
         @include 
XOOPS_TRUST_PATH '/modules/protector/include/precheck.inc.php';
     }

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

    if ( !empty(
$ENABLE_PROTECTOR) ) {
         @include 
XOOPS_TRUST_PATH '/modules/protector/include/postcheck.inc.php';
     } } 
?>


I was under the impression that the precheck and postcheck has been removed for Protector under 2.3.3 but I am probably wrong about that. I tried deleting these lines, leaving

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


intact. However, I still get the error.

I could give you ftp access to this installation if that would help and I can give you temporary admin access to this test site. I keep it for just these kind of issues, so that I don't screw up my live site before I work out problems.

I'll have to get back to this tomorrow. Got to get up early.

barryC

9
Mamba
Re: Can't access admin after upgrading
  • 2009/11/29 8:14

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Sure, send me FTP and site login/password, and I'll take a look.
Before you do it, clear also your cache, update System module, and try it again.

10
barryc
Re: Can't access admin after upgrading
  • 2009/11/29 17:23

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Mamba,

To access the admin pages at all I had to "break" protector by renaming its dir. I then updated the system module and cleared the smarty_compile cache. I decided I would uninstall protector then install it again after having done the update. I can't reinstall it because it does not appear in the list of uninstalled modules. I see that same Fatal error message. Error reporting is turned on on the site.

I sent you a PM with info to log on by FTP and to the site as admin.

I'll be going out for most of today but will check in this evening when I get home. If necessary, I can restore the 2.3.3 site, although that may now be difficult after having done the system update as I assume that changes the db.

I look forward to your comments.

barryC

Login

Who's Online

323 user(s) are online (185 user(s) are browsing Support Forums)


Members: 0


Guests: 323


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