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 6071485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:03:09+00:00 2026-05-23T10:03:09+00:00

I was trying to use jQuery.address plugin, to create some deep linking. But as

  • 0

I was trying to use jQuery.address plugin, to create some deep linking. But as soon as I started .change() function and launched a javascript, my backend PHP application would log me out.

I deduced, that this must be because every ajax request I launch seems to be regenerating the session_id.

If I try to echo the session id from preDispatch the sessionId is the same as from the window that launched the request.

If I try to echo it from postDispatch it has already changed to something else, and when I refresh the main window, the main windows sessionId has changed too.

What could be setting it?

EDIT 26-06-2011 12:00

I have found the code that seems to break my application.

After I have reloaded the page with the hash (#), I use a function inside $.address.change() function to find out which state to load. Since I have only gotten to work with one of the 3 panels I have in my app, it just checks one parameter like this:

urlVar=this.path();
resArray = urlVar.split('/');
urlVariable = resArray.shift();
if (typeof urlVariable != "undefined") {
   f.selectFromLeftPanel(urlVariable);
}

And in the selectFromLeftPanel() goes something like this:

if (typeof context == "object") {
            var itemId = $(context).attr('id');
            $("#" + itemId).addClass('loading');
            Frontpage.closePanes();
            $.address.value(itemId);
        } else if (typeof context == "string") {
            itemId = context;
        }

        switch (itemId) {
        case 'zebra_left_window_forms':
            c.log($(this));
            Frontpage.resetPane(Frontpage.firstPane);
            Frontpage.getPaneContent(Frontpage.startCategory,
                    Frontpage.firstPane, 'category', function() {

                        f.showPane(Frontpage.firstPane, itemId);

                    });
            f.setSelected(context, f.zeroPane);
            break;
             }

The pane‘s are just columns I am using to hide/show different areas with content. the getPaneContent() function is where the ajax call is made, like this:

$.get(Frontpage.BASEURL + data + "/rand/" + rand + "/value/"
                    + value + "/time/" + Math.random(), function(result) {
                Frontpage.resetPane(pane);
                var $newrow = $(into).find('div:first');
                // c.log($newrow);

                $($newrow).after(result);
                var retValue = $('#returnData', pane).html();
                c.log(retValue);
                $('#returnData', pane).remove();
                $('#zebra_content_pane_back_button').attr('href', retValue);
                $('#zebra_content_pane_back_button').attr('rel', retValue);
                Frontpage.hideBackButton();
                if (callbackFn) {
                    if (typeof callbackFn == 'function') {
                        callbackFn.call(this);

                    }

                }
                delete result;
            });

Ok, now more in detail about the problem itself:

What happens is, that while making the ajax request, the session data is somehow lost. Since the app user MUST be logged into the system to do anything, the login screen is shown after the getPaneContent() function has been called, therefore after the ajax call has been made. I tested this with a section of my page, that I made not to ask for the session, and I saw, that the session was empty. Since I don’t clean the data out, and the timeout for the session has not happened yet, it must be, that the session id is somehow changed while doing the Ajax request, and thus the new session ID does not have any data associated with it.

Now, the problem – If I don’t use the jQuery.address plugin, the logouts don’t happen . The ajax works just fine, but each ajax response has a Set-Cookie header set, that changes the main screens Session ID. I do think, that this could somehow be involved in the problem. How do I avoid the logouts?

Also, the logouts only happen, if I call the f.selectFromLeftPanel() from the $.address.change() function. If I ommit this call, the ajax works, the session ID still changes, but no logouts.

  • 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-23T10:03:10+00:00Added an answer on May 23, 2026 at 10:03 am

    It seems, that I have found the solution.

    During the ajax request, I was calling a class that extended Zend_Auth, which I used to determine the user. Well, in the init() function of this extending class, I was calling Zend_Session::rememberMe(60 * 60 * 24 * 7) , because I thought that what this does is extend the life span of my session, while in reality, it generates a new session that receives this new lifespan.

    Although I have solved this problem, it makes me wonder, why it wasn’t failing before, and why it started failing now.

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

Sidebar

Related Questions

I'm trying to understand how to use the jQuery address plugin for handling deep
I am trying to use the Address plugin from http://www.asual.com/jquery/address/ and I really need
Trying to use JQuery Easing plugin in my wordpress but its giving me following
I'm trying to use jQuery.scrollTo plugin with accordion (where one block expands after clicking
I am trying to use jquery autocomplete plugin, I want it to suggest ItemCodes
im trying to use jquery bbq for remembering page with ajax. but i wonder,
I'm trying to use Ben Keen's RSV Jquery plug-in to validate an e-mail address
I am trying to use this plugin: http://docs.jquery.com/Plugins/Validation Where #user_new is the id for
I´m trying to use jQuery-UI´s dialog to create a confirmation dialog attached to a
I'm trying to read up on the jQuery plugin jqGrid but I'm running short

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.