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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:48:08+00:00 2026-06-09T13:48:08+00:00

I have a load of ZF1 salted hash elements in various forms on my

  • 0

I have a load of ZF1 salted hash elements in various forms on my site and 99% of the time they work fine but occasionally they fail. This usually seems to happen after a redirect but not within the redirect hop. The form is created after the redirect in a separate action so I don’t understand why the redirect would be affecting it. The forms that fail are generating their tokens correctly, they just don’t match after the POST and validation.

Any ideas?

Hash element below:

$token = $this->createElement(
    'hash', 
    'token', 
    array('timeout' => 1440)
);

$token->setSalt($config->csrf->salt)
      ->addErrorMessage('The session for this form has timed out.');

$this->addElement($token);
  • 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-06-09T13:48:10+00:00Added an answer on June 9, 2026 at 1:48 pm

    It turns out that the issue was due to token naming. I had a standard hash element named ‘token’ that was added to all forms. I changed the code so that the token name was prepended with the form name so rather than ‘token’ they are now ‘loginformtoken’, etc.

    I’m still not sure if this was due to an issue in my code due to redirects or whether ZF uses an internal ‘token’ session anywhere (the word token seems to be fairly heavily used in the ZF source code) that was causing a conflict.

    Nevertheless, using unique hash ids seems to be the way forward and I’ll be following this standard in the future.

    Edit:

    This was my fault completely for not reading the manual:

    The name of the hash element should be unique. We recommend using the salt option for the element- two hashes with same names and different salts would not collide.

    I had a default salt and the same hash name so no wonder I was having problems.

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

Sidebar

Related Questions

I have baked load of files and in the web browser they work fine.
i have tried load and hebrew didn't work for me so i changed my
I have come across a strange problem with Zend_Framework, I can not load forms
I have to load set of questions to MYSQL database table.But the table format
I have 2 tables that I need to load together all the time, the
I have to load .tiff file I did with both Image.FromFile() and Bitmap.FromFile() But
I have two forms in a visual C# forms application. I want to load
I have a load of deleted files I want to commit. But I don't
I have load custom module of mobile number in my magento site. When i
We have a load test that runs of 100 concurrent users. We also have

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.