Issue Type: Bug Created: 2011-06-22T20:17:24.000+0000 Last Updated: 2012-03-13T18:51:54.000+0000 Status: Closed Fix version(s): Reporter: Vlad (vlad.vinnikau) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Session
Related issues: Attachments:
Zend_Session_Namespace does not work in chrome browser. The site is sandbox.oggiedomani.org. The navigation choice is saved in session. It works in Firefox 4 and IE 9. However, Chrome browser doesn't store the session. I use Zend Session as following
<pre class="highlight">
$restNamespace = new Zend_Session_Namespace('explorenyc');
if(!isset($restNamespace->boro)){
$restNamespace->boro = array();
}
if(!empty($input->do)){
if($input->do=="add" && !empty($input->val)){
if($input->obj=="cuisine"){
$restNamespace->cuisine[$input->val] = 1;
}
else if($input->obj=="boro"){
$restNamespace->boro[$input->val] = 1;
}
else if($input->obj=="neighborhood"){
$restNamespace->neighborhood[$input->val] = 1;
}
}
if($input->do=="clear" && !empty($input->val)){
if($input->obj=="cuisine"){
unset($restNamespace->cuisine[$input->val]);
}
else if($input->obj=="boro"){
unset($restNamespace->boro[$input->val]);
}
else if($input->obj=="neighborhood"){
unset($restNamespace->neighborhood[$input->val]);
}
}
if($input->do=="clearall"){
unset($restNamespace->cuisine);
unset($restNamespace->boro);
unset($restNamespace->neighborhood);
}
}
Posted by Vlad (vlad.vinnikau) on 2011-06-26T03:45:56.000+0000
Let me know any suggestions to resolve the problem. The issue is replicated on localhost using wamp. I appreciate your help.
Posted by Markus Hausammann (tharkun) on 2011-07-01T14:55:01.000+0000
This problem also causes Zend_Auth to fail in Chrome under PHP 5.3 only. Login is possible but Zend_Auth::getInstance()->hasIdentity() returns false because of the session problem.
Posted by Markus Hausammann (tharkun) on 2011-07-20T11:07:28.000+0000
Anything going on with this?
Posted by Vlad Vinnikov (vlad.vinnikov) on 2011-07-20T14:02:40.000+0000
Zend session doesn't work well with associative arrays. I got it working with indexed array.
one)){ $one = $test->one; $one = " abc ".$one; $test->one = $one; } else{ $test->one = "hello"; } $this->view->test = $test->one; if(!empty($test->sal)){ $sal = $test->sal; $pos = rand(0, 9); $sal[$pos] = rand(30000, 170000); $test->sal = $sal; } else{ $arr = array(); for($i=0; $i<10; $i++){ $arr[$i] = 1; } $test->sal = $arr; } $this->view->sal = $test->sal; } } Posted by Markus Hausammann (tharkun) on 2011-07-21T15:06:43.000+0000 This is actually a bug in PHP, $\_REQUEST does not contain $\_COOKIE anymore. The php.ini setting request\_order = "GPC" fixes the problem. Posted by Markus Hausammann (tharkun) on 2011-07-21T15:09:06.000+0000 see also