I'm using LAMP and Zend for server side web dev. In my sign up process I have one step the user must pass after submitting the sign up form and before he gets his private user page.
After form validation the user gets a session and is redirected to "step 1", then to it's private account. When step1.php calls, it checks that this user has identity (Zend) and if so the page loads, if not the user gets redirect to login.php.
This process works perfectly on the server (online) but locally the user gets redirect as if the sessions hasn't authenticated.
The code is exactly the same between local and online server but yet locally I can't get the session. MySQL works properly. What I did notice is a difference between the PHP modules that are enabled. Below is the execution code and the php modules that are enabled.
Am I missing something? Thanks!
This get execute after validation is correct:
$user = new Application_Model_User();
$user_id = $user->register($data);
$this->session_join->new = 1;
if($user_id > 0){
$user->id= $user_id;
$user->load();
$auth = Zend_Auth::getInstance();
$this->_redirect('/user/step1/');
Then step1 is being called:
public function step1Action()
{
if(!Zend_Auth::getInstance()->hasIdentity()){
$this->_redirect("/user/login");
} else {
do something and continue to user account page
}
}
Locally Loaded Modules: core mod_log_config mod_logio prefork http_core mod_so mod_alias mod_auth_basic mod_auth_mysql mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dav mod_dav_svn mod_authz_svn mod_deflate mod_dir mod_env mod_expires mod_mime mod_negotiation mod_php5 mod_reqtimeout mod_rewrite mod_setenvif mod_status