Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5959663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:43:01+00:00 2026-05-22T18:43:01+00:00

I am using sessions in zend framework. the question is i need to know

  • 0

I am using sessions in zend framework.

the question is i need to know is there a difference between

new Zend_Session_Namespace("default");

and

new Zend_Session_Namespace("Default");

in my application, I have used both, it seems the code is not working correctly,
if there is a difference, what is the correct one to use.

here is my code

<?php
class Admin_DashboardController extends Zend_Controller_Action
{
    function init()
    {
        //
    }


    /**
     * Add hotelId to default session
     * redirect to admin/hotels if hotelId is not avialble  
     */ 
    public function indexAction()
    {       
        $params = $this->getRequest()->getParams();
        $hotelid = NULL;

            $config_session = new Zend_Session_Namespace("default");
            $config_session->hotelid = $params['id'];

        if(isset($params['id']) && !empty($params['id'])){

        }else{

            //redirect user to select hotels page
            $redirector = new Zend_Controller_Action_Helper_Redirector();

            $url = array(
                'action' => 'admin/hotels/index'
            );

            $redirector->gotoRouteAndExit($url);

        }                   
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:43:02+00:00Added an answer on May 22, 2026 at 6:43 pm

    All Zend_Session_Namespace does internally is create a named array inside the $_SESSION superglobal. As array keys in PHP are case sensitive, “Default” and “default” will be treated as separate namespaces.

    You can use whichever one you want, just be consistent if you expect to use the same data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Zend Framework but my question is broadly about sessions /
I need to integrate my no-framework code with my brand new Zend Application. But
I am using Zend Framework and 3rd party application written in php for file
Hi I am having issues with my my sessions using Zend Framework 1.7.6. The
I'm using Zend Framework for PHP and handling sessions with the Zend_Session module. This
In my ASP.NET application using InProc sessions, Session_End calls a static method in another
Hi: I am using the latest version of Zend Framework (1.9.3PL1). I set the
I am working on a project using zend framework, php, mysql on ubuntu. I
I am developing a REST API layer for my application using Zend_Rest_Controller. I have
I'm using zend mail extended with zend_mail_storage_imap and I built an application that looks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.