Sessions and 4.2.1
| From: | Steve Heath | Date: | Thu, 27 Jun 2002 16:05:18 +0000 |
| Subject: | Sessions and 4.2.1 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-104179@lists.php.net to get a copy of this message | ||
Why can I not write any session information to my MySQL database?
System: SunOS sunblade1 5.8 Generic_108528-13 sun4u sparc SUNW,Sun-Blade-100
Server Software: Apache/2.0.36 (Unix) PHP/4.2.1
I am using the following to handle sessions:
session_mysql.php
PHP4 MySQL Session Handler
by Ying Zhang
I constructed a simple test...
<?
if(! ini_set("session.save_handler","user"))
{
echo "Could not set user session handler.";
exit;
}
// Session handler
include("session_mysql.php");
session_set_save_handler("sess_open", "sess_close", "sess_read",
"sess_write", "sess_destroy", "sess_gc");
// Start session and add a variable
session_start();
$_SESSION["sess_test"] = "Test data";
?>
No session id is created in my sessions table and thus no variable !
Any Ideas ?
Cheers,
Steve