Page 1 of 2

Logging in returns to log in page

Posted: Mon May 08, 2017 6:48 pm
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.

Re: Logging in returns to log in page

Posted: Sun May 21, 2017 3:43 am
by rodrigomartinho
Anyone could help with this issue?

Re: Logging in returns to log in page

Posted: Sun May 21, 2017 11:21 pm
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.

Re: Logging in returns to log in page

Posted: Tue May 23, 2017 3:43 pm
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.

Re: Logging in returns to log in page

Posted: Tue May 23, 2017 5:35 pm
by rockedge
does this happen in different browsers? Did the database update successfully?

Re: Logging in returns to log in page

Posted: Tue May 23, 2017 8:26 pm
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.

Re: Logging in returns to log in page

Posted: Tue May 23, 2017 9:03 pm
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.

Re: Logging in returns to log in page

Posted: Tue May 23, 2017 9:40 pm
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.

Re: Logging in returns to log in page

Posted: Tue May 23, 2017 11:38 pm
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.

Re: Logging in returns to log in page

Posted: Wed May 24, 2017 12:07 am
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.

Re: Logging in returns to log in page

Posted: Thu May 25, 2017 2:46 pm
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

Re: Logging in returns to log in page

Posted: Thu May 25, 2017 3:42 pm
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.

Re: Logging in returns to log in page

Posted: Thu May 25, 2017 3:44 pm
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?

Re: Logging in returns to log in page

Posted: Thu May 25, 2017 3:52 pm
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

Re: Logging in returns to log in page

Posted: Thu May 25, 2017 6:15 pm
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?