I've run into a problem on a server running php 5.1.6 - the code i use to detect ajax requests isn't working as the $_SERVER['HTTP_X_REQUESTED_WITH'] variable is missing from the $_SERVER array. The same code works fine on php 5.2 and in firebug i can see the headers include X-Requested-With XMLHttpRequest. Anyone know any more about this issue and how I can get round it? Thanks in advance.
You are having some kind of a redirect either in your files or in your .htaccess that clears this header.
Since php is installed as an apache module you can use apache_request_headers() for debugging purposes.
Does the header show up in debuglog.txt
when you add
function dbgLogRequest() {
$s = date('Y-m-d H:i:s') . "
request headers";
foreach( apache_request_headers() as $name=>$value ) {
$s .= "
$name: $value";
}
$s .= "
____
";
file_put_contents('debuglog.txt', $s, FILE_APPEND);
}
dbgLogRequest();
to your code?
The only things I can dig up are:
Thats all... Not much else out there...