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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:08:10+00:00 2026-05-13T18:08:10+00:00

I am using the app_error script to deal with broken links on my site,

  • 0

I am using the app_error script to deal with broken links on my site, and in the error404() action I write a session value like this:

$this->controller->Session->write("visitor", $visitorId);

This all works as I can successfully read the session back if I reload app_error.
Once I have written this session value I redirect to a controller:

$this->controller->redirect($redirectURL,301);      

What I am then trying to do is to check this session value in the beforeFilter() callback in app_controller, but it just doesn’t seem to be able to detect this value. Ive tried

$this->Session->read("visitor");

and it does not retrieve anything. I’ve also tried the check method.

Can anyone see anything obvious here? I have debug set to 0 (production) so it uses the error404() by default.

  • 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-13T18:08:10+00:00Added an answer on May 13, 2026 at 6:08 pm

    Hrmm. Is your whole session being destroyed or are you not able to read that one index? I’m assuming your whole session is being destroyed. Is the page you are redirecting to on the same domain (and subdomain, if applicable)? Most of the time when I have a problem like this it has to do with cake aggressively destroying the session, especially if your Security.level is set to high/medium.

    If your session is indeed being destroyed make sure that the both domains are the same. If this is already the case try moving your security level to low to make sure you’re not being caught by the session.referer_check.

    Otherwise you should definitely be able to read from the session in the beforeFilter().

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

Sidebar

Related Questions

I have been using this script for a while and suddenly it just stopped
I am using C# and a console app and I am using this script
I'm making Liquibase migration using groovy script. I have a code like def migrate()
I keep getting this error when using django templates in Google App Engine: TemplateSyntaxError:
Having this errors when trying to compile/run my app using Maven. I've succeeded to
I'm using App Engine, SDK 1.6.3 with Python 2.7. I've created a model like
I'm using a PHP script to read an RSS feed in my Flex 4
I am using the following script http://stuporglue.org/recieve-e-mail-and-save-attachments-with-a-php-script/ to handle my emails that get sent
I'm trying to make a HTTP request from a Adobe Illustrator Script (this question
I have to call the web service using java script? e.g. I'm creating one

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.