Edit report at http://bugs.php.net/bug.php?id=52649&edit=1

 ID:                 52649
 User updated by:    blue-tidus159 at hotmail dot com
 Reported by:        blue-tidus159 at hotmail dot com
 Summary:            Wrong values are written into the session
-Status:             Feedback
+Status:             Closed
 Type:               Bug
 Package:            Session related
 Operating System:   Windows 7 x64
 PHP Version:        5.3SVN-2010-08-20 (snap)
 Block user comment: N

 New Comment:

Everything fine now, multiple other request changed values in the
session because the other requests were handeled wrong.


Previous Comments:
------------------------------------------------------------------------
[2010-08-20 07:20:46] [email protected]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Given that sessions are obviously working in general for you, I'd be
extremely surprised if this was actually a bug in PHP, but if you can
provide a small, self-contained reproduction script that demonstrates
the problem, that would certainly help, since there's no way to
reproduce the issue given what you've posted.

------------------------------------------------------------------------
[2010-08-20 05:59:31] blue-tidus159 at hotmail dot com

Description:
------------
Well the problem is that I echo out the value of a session entry at the
last line of code and the right value is echoed, but when I look into
the file/db(custom session handler) the value is wrong.



I use Xampp 1.7.3/PHP 5.3.1 and I already tested every little part of
the code. I found out that when I comment out an array that the value is
saved right. I can't offer a whole test because this problem seems to
appear only in this special context. I think that there somewhere gets
memory overwritten or so, otherwise I can't explain that to myself. The
array looks like that:

$this->conf = array('' => array('' => array('' => ''))

                    // a lot more lines like that

                    'navigation' => array( '/admin/*' => array('view' =>
'blazeCMS\\view\\admin\\AdminView',

                                                                        
       'bind' => array(  array('name'      => 'id',

                                                                        
                               'default'   => '0',

                                                                        
                               'object'    => 'myNut.id'),

                                                                        
                         array('name'      => 'name',

                                                                        
                               'default'   => 'test',

                                                                        
                               'object'    => 'myNut2.name')),



                                                                        
       'action' => array(array('action'    => 'toLogin',

                                                                        
                               'view'      =>
'blazeCMS\\view\\admin\\LoginView'),

                                                                        
                         array('action'    => 'success',

                                                                        
                               'view'      =>
'blazeCMS\\view\\admin\\AdminView')))



//                                                               '/*' =>
    array('view' => 'blazeCMS\\view\\IndexView',

//                                                                      
         'action' => array(array('action'    => 'navigate',

//                                                                      
                                 'view'      =>
'blazeCMS\\view\\IndexView'),

//                                                                      
                           array('action'    => 'success',

//                                                                      
                                 'view'      =>
'blazeCMS\\view\\IndexView')))

                                            )



When I remove the comments then the problem appears, otherwise not. Any
ideas?

Test script:
---------------
...// a lot of code

$_SESSION['my.view_id'] = $context->getView()->getViewId();

echo $_SESSION['my.view_id']; // returns the right value





Expected result:
----------------
.... Look into the session file ....



the value should be the view id which was assigned before.

In this case: blazeCMS\view\admin\AdminView

Actual result:
--------------
blazeCMS\view\IndexView


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52649&edit=1

Reply via email to