Logging in returns to log in page

Forum for questions and support relating to the 1.30.x releases only.
rodrigomartinho
Posts: 10
Joined: Mon May 08, 2017 6:26 pm

Logging in returns to log in page

Post by rodrigomartinho »

Hello.

I'm running Zoneminder in an Ubuntu Server 14.04.

When I try to log in to the web interface, it returns to the same log in page. I am not sure, but it seems this started happening after a zoneminder upgrade.

Some time ago, this problem happened and it was due to lack of disk space. This isn't the case this time.

Looking for some other threads on the subject, it seems to be related to php5 sessions. As stated on apache log (tail /var/log/apache2/error.log):

"PHP notice: A session had already been started - ignoring session_start() in /usr/share/zoneminder/www/index.php on line 128".

Any thoughts about to solve this issue?

Thanks in advance.
rodrigomartinho
Posts: 10
Joined: Mon May 08, 2017 6:26 pm

Re: Logging in returns to log in page

Post by rodrigomartinho »

Anyone could help with this issue?
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Logging in returns to log in page

Post by rockedge »

does zoneminder report it is logging in then returns to login? If the page returns directly to the login then are the user -> password correct?

If it reports "Logging In" then returns I would have to see what is with some research.
rodrigomartinho
Posts: 10
Joined: Mon May 08, 2017 6:26 pm

Re: Logging in returns to log in page

Post by rodrigomartinho »

Hi rockedge, thanks for your help.

Yes, that's the case, it reports logging in. I also tried a wrong password to confirm this diference.

I forgot to mention that the problem started on two different installations at the same time: my local server and on my amazon EC2 account. That's what leads me to think it's related to a recent ZoneMinder update.

Both installations are Ubuntu Server 14.04.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Logging in returns to log in page

Post by rockedge »

does this happen in different browsers? Did the database update successfully?
rodrigomartinho
Posts: 10
Joined: Mon May 08, 2017 6:26 pm

Re: Logging in returns to log in page

Post by rodrigomartinho »

I tested in Chrome, Firefox and Internet Explorer and it happens in all of them.

About the database update, I'm not sure how I could check it, but the upgrade process (via apt-get dist-upgrade) ended successfully.

Could it be php related? The newer Ubuntu uses php7, but I'm still on php5.
mattionline
Posts: 53
Joined: Thu Jun 18, 2015 7:27 pm

Re: Logging in returns to log in page

Post by mattionline »

I had this problem once.
My keyboard layout changed (language) and now i had the qwerty layout.
So the password was incorrect and i landed on the same page again.
Another time my disk space was full and i it was the same again.
My Personal Blog: https://mattionline.de
rodrigomartinho
Posts: 10
Joined: Mon May 08, 2017 6:26 pm

Re: Logging in returns to log in page

Post by rodrigomartinho »

Some time ago I had the disk space problem too. This is not the case now.

About the keyboard, there is a difference between when the password is incorrect and this case, when the logging in message appears and then returns to login page.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Logging in returns to log in page

Post by rockedge »

I am using PHP 5.5.9 in most of my installs and 1.30.4 works well. I feel a permission problem someplace is happening on your install. Since it begins and shows "Logging In" then fails and returns to the login page. Some kind of ownership or user conflict in /etc/zm/zm.conf? I will try to duplicate this error.
rodrigomartinho
Posts: 10
Joined: Mon May 08, 2017 6:26 pm

Re: Logging in returns to log in page

Post by rodrigomartinho »

My current permissions for /etc/zm/zm.conf are 740. Owner is root:www-data. I changed for 777 for a test with no success.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Logging in returns to log in page

Post by rockedge »

is zoneminder starting? what happens when in a terminal you use ?

Code: Select all

#zmupdate.pl

Code: Select all

#/etc/init.d/zoneminder status
you could try and change ownership of /etc/zm/zm.conf to www-data:www-data
rodrigomartinho
Posts: 10
Joined: Mon May 08, 2017 6:26 pm

Re: Logging in returns to log in page

Post by rodrigomartinho »

Right now it was stopped, I don't know why. But "service zoneminder stop,start or restart" works as usual. I started it again.

Running zmupdate.pl: Database already at version 1.30.4, update aborted.

I changed the ownership, but since I did a test with 777 permissions, it should't do any difference. Problem persists.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Logging in returns to log in page

Post by rockedge »

could it be Apache and something in the config that has changed since the update of ZM?
Are there any clues in the apache logs or PHP logs?
rodrigomartinho
Posts: 10
Joined: Mon May 08, 2017 6:26 pm

Re: Logging in returns to log in page

Post by rodrigomartinho »

It seems we have a clue!

[Thu May 25 12:51:43.548484 2017] [:error] [pid 7679] [client XXX.XXX.XXX.XXX:63418] PHP Notice: A session had already been started - ignoring session_start() in /usr/share/zoneminder/www/index.php on line 128, referer: https://mydomain/zm/index.php
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Logging in returns to log in page

Post by rockedge »

I noticed this error in your first post. Find your php.ini file. Look for

Code: Select all

session.auto_start = 0
make sure it is set to 0.
restart Apache
restart ZoneMinder
start a browser clear cookies and cache
open zm web console
does the error return?
Locked