After upgrading in 4.4, Remember Me doesn't work

Author Message

Benjamin Lorteau

Saturday 12 March 2011 3:50:37 am

Hello again,

directly following my login problems after upgrading from 4.3 to 4.4 and my PHP Notice problem, I run into another issue : the RememberMe checkboxe doesn't work anymore after upgrade, I get disconnected SessionTimeout time has pased.

Here's the agregated [Session] configuration groupe from the site.ini file :

[Session]
RememberMeTimeout=604800
Handler=eZSessionHandlerDB
SessionTimeout=259200
ActivityTimeout=3600
ForceStart=disabled
SessionNameHandler=custom
SessionNamePrefix=eZSESSID
SessionNamePerSiteAccess=disabled

Here's the Remember Me checkbox code from the template :

<form method="post" action={"/user/login/"|ezurl} name="loginform">
   <div>
     <label for="id1">Login</label>
     <input class="input-text post" type="text" name="Login" id="id1" value="" />
   </div>
   <div>
     <label for="id2">Pass</label>
     <input type="password" name="Password" id="id2" value="" />
   </div>
   <div class="inline">
     <label for="id4">Remember Me</label>
     <input type="checkbox" name="Cookie" id="id4" />
     <input type="submit" name="LoginButton" value="Login" />
   </div>
</form>

Has the input name changed or something ?

Thanks in advance for your replies !

Benjamin

eZ Publish personal project : http://www.aeriesguard.com [fr]

Damien Pobel

Monday 14 March 2011 1:49:59 am

Hi Benjamin,

I use this feature too and it works well even after an upgrade to 4.4.

My settings are :

[Session]
RememberMeTimeout=864000
Handler=
SessionTimeout=259200
ActivityTimeout=3600
ForceStart=disabled
SessionNameHandler=custom
SessionNamePrefix=eZSESSID
SessionNamePerSiteAccess=enabled

as you can see, there are two main differences in the Handler settings (I use PHP default session handler) and in the SessionNamePerSiteAccess (I don't need cross siteaccess login). Maybe, there's a bug with your settings, you should try to change those settings.

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Benjamin Lorteau

Monday 14 March 2011 6:40:31 am

Hi Damien,

thanks for your reply.

I tried to switch the Handler back to default (sessions handled by PHP) but with no luck, I'm still logged out after 20 minutes.

I will try to change SessionNamePerSiteAcces but I kind of like cross siteaccess login for my site, it's more convenient...

eZ Publish personal project : http://www.aeriesguard.com [fr]

Damien Pobel

Monday 14 March 2011 7:17:46 am

If setting SessionNamePerSiteAcces to enabled solves your issue, it should be considered as a bug and then you should probably open an issue in the tracker.

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Benjamin Lorteau

Monday 14 March 2011 8:56:54 am

I tried to disable SessionNamePerSiteAccess but again, I've been disconnected on either siteacces after 20 minutes of inactivity.

Since nothing is stored in the database anymore for the sessions, I'm planning on raising drastically the PHP session timeout to keep people logged in.

Thanks anyway for the help !

Edit :

Like I said before, I updated my php.ini to make it remember the sessions. here's the extract of the php.ini file about Session :

[Session]
session.save_handler = files
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
>> session.cookie_lifetime = 604800
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_divisor     = 100
>> session.gc_maxlifetime = 259200
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 4

Now the user are remembered, even if they left the "Remember Me" checkbox unchecked, I should remove it to avoid confusion. Or even better, leave it checked and disabled to show users that they are indeed remembered.

That solve the initial problem but at a functional costs.

Do you think it was a bad idea to mess with the PHp session lifetime or not ?

eZ Publish personal project : http://www.aeriesguard.com [fr]

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 17 2025 23:59:22
Script start
Timing: Jan 17 2025 23:59:22
Module start 'layout'
Timing: Jan 17 2025 23:59:22
Module start 'content'
Timing: Jan 17 2025 23:59:23
Module end 'content'
Timing: Jan 17 2025 23:59:23
Script end

Main resources:

Total runtime0.6277 sec
Peak memory usage4,096.0000 KB
Database Queries64

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 593.1719152.6563
Module start 'layout' 0.00710.0024 745.828139.5156
Module start 'content' 0.00960.6165 785.3438578.9688
Module end 'content' 0.62600.0016 1,364.312520.1094
Script end 0.6276  1,384.4219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4988160.0002
Check MTime0.00140.2257160.0001
Mysql Total
Database connection0.00100.163610.0010
Mysqli_queries0.547787.2610640.0086
Looping result0.00090.1459620.0000
Template Total0.596395.020.2981
Template load0.00230.370620.0012
Template processing0.593994.624720.2970
Template load and register function0.00010.019610.0001
states
state_id_array0.00070.112210.0007
state_identifier_array0.00070.116320.0004
Override
Cache load0.00190.3065450.0000
Sytem overhead
Fetch class attribute can translate value0.00090.141620.0004
Fetch class attribute name0.00731.163070.0010
XML
Image XML parsing0.00310.487420.0015
class_abstraction
Instantiating content class attribute0.00000.0036100.0000
General
dbfile0.00360.5763220.0002
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs