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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:34:30+00:00 2026-05-17T19:34:30+00:00

I have a CakePHP website that’s been working great. I just developed a new

  • 0

I have a CakePHP website that’s been working great.

I just developed a new functionality that at one point auto-logs the user in, and redirects him to a page that’s behind the login wall.

This works perfectly well in my dev machine, but in production, the user gets redirected to the login page.

Relevant code: (not much)

    $objCustomer = $this->Customer->findById($customerId);
    $this->Auth->login($objCustomer);
    $this->redirect("/customers/signup");

Customer is the Model that’s used for authentication.

In the server, I see that I AM getting redirected to /customers/signup, and that redirects me to /customers/login

The thing that confuses me the most is that this works perfectly in my machine.

I dumped the return value of Auth->Login in the server, and it returns 1, so in theory everything is fine and the user should’ve been logged in.

Some things I can think of that are different between my machine and the server:

  • Dev machine is Windows, Server is Linux. This sometimes introduces case-sensitivity issues, but the signup method i’m redirecting to is all lowercase, I don’t see where there could be such a problem here.
  • Dev machine is IIS, Server is LiteSpeed. Maybe Litespeed is screwing with something? This would be the first time in over a year running this site in production that i’d find something different because of LiteSpeed
  • Production site is over SSL, dev is not. I don’t see how this could be a problem.

Any ideas are infinitely welcome!

Thank you!

  • 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-17T19:34:30+00:00Added an answer on May 17, 2026 at 7:34 pm

    After a LOOOONG process of trying different weird things, it turns out it all boils down to this:

    ini_set('session.referer_check', $this->host);
    

    That’s part of CakePHP’s standard security features… It sets that INI setting.

    If the request made to the action that’ll call Auth->login is coming from another host (domain/subdomain/whatever), PHP will consider the session invalid, which effectively kills the auto-login attempt.

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

Sidebar

Related Questions

I've got a model in CakePHP that doesn't have a table, called Upload. I've
Before starting, note that I have to update a website that is not mine,
I am building a website in CakePHP that processes files uploaded though an XML-RPC
I am developing a travels related website using cakephp. I have to put some
I was trying develop a website with Cakephp and Joomla... But lately I've been
I am creating a website in CakePHP and I am kind of new on
I have a website written in PHP (CakePHP) where certain resource intensive tasks are
I want to have an application that displays all of my website's external links
I have a CakePHP 1.2 application. I'm running into the case where I need
Have just started using Google Chrome , and noticed in parts of our site,

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.