[ZendTo] Login session problem (Users get logged off as soon as they click on any link)

Jules Field Jules at Zend.To
Thu Aug 30 15:22:29 BST 2018


Thilo,

As an easy test, try this:
     1. Ubuntu has multiple php.ini files. The important one for ZendTo 
is /etc/php/72/apache2/php.ini. Make sure your timezone is correct in there.
     2. Reboot your Ubuntu server. That will guarantee everything in the 
system agrees on the timezone.
     3. Try logging in to ZendTo.
     4. If that still fails to work properly (i.e. it effectively logs 
you out on 1st click anywhere), edit preferences.php and change 
'cookieTTL' by adding another 0 on the end, so you multiply it to 20 
hours instead of 2 hours (72000 instead of 7200 seconds).
     5. Try ZendTo again.

Let me know how you get on.

Cheers,
Jules.

On 30/08/2018 12:09, Thilo Schweizer wrote:
>
> Hey again,
>
> Ubuntu 12 is no longer supported, sorry.
> Ubuntu themselves have 'end-of-life'd it and I can't get PHP 7 for it.
>
> /à//Yes it became clear after I looked at the third party repository 
> for php7, no problem and not your fault.//
>
> /
>
> **
>
> **
>
> But now the users doesn‘t stay logged in at all, as soon as the site 
> gets refreshed or any button/link is clicked you get logged off. So I 
> decided to do a completely fresh install, including the os (I switched 
> to OpenSuSE Leap 15.0). Everything worked flawless, no problems with 
> the installer script anymore. At the end I used the scripts to adopt 
> my config files and „tada“, exactly the same issue. I checked the 
> timezone (system + php.ini – Europe/Berlin), I tried it with http 
> instead of https, I even tried it with the original config files and a 
> local test user – same problem!
>
> What did I miss?
>
> It’s kinda urgent, my colleagues are using zendto very frequently and 
> in this state they aren’t able to send any files at all.
>
> My guess would be the timezone. The expiry time (an absolute point in 
> time, not just "now + 2 hours") of the session cookies are set on the 
> server, but their expiry is handled by the user's web browser. So if 
> the timezone on the server isn't perfect, it can end up creating 
> cookies that have already expired.
>
> Did you re-run the ZendTo Installer *after* you upgraded the Ubuntu 12 
> box to Ubuntu 14? If not, I would strongly advise you try that first, 
> particularly stage number 5 (configuring Apache and php). You can run 
> the stages individually. Look in the Installer directory and you'll 
> see a "Ubuntu-Debian" dir. cd into that and just run ./5-httpd-php.sh. 
> They work out that they aren't being run by install.sh and go and find 
> the file(s) they need on their own.
>
> /à//I did rerun it, but I’m now on a fresh OpenSuSE Leap 15.0 with a 
> fresh zendto install, I just took the config files from the old zendto 
> installation and converted them with the scripts.//
>
> /
>
>
> My page about this
> https://zend.to/timezone.php
> is a bit out of date, but should help.
> Make sure that /etc/localtime is the correct timezone (on some Linuxes 
> it's a symlink into /usr/share/zoneinfo/<timezone>, on others it's a 
> copy of a file in /usr/share/zoneinfo
>
> /à//Yes, I have found that page before and I have checked the global 
> timezone several times:/
>
> timedatectl
>
> Local time: Thu 2018-08-30 13:00:27 CEST
>
> Universal time: Thu 2018-08-30 11:00:27 UTC
>
> RTC time: Thu 2018-08-30 11:00:26
>
> Time zone: Europe/Berlin (CEST, +0200)
>
> Network time on: no
>
> NTP synchronized: yes
>
> RTC in local TZ: no
>
> And also I looked for the php ini-files (/etc/php7/apache2/php.ini / 
> /etc/php7/cli/php.ini)
>
> date.timezone = 'Europe/Berlin'
>
> Thank you!
>
> Regards
>
> Thilo
>
> *Von:*Jules Field [mailto:Jules at Zend.To]
> *Gesendet:* Donnerstag, 30. August 2018 11:21
> *An:* ZendTo Users <zendto at zend.to>
> *Cc:* Thilo Schweizer <t.schweizer at merkle-partner.de>
> *Betreff:* Re: [ZendTo] Login session problem (Users get logged off as 
> soon as they click on any link)
>
> Thilo,
>
> On 30/08/2018 09:30, Thilo Schweizer via ZendTo wrote:
>
>     Good morning,
>
>     yesterday I ran an upgrade from v4.12 to v5.11-6 using the
>     installer script on an Ubuntu VM (ESX-Server). After some troubles
>     with Ubuntu 12.04 I ran an in place upgrade to 14.04 and finally
>     got it to work.
>
> Ubuntu 12 is no longer supported, sorry.
> Ubuntu themselves have 'end-of-life'd it and I can't get PHP 7 for it.
>
>
>     But now the users doesn‘t stay logged in at all, as soon as the
>     site gets refreshed or any button/link is clicked you get logged
>     off. So I decided to do a completely fresh install, including the
>     os (I switched to OpenSuSE Leap 15.0). Everything worked flawless,
>     no problems with the installer script anymore. At the end I used
>     the scripts to adopt my config files and „tada“, exactly the same
>     issue. I checked the timezone (system + php.ini – Europe/Berlin),
>     I tried it with http instead of https, I even tried it with the
>     original config files and a local test user – same problem!
>
>     What did I miss?
>
>     It’s kinda urgent, my colleagues are using zendto very frequently
>     and in this state they aren’t able to send any files at all.
>
> My guess would be the timezone. The expiry time (an absolute point in 
> time, not just "now + 2 hours") of the session cookies are set on the 
> server, but their expiry is handled by the user's web browser. So if 
> the timezone on the server isn't perfect, it can end up creating 
> cookies that have already expired.
>
> Did you re-run the ZendTo Installer *after* you upgraded the Ubuntu 12 
> box to Ubuntu 14? If not, I would strongly advise you try that first, 
> particularly stage number 5 (configuring Apache and php). You can run 
> the stages individually. Look in the Installer directory and you'll 
> see a "Ubuntu-Debian" dir. cd into that and just run ./5-httpd-php.sh. 
> They work out that they aren't being run by install.sh and go and find 
> the file(s) they need on their own.
>
> My page about this
> https://zend.to/timezone.php
> is a bit out of date, but should help.
> Make sure that /etc/localtime is the correct timezone (on some Linuxes 
> it's a symlink into /usr/share/zoneinfo/<timezone>, on others it's a 
> copy of a file in /usr/share/zoneinfo.
>
> Hope that helps,
>
> Jules
> -- 
> Julian Field MEng CEng CITP MBCS MIEEE MACM
> 'If I were a Brazilian without land or money or the means to feed
> my children, I would be burning the rain forest too.' - Sting
> www.Zend.To <http://www.Zend.To>
> Twitter: @JulesFM
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

Jules

-- 
Julian Field MEng CEng CITP MBCS MIEEE MACM

How to stop time: kiss.
How to travel in time: read.
How to escape time: music.
How to feel time: write.
How to release time: breathe.

www.Zend.To
Twitter: @JulesFM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jul.es/pipermail/zendto/attachments/20180830/fb8fc41c/attachment-0001.html>


More information about the ZendTo mailing list