ID: 24252 User updated by: jpenn at cheetah-soft dot com Reported By: jpenn at cheetah-soft dot com -Status: Bogus +Status: Open Bug Type: Session related Operating System: RHAT 7 PHP Version: 4.3.1 New Comment:
[quote] As long as you fail to provide a full, but short example script which CLEARLY shows whatta hell you're talking about, this stays bogus. [/quote] What in gods name are you talking about? Do you not see in the 4th post on this bug? That is as clear as it gets. Are you a kid or something sniper? This is rediculous that you are popping in and out of this and totally overlooking the posts on this bug. [From 4th post in this bug] session_set_save_handler( array( &$this, 'open' ), array( &$this, 'close' ), array( &$this, 'read' ), array( &$this, 'write' ), array( &$this, 'destroy' ), array( &$this, 'gc' ) ); Now, this is the open method: function open( $blah, $blah ) { $res = mysql_connect( 'blah', 'blah', 'blah' ); mysql_select_db( 'blah', $res ); return( true ); } -------------------------------------------- Do you not see that? Do you want it emailed to you? Previous Comments: ------------------------------------------------------------------------ [2003-07-09 08:41:59] [EMAIL PROTECTED] As long as you fail to provide a full, but short example script which CLEARLY shows whatta hell you're talking about, this stays bogus. ------------------------------------------------------------------------ [2003-07-07 19:59:38] jpenn at cheetah-soft dot com Sniper - the example is in my last post. Also: [quote] (of course you have to connect to the database...) [/quote] Where did you come up with that? Who in there right mind would think you would not have to connect to the DB? The whole bug can be summed up with that small quote. If you DO NOT CONNECT TO THE DB WITHIN THE OPEN METHOD - it will not work. - It will not work if you connect outside of the class - It will not work if you connect inside the class but in a method other than the sess_open method - It will not work if you connect with a DB commection class It will ONLY WORK if you connect inside the open method for that function - the session_set_save_handler() function. Excuse me for getting fustrated - but this was almost a simple bug report, and very understandable from my first post. This is almost as simple to understand as anything else the langauge has to offer. ~ Thanks ------------------------------------------------------------------------ [2003-07-07 19:42:19] [EMAIL PROTECTED] Either I don't understand what you mean with this or you're just expecting some weird magic to happen there. (of course you have to connect to the database...) Provide a FULL but short example script if you still think this is some bug. ------------------------------------------------------------------------ [2003-06-27 03:02:48] jpenn at cheetah-soft dot com Ok - I thought the first post was clear. When using session_set_save_handler() inside a class when using a DB as the storage medium - you must connect to the DB inside of the open function/method. First, we set the methods to use: session_set_save_handler( array( &$this, 'open' ), array( &$this, 'close' ), array( &$this, 'read' ), array( &$this, 'write' ), array( &$this, 'destroy' ), array( &$this, 'gc' ) ); Now, this is the open method: function open( $blah, $blah ) { $res = mysql_connect( 'blah', 'blah', 'blah' ); mysql_select_db( 'blah', $res ); return( true ); } The above works. When explicitly connecting inside of the open method - everything works like a charm. Now, if you DO NOT EXPLICITLY CONNECT (to the DB) inside of this method - the session handler will not work. This is just not specific to one DB and (or) operating system, it is a problem accross a magnitude of platforms. Is this a scope issue? ------------------------------------------------------------------------ [2003-06-26 18:23:57] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/24252 -- Edit this bug report at http://bugs.php.net/?id=24252&edit=1