Post by affordable » Fri Jan 28, 2011 10:24 pm

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

New member

Posts

Joined
Thu Dec 16, 2010 4:53 pm
Location - Ireland

Post by JAY6390 » Fri Jan 28, 2011 10:29 pm

Open
/admin/controller/common/home.php
Find

Code: Select all

    public function permission() { 
and after it on a new line temporarily put

Code: Select all

    return true; 
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

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by affordable » Fri Jan 28, 2011 11:06 pm

Thanks, but that's not working... did as you instructed, but cannot login getting a 500 error

New member

Posts

Joined
Thu Dec 16, 2010 4:53 pm
Location - Ireland

Post by JAY6390 » Fri Jan 28, 2011 11:08 pm

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?

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by affordable » Fri Jan 28, 2011 11:19 pm

there was only admin in user panel no other users.

New member

Posts

Joined
Thu Dec 16, 2010 4:53 pm
Location - Ireland

Post by JAY6390 » Fri Jan 28, 2011 11:20 pm

OK and you deleted that user so you effectively have no users correct?

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by affordable » Fri Jan 28, 2011 11:21 pm

correct

New member

Posts

Joined
Thu Dec 16, 2010 4:53 pm
Location - Ireland

Post by JAY6390 » Fri Jan 28, 2011 11:22 pm

OK do you have phpMyAdmin access? and are you feeling confident about using it?

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by affordable » Fri Jan 28, 2011 11:24 pm

i was afraid you were going to ask that.... NO AND NO.

New member

Posts

Joined
Thu Dec 16, 2010 4:53 pm
Location - Ireland

Post by JAY6390 » Fri Jan 28, 2011 11:30 pm

ok, in that case we'll use another method :D

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"

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by affordable » Fri Jan 28, 2011 11:36 pm

All i am getting is..... OK

New member

Posts

Joined
Thu Dec 16, 2010 4:53 pm
Location - Ireland

Post by JAY6390 » Fri Jan 28, 2011 11:40 pm

That is all you should get...now delete those two lines and save again

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by affordable » Fri Jan 28, 2011 11:41 pm

sorry did it all, still getting permission denied

New member

Posts

Joined
Thu Dec 16, 2010 4:53 pm
Location - Ireland

Post by JAY6390 » Fri Jan 28, 2011 11:55 pm

Do you want to PM me your site details (ftp) and I'll take a quick look for you

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by affordable » Sat Jan 29, 2011 12:03 am

thanks,
Sent pm

New member

Posts

Joined
Thu Dec 16, 2010 4:53 pm
Location - Ireland

Post by JAY6390 » Sat Jan 29, 2011 12:23 am

fixed...be sure to log out and then back in to your admin (and change your password of course)

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by ivantankosic » Wed May 22, 2013 9:20 pm

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

Newbie

Posts

Joined
Wed May 22, 2013 1:15 am
Location - GB
Who is online

Users browsing this forum: No registered users and 104 guests