Cakephp session read and write not work
Hi,
My Cakephp version is 1.1.18.
I set up a virtual machine with ubuntu 11.10. I put my project into
it, and run it with firefox inside this virtual machine, and it works
great.
But when I try to access it by firefox in Windows 7 from the ip
address of this virtual machine, I cannot go through the login page.
By debugging, I found that Session write and read didn't work.
The debug code is as following:
$this->Session->write('user_session', serialize($user_session));
debug($this->Session->read('user_session'));
When I change this two line to this:
$tmp = serialize($user_session);
$this->Session->write('user_session', $tmp);
debug($this->Session->read('user_session'));
It will work within the same controller.
But when I move
debug($this->Session->read('user_session'));
to a different controller, it shows nothing again.
My configuration in core.php:
define('DEBUG', 1);
define('CACHE_CHECK', false);
define('LOG_ERROR', 2);
define('CAKE_SESSION_SAVE', 'cake');//I also try to change it to php,
but not work
define('CAKE_SESSION_TABLE', 'cake_sessions');
define('CAKE_SESSION_COOKIE', 'CAKEPHP');
define('CAKE_SECURITY', 'low');
define('CAKE_SESSION_TIMEOUT', '120');//I also try to change the
number to 1200, but not work
define('AUTO_SESSION', true); //I also change it to false but not work
Besides, it will work in CentOs5.x
I guess this is the configuration problem....
I struggled with this for 3 days, but nothing happened.
I will appreciate any help.
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home