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
views:
58answers:
3
+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
2010-02-08 08:48:19
A:
You should use a logging framework and you can use headers_list() to get the headers.
Bernd Ott
2010-02-08 08:55:14
A:
try running your webbrowser through paros proxy. You can see any kind of header sent between client and server
Esben Skov Pedersen
2010-02-08 08:55:38