tags:

views:

58

answers:

3

I'm having a problem where my script is redirecting to a location using header(). However, it's a headache to debug this since I have so many functions that send headers. Is there any debug feature in PHP that allows me to follow the headers? Thanks

+2  A: 

No, a quick way would be to install APD and replace/hook the header function

take a look at the override_function it would permit to define your own header function with some logging.

a brute force solution would be also to replace all the header( by header2( for example so you can write your own function with some trace.

Warning: don't do this on your production machine because APD have a big performance impact.

RageZ
A: 

You should use a logging framework and you can use headers_list() to get the headers.

Bernd Ott
A: 

try running your webbrowser through paros proxy. You can see any kind of header sent between client and server

Esben Skov Pedersen