Re: cakephp 2.0 auth session problem

2012-05-16 Thread Ryan Olton
I am also having an issue with sessions, and I'm very frequently being 
asked to log back in.

Configure::write('Session', array(
'defaults' => 'database',
'ini' => array(
'session.cookie_secure' => false
)
));

Configure::write('Security.level', 'medium');

I have a domain that servers both HTTP and HTTPS, so I turned off secure 
cookies.

I have Auth + ACL as well, and had no issue using CakePHP 1.3.x.  I am 
using the database to store session information, and noticed that one user 
will generate many (10+) number of entries in the cake_sessions table.  I'm 
still looking into AJAX requests being the cause, or I've seen a note about 
sessions being invalidated if a file (image, css, js, etc.) is not found.  
I'll be sure to post back if I find a solution, and I must, because this 
makes the site basically unusable.

As an aside, I'm also using the Facebook SDK, but have comment out it's 
request to start a PHP session so that CakePHP can start it's own.  Not 
sure if anyone else is using the Facebook SDK, but thought I would through 
that out there.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cakephp 2.0 auth session problem

2012-05-10 Thread phpMagpie
I am also noticing this problem a lot in 2.0, did either of you get to the 
bottom of it?  

It seems to be worse when multiple users are logging into the system at 
once, even when logging in with different users (does cake prevent 
concurrent logins with same account?)

Regards, Paul.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cakephp 2.0 auth session problem

2011-11-16 Thread euromark
I also experienced quite an amount of unexpected logouts in 2.0 now.
To make sure it is not the garbage collector of the file system I
switched to "database".
There no garbage collector should interfere as long as expires is not
reached (which is several days).
But the systems logs the user out after not even a few hours.



On 16 Nov., 13:11, "joh...@baldemia.com"  wrote:
> I've recently migrated an application from 1.3 to 2.0, and i'm
> encountering a problem with user authentification.
>
> The app uses a basic auth + acl setup, that worked fine in 1.3.
>
> First problem i encountered when deploying the app on my production
> server (CentOS6, php 5.3.6. mysql 5.1.12) was that the auth component
> wouldn't work at all, the session would be instantly regenerated after
> login, and the user would be redirected again to the login page. I
> managed to solve that by setting a random value to Session.cookie in
> core.php.
>
> All seemed to work now until users started getting randomly logged
> out.  Problems occurs mostly during ajax calls and more rarely during
> normal page calls. I use ajax for a auto-save feature when editing
> certain records, a ajax call to a save function is made every 30
> seconds. I wasn't able to pinpoint exactly why the session is
> regenerated as it all occurs randomly, app can work perfectly for
> hours then suddenly log out the user.
>
> I tried setting the security level to low or medium as this used to be
> a fix session related headaches in cake 1.3, but problem still
> persists.
>
> these are my current session settings:
>
> Configure::write('Session', array(
>     'defaults' => 'php',
>     'cookie' => 'appdevtest',
>     'checkAgent'=> false,
>     'timeout' => 4320
> ));
>
> Configure::write('Security.level', 'low');

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


cakephp 2.0 auth session problem

2011-11-16 Thread joh...@baldemia.com
I've recently migrated an application from 1.3 to 2.0, and i'm
encountering a problem with user authentification.

The app uses a basic auth + acl setup, that worked fine in 1.3.

First problem i encountered when deploying the app on my production
server (CentOS6, php 5.3.6. mysql 5.1.12) was that the auth component
wouldn't work at all, the session would be instantly regenerated after
login, and the user would be redirected again to the login page. I
managed to solve that by setting a random value to Session.cookie in
core.php.

All seemed to work now until users started getting randomly logged
out.  Problems occurs mostly during ajax calls and more rarely during
normal page calls. I use ajax for a auto-save feature when editing
certain records, a ajax call to a save function is made every 30
seconds. I wasn't able to pinpoint exactly why the session is
regenerated as it all occurs randomly, app can work perfectly for
hours then suddenly log out the user.

I tried setting the security level to low or medium as this used to be
a fix session related headaches in cake 1.3, but problem still
persists.


these are my current session settings:

Configure::write('Session', array(
'defaults' => 'php',
'cookie' => 'appdevtest',
'checkAgent'=> false,
'timeout' => 4320
));

Configure::write('Security.level', 'low');


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php