Re: What can cause session_destroy to fail?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jim Lucas wrote:
> Mattias Thorslund wrote:
>> Jim Lucas wrote:
>>> Mattias Thorslund wrote:
>>>> Hi,
>>>>
>>>> One of my clients just received a PHP warning that session_destroy()
>>>> failed. Using the default session handler (with tmp files), what
>>>> are the
>>>> most likely things that can cause session_destroy() to return false?
>>>>
>>>> Thanks for any suggestions.
>>>>
>>>> Mattias
>>>>
>>> The session was never initiated on that page with session_start() ??
>>>
>>> on this page
>>>
>>> http://us.php.net/manual/en/function.session-destroy.php
>>>
>>> the first couple comments talk about different ways that the
>>> session_destroy() function call mail fail?  Any sound close?
>>
>> I read that too, but (as I read it) it talks about what the function
>> does, and what you must do to to kill the session properly. But I can't
>> see what might actually cause the function to return false.
>>
>> Mattias
>>
>
> maybe the fact that the session was never started in the first place
>
> first off, define "failed".  Does it give a fatal error, return false,
> etc... ??

Returns false, as I mentioned twice above. Also returns a PHP warning.

I got some more info now. The error message they get is
"session_destroy(): Session object destruction failed".

On my test page, with simply a session_destroy() before any
session_start(), the error (warning) message is "Trying to destroy
uninitialized session". This happens both on PHP 4.4.4 and 5.2.1.

So, these are different...

Mattias

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux