Page 1 of 1

Sessions: httpd.conf vs. php.ini

Posted: Wed Jan 14, 2009 8:56 pm
by mkotzev
While I've been coding for a few months now, I'm still relatively new to PHP and its configurations. I am building a site which uses sessions, and was wondering what the behavior is for Session Timeout. Apache 2's httpd.conf file has the Timeout directive, but PHP5's php.ini has the session.gc_maxlifetime configuration.

If Apache is set to timeout after 1800 seconds and PHP is set to, say, 1400 seconds, when would the session actually timeout?

Thanks!

Re: Sessions: httpd.conf vs. php.ini

Posted: Thu Jan 15, 2009 2:11 am
by VladSun
Apache timeout config option has nothing to do with PHP session management:

http://httpd.apache.org/docs/1.3/mod/core.html#timeout
TimeOut directive
Syntax: TimeOut number
Default: TimeOut 300
Context: server config
Status: core

The TimeOut directive currently defines the amount of time Apache will wait for three things:
The total amount of time it takes to receive a GET request.
The amount of time between receipt of TCP packets on a POST or PUT request.
The amount of time between ACKs on transmissions of TCP packets in responses.

Re: Sessions: httpd.conf vs. php.ini

Posted: Thu Jan 15, 2009 4:18 pm
by mkotzev
I was misinformed then. Bummer.

So then can I assume there are no Apache directives which will interfere with PHP's session config?

Re: Sessions: httpd.conf vs. php.ini

Posted: Thu Jan 15, 2009 4:28 pm
by VladSun
mkotzev wrote:I was misinformed then. Bummer.

So then can I assume there are no Apache directives which will interfere with PHP's session config?
Yes.

PS: Would you mind telling me where you are from?

Re: Sessions: httpd.conf vs. php.ini

Posted: Thu Jan 15, 2009 4:41 pm
by mkotzev
Born in Sofia like you, live in Berkeley, California

Re: Sessions: httpd.conf vs. php.ini

Posted: Thu Jan 15, 2009 4:46 pm
by VladSun
mkotzev wrote:Born in Sofia like you, live in Berkeley, California
:)