I have a large PHP application. After I changed some settings I get a redirection loop (i.e. the browser is redirected to the same page over and over again).
The problem is that I don’t know which command (which line in which PHP file) in this application causes the redirect. Is there a way to trace calls to the header() function? Or – even better – is there a way to trace redirects in PHP?
Thanks in advance,
Michel
You can use XDebug and its function-trace capabilities for that. http://xdebug.org/docs/execution_trace says:
Once you’ve found the call you can step into the code and execute it step by step. You’ll need a frontend for XDebug then, e.g. netbeans.