Hi Matt,
Are you working with iframes, and testing in IE 7? There is a
bug/security feature in IE 7, when working with sessions and iframes ...
Best,
--
Andries Seutens
http://andries.systray.be
Darby Felton schreef:
Hi Matt,
It's hard to say what might be the problem in your situation without
additional information. Try the following script:
<?php
error_reporting(E_ALL | E_STRICT);
require_once 'Zend/Session.php';
Zend_Session::start();
if (!isset($_SESSION['auth']['user'])) {
echo 'set user';
$_SESSION['auth']['user'] = 'someuser';
} else {
echo 'username exists: ' . $_SESSION['auth']['user'];
}
?>
The above should cause the text "set user" to appear on the first
request. Subsequent requests should cause the text "username exists:
someuser" to appear. If this works as expected for you, then I would
call into question the application logic.
Best regards,
Darby
Matt Needles wrote:
I am seeing a strange behavior using zend session. Here is what I have
in my bootstrap:
require( 'Zend/Session.php' );
Zend_Session::start();
On the login page, I am storing user-id in session (my own
implementation, not using zend-auth):
$_SESSION[ 'auth' ][ 'user' ] = $id;
I can print_r the session on the login page and see the value is
assigned. On surfing to another page, I see the value assigned to
session->auth->user above is gone and the page is getting redirected to
the login page again. What am i doing worng?
Thanks,
matt
Gecontroleerd op virussen door de JOJO Secure Gateway.