I've got a CakePHP site that is stuck in a redirect loop. I've removed every piece of code that does a redirect & I've turned off autoRedirect on the Auth object.
This occurred when I logged out of the site and has persisted even after deleting all cookies and just trying to load the homepage. The index action is in $this->Auth->allow
.
I should not, it keeps trying to redirect me to /users/login which then redirect loops. The login action is also in the allowed list
Does anyone have any ideas what could cause this?
Your <cake>/app/app_controller
should have a beforeFilter()
method with all behaviors of Auth component. One of those behaviors is where to send when a user is not logged in.
you will be looking for something like:
// If cake should redirect automatically or you will do it in the User.login()
$this->Auth->autoRedirect = true;
// And if the autoRedirect is true, where to redirect
$this->Auth->loginRedirect = '/user/login';
G'luck
This also occurs in CakePHP 1.3 if you add a custom component that extends Component instead of Object.
hey sometimes, if you db connection are wrong,,, the application will be trying connect to the mysql, and will be in looping. So, look allways if the database config are right.
good bye.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With