Page 1 of 1

Unable to login to admin panel [SOLVED}

Posted: Thu Mar 20, 2014 7:09 am
by derek1962
Hi all everything with opencart 1.5.6.1 has been ok then when i tried to log in to my admin panel i have this message on the top of the page

Warning: session_start(): open(/var/lib/php/session/sess_kcqmhpbkr2lau23b6udc1llus0, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/petsplaytime.me.uk/httpdocs/system/library/session.php on line 11

The page just refreshes and cant log in, i did not do or change anything just appeared like this the following evening, also i have error message on my website page

http://www.petsplaytime.me.uk

Hope someone can help me
Thanks Derek

Re: Unable to log into admin panel

Posted: Thu Mar 20, 2014 8:00 am
by butte
First try killing your cookies and restarting your browser.

When you're in go into admin and under System / [Store] / Edit / Server turn error reporting (to screen) off, leave or set error logging (to file) on.

Re: Unable to log into admin panel

Posted: Thu Mar 20, 2014 8:04 am
by stokeyblokey
Sounds like a problem writing to the session folder - you can try changing the folder to something that you know is writable like /usr/tmp or /tmp.

No error visible on the store front when I just looked so hopefully you are getting somewhere with this :)

Re: Unable to log into admin panel

Posted: Thu Mar 20, 2014 8:12 am
by butte
If killing cookies didn't work, then move on to sessions. In your host control panel you should be able to see the tmp directory listed. If you can reach it via ftp, you can empty it if you or engines have clogged or filled it. If you cannot reach it, you can ask host support to empty it.

Re: Unable to log into admin panel

Posted: Thu Mar 20, 2014 8:21 am
by derek1962
Hi and thanks for quick response, all i did was copied the file that was giving an error, deleted it from the server then reinstalled the same file, then it worked very strange as i just uploaded the same file but at least i can log in now and yes its also dissapeared from the home page but thank you all so much
Derek

Re: Unable to log into admin panel

Posted: Thu Mar 20, 2014 9:57 am
by butte
The file was somehow corrupted, that was why sending up a fresh copy worked. Go ahead and edit your opening title Solved, for others' benefit.

Re: Unable to login to admin panel

Posted: Sun Apr 13, 2014 4:43 pm
by nolcom
Hi looking for some help on login to admin panel. My host died this morning and I have this sameproblem in the past where unable to login to admin, and always been able to login by adding coded below and a new session path but my efforts to fix today have failed.

I get either invalid password or user or return to blank credential boxes. The same old problem after host provider downtime.

I have currently the following code in session.php and tmp folder on root

Code: Select all

<?php
class Session {
	public $data = array();

  	public function __construct() {
		if (!session_id()) {
			ini_set('session.use_cookies', 'On');
			ini_set('session.use_trans_sid', 'Off');

			session_set_cookie_params(0, '/');
session_save_path(realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../tmp'));
			session_start();


		}

		$this->data =& $_SESSION;
	}
	
	function getId() {
		return session_id();
	}
}
?>
I have also set up on root folder the .tmp folder with 777 permissions.

I have tried everything to replace the files in case of corruptions and even removed the session save path and tmp folders and loaded the original OC core session.php file, but still get either invalid username or password or when entering the login credentials returned to blank password and username boxes.

Does anyone think this is a hosting problem ? or something else I should do ?

I am currently on OC 1.5.6

Re: Unable to login to admin panel [SOLVED}

Posted: Mon Apr 14, 2014 2:23 pm
by nolcom
This is solved as the problem was with the hosting provider.