Robin,
   That's your problem.  (Or, at least one of the problems.)  PHP has a
bug where returning "false" from session_read causes all sorts of
strangeness.  Change "return false;" to "return '';" and your problem
will likely go away.

Jaime Bozza


-----Original Message-----
From: Robin Ericsson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 18, 2002 8:01 AM
To: Jaime Bozza
Subject: RE: [PHP-DEV] session problems with own session handler in
php..


On Fri, 2002-01-18 at 14:55, Jaime Bozza wrote:
> Robin,
>    Can you check your session_read handler and tell me what value 
> you're returning when there isn't any data yet?

Sure, here you go:

        function session_db_read ($key)
        {
                global $g_objSQL;

                $res = $g_objSQL->Query("SELECT session_data FROM
sessions WHERE session_id = '".$key."'");
                if ($res->NumRows() > 0)
                {
                        $row = $res->FetchRow();
                        return stripslashes($row[0]);
                }
                else
                {
                        return false;
                }
        }


$g_objSQL is a SQL class I wrote


regards
Robin




-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to