Fwd: Re: [imp] strange problem with php's session.auto_start enabled !!!

Jan Schneider jan at horde.org
Fri Mar 5 11:45:11 PST 2004


Zitat von Darragh Bailey <felix at compsoc.nuigalway.ie>:

> Quoting Jan Schneider <jan at horde.org>:
>
>> > > I'm having a strange problem..
>> > > I've got session.auto_start enabled in my php.ini...
>> > > everytime I try to log into the IMP system, it always throws me out
>> > > saying "Your Session has expired"....
>> > > As soon as I disable session.auto_start in php.ini and restart apache,
>> > > it works perfectly...
>> > > Now the problem is that I need session.auto_start to be enabled for my
>> > > other applications (my mistake !!!! :( ).....
>> > > Is there any way I can make IMP work with session.auto_start
>> > > enabled????
>> >
>> > You can change php.ini settings with .htaccess files.
>> >
>> > Jan.
>>
>> Thanks a lot !!!!
>> But, I don't know how to do it ... :-(
>> Could you tell me how to go about??
>
> Would it not be better to use the following function from php
> string ini_set ( string varname, string newvalue)
>
> to modify session.auto_start for the required application it is 
> required to be
> enabled/disabled for it to work correctly.
>
> hordes Horde.php under the lib directory seems to be the most 
> suitable location
> if you want to do it this way under the method called setupSessionHandler()
> seems the best place.
>
> just adding the following line to it should work
> ini_set('session.auto_start', '0');
>
> Although doing this through a .htaccess file would have the advantage of not
> needing to be redone each time you upgrade.
>
> Although if imp/horde really requires session.auto_start to be disabled to
> function correctly I'm supprised that it hasn't already been added into the
> code to explicitly disable it instead of relying on the php configuration.

This makes sense at a first glance and according to the manual this setting
can be changed with ini_set().

But I bet it won't work, because the whole deal of this setting is, that the
session is started during the request startup *before* the page loads. For
this reason, you can't store objects in the session if you use this
feature. Changing this setting during the page execution shouldn't change
anything, or did you make other experiences?

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - Neue Wege des Lernens
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the imp mailing list