to previous topic Print topic to next topic

 Root :: Developments :: Others :: pncUserHack and Access Denied Message
 Moderated by:
 
  Bottom  pncUserHack and Access Denied Message
sndinc Posted: 17.06.2005, 20:58
Noob
Noob


registered: Sep 09, 2004
Posts: 8

Status:  offline
last visit: 17.06.05
I'm using PN .750 and pncUserHack 1.6 successfully on one site. I tried setting it up on a new site and I'm having a problem. I unzipped everything except the pntables file. I added the pntables content to the file. I went to the link to do "New Installation" and hit go. It seems like the page just refreshes (not sure if I'm supposed to get a message it's succesful). I delete the install.php in NS-User. Everything looks good but when I am in the PN Admin area, I click on User Admin and get "Access Denied". I can't do anything.

My admin account is not admin (but I don't think that was an issue) and before the update I had registration turn off (awaiting the install of pncuserhack). I'm sure I'm doing something stupid but I can't think of what. Any help would be appreciated. Thanks.
Top  sndinc send PM
 
Chestnut Posted: 17.06.2005, 21:46
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
As far as I can remember, you cannot install pncUserHack without admin rights...

Or at least, some access via admin.php


Chestnut ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
sndinc Posted: 17.06.2005, 22:12
Noob
Noob


registered: Sep 09, 2004
Posts: 8

Status:  offline
last visit: 17.06.05
Sorry...poor wording on my part. The user account when I did the postnuke install was not called "admin" or "administrator" (or whatever the default admin account is called). So I have one user named "sndinc" and that user should have adminstrator rights.

That was just one of the things I did differently between my working website and none working one.

I can get to the adminstation panel and access everything I tried, just not the User Configuration section.
Top  sndinc send PM
 
Chestnut Posted: 17.06.2005, 22:27
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
Sorry myself as my last post was made really fast as I had a little urgency.

Following what you say, apparently, I don't think the installation went well... you should have had a message showing something like "Table created, etc..."

If not, check if the users_modrequest table is there. If not, there there is many reason for not being able to access some things later.

Also... install file is very old and might not work on a current php version with register_globals off...

In the install.php file, before this line :

Code
  1. switch ($go){
  2.  


put this :

Code
  1. $go = pnVarCleanFromInput('go');
  2.  


and run the install again... it should be ok !

Chestnut ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
sndinc Posted: 17.06.2005, 22:50
Noob
Noob


registered: Sep 09, 2004
Posts: 8

Status:  offline
last visit: 17.06.05
Alright...I added the code and did the install process again...
This time I got the the message about the tables being created. I checked and user_modrequest does exist now.

Bad news...I still get access denied if I go to user configuration (i tried the link when I got the message about the tables being created and I tried from the admin menu).
Top  sndinc send PM
 
Chestnut Posted: 17.06.2005, 23:43
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
in modules/(NS-)User/admin.php

change first lines of code

from
Code
  1. if (!eregi("admin.php", $PHP_SELF)) {
  2.     die ("Access Denied");
  3. }
  4.  


to
Code
  1. //if (!eregi("admin.php", $PHP_SELF)) {
  2. //    die ("Access Denied");
  3. //}
  4.  


I remembered too late that MACscr did some work on those files... The file you are using are to be considered unsecure and unrecommended...

Mac might have new files... Otherwise, this hack is dead.
Files are too old and you'll face many of these annoying problems.

Chestnut ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
sndinc Posted: 18.06.2005, 00:13
Noob
Noob


registered: Sep 09, 2004
Posts: 8

Status:  offline
last visit: 17.06.05
This seemed to get me into the user configuration. I checked my other .750 site and it's not commented out there. I'm not sure what the difference in the sites would be. Anyway, I'll see if I come across any other snags. Thanks for the help with this unsupported hack. I must say it's one of my favorite addons to the website.
Top  sndinc send PM
 



Powered by pnForum Version 2.0.1
DarkMindZ