[pmwiki-users] Session Erors and UserAuth2

IchBin weconsultants at gmail.com
Sun May 20 12:14:08 CDT 2007


ThomasP wrote:
> On Sat, May 19, 2007 22:48, IchBin wrote:
>> I noticed that after I disabled UserAuth2 on my pc (I have it running
>> out on a website) when I open a Session in an unrelated php scripts I
>> get Session errors. Are their cookies around that I have to purge? I get
>> the following error (I am doing a session_start()):
>>
>> Warning: session_start() [function.session-start]:
>> open(/tmp\sess_9af2e42745051da48fab511b67112ac7, O_RDWR) failed: No such
>> file or directory (2) in C:\wwwroot\quotes\quotes.php on line 8
>>
>>
>> Using a clean instance of pmWiki I get the following errors:
>>
>> Warning: session_write_close() [function.session-write-close]:
>> open(/tmp\sess_6415c5f9949c43a85635654986a352ba, O_RDWR) failed: No such
>> file or directory (2) in C:\wwwroot\www\prophp.us\pmwiki.php on line 1833
>>
>> Warning: session_write_close() [function.session-write-close]: Failed to
>> write session data (files). Please verify that the current setting of
>> session.save_path is correct (/tmp) in
>> C:\wwwroot\www\prophp.us\pmwiki.php on line 1833
>>
>> Warning: Cannot modify header information - headers already sent by
>> (output started at C:\wwwroot\www\prophp.us\pmwiki.php:1833) in
>> C:\wwwroot\www\prophp.us\pmwiki.php on line 1005
>>
>>
>> How to I cleanup these sessions? It has to have been related to my
>> testing of the UserAuth2 recipe.
> 
> As far as I know, the setting of PHP options via ini_set are by no means
> permanent to the system, but rather are valid only for the current script
> instance running.
> 
> Further there no writes or other changes that UserAuth2 would make apart
> from writing to the specified dirs cookbook/userauth2/xxx. In so far I
> can't see how there would be a permanent effect. (From your description it
> sounds however that you have run pmwiki on windows before without
> UserAuth2 and it worked. Is this correct?)

Oh, definitely yes. I have four instances that run on my windows 
machine? Not to mention the standalone PHP scripts that user Session().

> 
> In any case, have you tried setting session.save_path to something other
> than '/tmp', e.g. 'C:\\WINDOWS\\TEMP'? Usually there will be no '/tmp' on
> a windows machine.
> 
> Thomas

Sorry Thomas I have to look into it closer. I have not had time to play 
around with it. I would guess that something had to be persisted to see 
this behavior for maintaining information between sessions(). With 
little knowledge I will speculate:

It seems there are three pieces to this puzzle:

   1 - session.save_path
   2 - the actual physical location of the saved session.
   3 - more importantly the index\pointer to that saved session: 
(sess_9af2e42745051da48fab511b67112ac7)


I would think that 1 and 2 are indirectly the problem.  Since the 
default session.save_path points to a different place then where you 
save your session information it has to be storing the session id 
somewhere else or it would have not know about 
sess_9af2e42745051da48fab511b67112ac7.

So as far as I can tell I just need to find out where, under Windows, 
does PHP saved this index information. Do thy save it in the windows 
temp area (not the session.save_path, this is just the path to the data) 
or maybe in the registry.

I think this maybe the right way to resolve...? I'm a beginner with PHP 
so take this with a grain of salt but will try to resolve.

Does this make sense?

> 
> NB: Clearing the session cookies in the browser might be useful as well,
> but leaving them should not screw up the session handling. UserAuth2 sets
> session cookies containing name/value pairs of the form
> PHPSESSID4EA326...90B5CD9 = 3285AB...E98CD079D.



-- 
Thanks in Advance...          http://weconsulting.org
IchBin, Philadelphia, Pa, USA http://ichbinquotations.awardspace.com
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)






More information about the pmwiki-users mailing list