eZ Community » Forums » General » Session doesn't start on the first...
expandshrink

Session doesn't start on the first time on 2012.08

Session doesn't start on the first time on 2012.08

Wednesday 17 July 2013 1:18:26 pm - 3 replies

Hi,

on a site, session doesn't start in the first call same if use Force=enabled.

This a trace of my code :

$userId = $id;
$currentUser = null;
$http = eZHTTPTool::instance();
$anonymousUserID = self::anonymousId();
$sessionHasStarted = eZSession::hasStarted();
// If not specified get the current user
if ( $userId === false )
{
    // $sessionHasStarted = false
    eZSession::start(); // Force
    $sessionHasStarted = eZSession::hasStarted();
    // $sessionHasStarted = true

The issue is only on production server (Debian), no problem on my DEV (Fedora).

Any idea ?

Wednesday 17 July 2013 2:03:24 pm

I have traced the ezsession and eZUser and I check session before to stard it.

Wednesday 17 July 2013 9:28:13 pm

Hello Guillaume.

Not sure I fully understand if you want to have eZ working with session forcestart enabled and coded a workaround because it did not seem to work, or if you just want to use some custom code to force starting a session under some conditions of your own...

Friday 19 July 2013 11:28:16 am

When I want to login on back office, I can't... Because eZSession::hasStarted() return false. I'm on my adminb interface login like a anonymous.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from