I just wrote a SQL session handler class using some info from the
example at

And.. everything works perfectly, until I attempt to set a session
variable, and the custom write function get's executed. It seems that
the data parameter passed to the function is empty, no matter what I do.
The session-id parameter is correct (and users keep their sessions,
it seems like things are working except this), but the data parameter is

I read in the example on the URL above that if you didn't set
session.save_handler to user, something would go bad during write.

The session class can be found at
http://www.nordheim.no/temp/session.class.phps (no use to paste the
whole thing here I guess). Never mind those funny database-class-things
in there, it's just a PEAR DB-wrapper (imagine that, a wrapper-wrapper ;).

I'm initiating the class like this;

$session = new Session(); /* Constructor will set session.save_handler */
$session->setHandler(); /* This will define session handlers */
$session->Start(); /* Executes session_start(). Is that enough? Works
                      with the default session handler ;) */

..then, I set a session variable:
$_SESSION["test"] = "TESTING";

then, the $session->_write() functions gets executed, but the data
parameter is blank.

Can anyone tell me what I'm doing wrong here?
I'm running PHP 4.2.0 on Apache 1.3.24 (Linux).

Trond Arve Nordheim
 - "This message is ROT13-encrypted twice for extra security."

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

Reply via email to