Re: [PHP] Keeping sessions



Jorge González wrote:
Ok, you both are right but not what I need because web servers is for shared hosting with PHP then each user choose the way to develop their apps. Then one user maybe store sessions in DB but another one not. This should be on Apache or OS side. It's because I talk about ldirector, LVS and so

I know this is a PHP and not an Apache list but maybe someone is doing this with web hosting...

Not only is this a PHP list, but your problem is a PHP problem. I'm shocked. No, really.

Apache does *not* get involved in sessions. Not at all.

You could put in a custom session handler using a prepended file. See the php.ini configuration option auto_prepend_file. I think there are also extensions available that drop in to replace the session extension - suggest you search the PECL site for those (http://pecl.php.net/). Of course you need to be aware that any PHP script can override both of these options.

Just to clarify, you're building a shared hosting system that load balances all sites across a cluster of web servers? If not, please explain what it is you're actually trying to do.

-Stut

--
http://stut.net/
.



Relevant Pages

  • Re: register_globals - turning on
    ... >>default because of the history of PHP. ... >Sessions contain persistent data, ... >>paths are a tad confusing as well. ... >In the case of session data, the web server needs to be able ...
    (comp.lang.php)
  • Re: Weirdness
    ... >> as I am getting parse errors. ... Well, oddly enough, I just started getting issues with sessions ... Apache owns and has rwe on it. ... PHP is running as an Apache module, ...
    (php.general)
  • Session Variables Disappear and Reappear
    ... New to PHP and I've checked previous posts and haven't seen similar problem. ... I can also destroy sessions. ... message will disappear showing the "Please Login Form". ...
    (php.general)
  • Re: [PHP] Keeping sessions
    ... I know this is a PHP and not an Apache list but maybe someone is doing this with web hosting... ... That doesn't change the fact that Apache does not get involved in sessions. ... Users's session must be persistent in all cases: web server down, user jumpig between backend web servers, etc ...
    (php.general)
  • Re: register_globals - turning on
    ... >>an Apache module. ... >So basically using the .htaccess is a safe way of enabling sessions to ... >>Stick this file on the beginning of every PHP page processed. ... >>In the case of session data, the web server needs to be able ...
    (comp.lang.php)