Terry Woods
asked on
Diagnosing the cause of a redirect loop in a CodeIgniter app
I seem to have a redirect loop in my app, and I'm trying to track down the cause.
My controller home.php is the default controller for my app, and contains:
The dbglog() call is just debugging to a log file. When I add debugging to the auth controller login function, it doesn't get output.
The word "redirecting" is written to my log file 21 times before an error is displayed by Chrome. Firefox doesn't seem to detect the problem (the page doesn't load; it just keeps trying).
Is there some kind of logging I can turn on in CodeIgniter to figure out what's happening?
It's possible the issue is with Apache, in which case I'll need to try to find out what logging is done by that, and where it gets written to. I'm using a (shared) corporate Linux server.
My controller home.php is the default controller for my app, and contains:
function index()
{
if (!$this->tank_auth->is_logged_in()) {
dbglog('redirecting');
redirect('/auth/login/');
} else {
The dbglog() call is just debugging to a log file. When I add debugging to the auth controller login function, it doesn't get output.
The word "redirecting" is written to my log file 21 times before an error is displayed by Chrome. Firefox doesn't seem to detect the problem (the page doesn't load; it just keeps trying).
Is there some kind of logging I can turn on in CodeIgniter to figure out what's happening?
It's possible the issue is with Apache, in which case I'll need to try to find out what logging is done by that, and where it gets written to. I'm using a (shared) corporate Linux server.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I have solved this issue by setting the value of "$config['sess_encrypt_coo kie']" to "TRUE"
In my case it’s due to sanitizing of cookie values by security class.
But Encryption of cookie data solves the problem.
In my case it’s due to sanitizing of cookie values by security class.
But Encryption of cookie data solves the problem.
ASKER