[PHP] PHP session expiring too early?

2008-06-15 Thread gh
I am experiencing a strange bug after upgrading to PHP 5.2.4 with the 
Zend Optimizer 3.3.3.


In two of our locally-hosted web applications, NolaPro and SugarCRM, the 
login sessions are expiring after 5 minutes of inactivity and I cannot 
figure why. The relevant values from my /etc/php.ini file are as follows:


session.save_path = /var/lib/php
session.use_cookies = 1
session.cookie_lifetime = 0
session.auto_start = 0
session.cookie_path = /
session.cookie_domain =
session.gc_maxlifetime = 1440
session.cache_limiter = nocache
session.cache_expire = 180

/var/lib/php is set to 777 permissions.

There is a cron job in /etc/cron.d/php:
09,39 * * * *  root [ -d /var/lib/php ] && find /var/lib/php/ -type f 
-mmin +$(/usr/lib64/php/maxlifetime) -print0 | xargs -r -0 rm


The script /usr/lib64/php/maxlifetime outputs the value "24" which is 
consistent with the value in the php.ini file.


There are no .htaccess files in the root directories for either of the 
applications.


Does anyone know what else could be causing this problem?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session Expiring

2005-04-29 Thread Richard Lynch
On Fri, April 29, 2005 10:28 am, John Martinez said:
> I want to have the page expire after ten minutes of inactivity. For
> example, if you goto Travelocity.com and do a search then sit idle for
> awhile it refreshes the page with a notice that you've been idle etc.
> I want to dupe this but I only know the cheeseball way of using the
> meta tag http-equiv-refresh.
>
> What's a good alternative to using http-eqiuv-refresh?

As far as PHP goes, you can expire the session *OR* force them to re-login
after time X with the same session easily enough when they hit a new page.

But as far as having the browser doing something when it's idle, it's
*NOT* going to be PHP!

PHP lives on the server.  It knows *nothing* about an idle browser.

As far as I know, though, the only alternative to the HTTP-EQUIV="REFRESH"
would be some kind of JavaScript timer, which, to me, would be even more
cheeseball than HTTP-EQUIV="REFRESH"...  But that's just me.

Why don't you just look at Travelocity.com HTML source.  Whatever they are
doing, it has to be in there, and it *CANNOT* be in anything server-side.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Session Expiring

2005-04-29 Thread John Martinez
Hi list,
I want to have the page expire after ten minutes of inactivity. For
example, if you goto Travelocity.com and do a search then sit idle for
awhile it refreshes the page with a notice that you've been idle etc.
I want to dupe this but I only know the cheeseball way of using the
meta tag http-equiv-refresh.

What's a good alternative to using http-eqiuv-refresh?

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php