Page 1 of 1
Permission Denied
Posted: Fri Jan 28, 2011 10:24 pm
by affordable
Removed user in admin by accident, now getting Permission Denied , You do not have permission to access this page, please refer to your system administrator.
Any help would be great
Re: Permission Denied
Posted: Fri Jan 28, 2011 10:29 pm
by JAY6390
Open
/admin/controller/common/home.php
Find
and after it on a new line temporarily put
and save the file
Then go into the admin, set up the users and permissions as you want them
and then edit the file again removing the temporary line of code
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:06 pm
by affordable
Thanks, but that's not working... did as you instructed, but cannot login getting a 500 error
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:08 pm
by JAY6390
umm OK that's not good. A 500 error is actually a server error not a php one, so it might be worth asking your host why that's happening
Also, when you deleted your user, was that the only user? Or did you have others you can log in with?
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:19 pm
by affordable
there was only admin in user panel no other users.
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:20 pm
by JAY6390
OK and you deleted that user so you effectively have no users correct?
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:21 pm
by affordable
correct
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:22 pm
by JAY6390
OK do you have phpMyAdmin access? and are you feeling confident about using it?
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:24 pm
by affordable
i was afraid you were going to ask that.... NO AND NO.
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:30 pm
by JAY6390
ok, in that case we'll use another method
Open
/admin/index.php
Find these lines:
Code: Select all
// Database
$db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
$registry->set('db', $db);
After those put
Code: Select all
$db->query("INSERT INTO `".DB_PREFIX."user` (`user_group_id`, `username`, `password`, `status`) VALUES ('1', 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', '1')");
die('OK');
and save
then go to your admin area and you should see just "OK"
Once you see that, remove the two lines and save again
You now have a user called "admin" with the password "password"
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:36 pm
by affordable
All i am getting is..... OK
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:40 pm
by JAY6390
That is all you should get...now delete those two lines and save again
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:41 pm
by affordable
sorry did it all, still getting permission denied
Re: Permission Denied
Posted: Fri Jan 28, 2011 11:55 pm
by JAY6390
Do you want to PM me your site details (ftp) and I'll take a quick look for you
Re: Permission Denied
Posted: Sat Jan 29, 2011 12:03 am
by affordable
thanks,
Sent pm
Re: Permission Denied
Posted: Sat Jan 29, 2011 12:23 am
by JAY6390
fixed...be sure to log out and then back in to your admin (and change your password of course)
Re: Permission Denied
Posted: Wed May 22, 2013 9:20 pm
by ivantankosic
I have same problem
I unselect all in top administrator and save
now i can`t work more
permision denide
permision denide
all site permision denide
I can`t change enyting