I'm installing a widely used PHP package onto a hosted linux webserver that I've noted has:
HTTP Response Headers
X-Powered-By PHP/4.2.2
X-Accelerated-By PHPA/1.3.3r2
Connection close
Content-Type text/html
expose_php On
extension_dir ./
The connection being set to close will cause problems, I believe.
Now, my code has redirects all through it coded in a function like:
function redirect($url, $delay)
{
echo "<meta http-equiv='refresh' content='{$delay}; url={$url}' />";
echo "<script>location.replace('{$url}');</script>"; // To cope with Mozilla bug
die;
}
What I'm seeing is that a page banner is output, then some database work is done and then, all being well, a redirect is issued.
Sometimes it works, sometimes it doesn't.
When it doesn't the banner doesn't complete parsing, it's almost like it's threaded - because allthough the banner isn't complete the save will be done and that code is after the print header.
The same banner is used all over the place and I'd be very surprised if the problem lay there. However if the redirect function was the problem I'd expect to see it when I viewed the source. Instead there's nothing there.
Does anyone have an idea what's happening?
Because this package is likely to be upgraded over time it's in my best interest to keep the mods to a minimum - so I'd like to get this at the source rather than recoding every script that processes a form.
I can pm you a link to the site and the phpinfo() script.