From:             [EMAIL PROTECTED]
Operating system: Red Hat 7.0
PHP version:      4.0.5
PHP Bug Type:     *Session related
Bug description:  to many sessions are generated when using set_session_save_handler 
with mysql

Using a session_handler like this one:

Using a mySQL-database.

Have the following configure './configure' '--with-mysql' 
'--with-apache=../apache_1.3.20' '--enable-track-vars' '--enable-trans-sid' 
'--enable-ftp' '-disable-debug'

The problem: I have noticed that if you use set_session_save_handler with mysql and 
you donít accept cookies and there is a broken image on the page, PHP generates to 
many sessions:
This is an example code that generates this error (named test.php3):

 mysql_connect ("localhost", "user", "pass");
  include("the session file like the one linked above");
  <img src="fdsafdsaf.jpg">
   // count the number of sessions stored in the database
    $numsessions = mysql_num_rows(mysql_query("select * from sessions"));
    echo $ numsessions;
<a href="test.php3">test</a>

Notice how the number of sessions are added, but you still have your same session id. 
What happens is that PHP generates a number of session ids, that are never used. This 
problem doesnít occur if you have cookies enabled, or donít uses 

Edit Bug report at:

PHP Development Mailing List <>
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