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

  • SEARCH
  • Home
  • 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 495565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:36:19+00:00 2026-05-13T05:36:19+00:00

I am using Zend Framework and 3rd party application written in php for file

  • 0

I am using Zend Framework and 3rd party application written in php for file upload.
Upload process is ajax like, and I have annoying problem probably caused by this app.

Problem is that upload application somehow destroys my Zend_Session!

Here is the error which I am getting (with firebug console):

http://pastie.org/738834

And this is code in my ZF controller which works fine, but after the error displayed abbove, If I go to this controller I will be redirected to google.com

public function init()
    {
        $this->_projects = new Projects();
        $this->_memberSes = new Zend_Session_Namespace('MyMember');
    }

    public function preDispatch()
    {
        $member = $this->_memberSes->member;

        if ($member==null){
            $this->_redirect('http://www.google.com');
        }
    }

Problematic code in 3rd party app looks like this:
http://pastie.org/738837

I know that my question isn’t perfectly clear, but I am out of ideas and any kind of help means to me a lot!
Thanks.

  • 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-13T05:36:20+00:00Added an answer on May 13, 2026 at 5:36 am

    This is what’s happening:

    1. A object instance of class ObjectClass is being serialized to the session.
    2. On request shutdown, the session text is stored.
    3. On the next request, the session text is retrieved and unserialized.
    4. But, when PHP tries to unserialize your object, it doesn’t know about ObjectClass, because the ObjectClass class file wasn’t included this request, just last request when it was created. It lost the blueprint, so to speak.

    So, figure out which class is being stuffed into the session, and ensure that you include it every request, just in case.

    Edit:
    Or, as Nicky said, autoloader may help here:

    require_once 'Zend/Loader/Autoloader.php';
    $autoloader = Zend_Loader_Autoloader::getInstance();
    $autoloader->registerNamespace('MyApp_');
    $autoloader->setFallbackAutoloader(true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP MVC application using Zend Framework. As presented in the quickstart,
I'm using a traditional Zend framework application generated using Zend tool . I have
I have PHP project and I am using Zend Framework. There is a library
Hi all I am using Zend framework for my PHP project. Basically I have
i am using zend framework for my application and i have used few regex
So I'm using zend framework and I have this code in a file called
I'm using Zend Framework and MySQL. The users of my application will have the
I am using zend framework with PHP to develop a web application where I
Im using Zend Framework ..in one of my phtml file's i have this code
I'm currently using Zend Framework 2 beta for on PHP 5.4.4 to develop a

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.