Hi, I am getting following error while running script: Fatal error: Call to undefined function: getallheaders() ... in script I am using Apache/1.3.37 & PHP 4.4.4. I read in forums that problem is that php is not installed as a Apache Module. If this is the reason, how can I solve the problem? If any other problem then also suggest solution. Thanks in advance.
On php.net I found the following alternative to getallheaders() : <?php function emu_getallheaders() { foreach($_SERVER as $name => $value) if(substr($name, 0, 5) == 'HTTP_') $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; return $headers; } ?> PHP: ...so if you declare this function you can use emu_getallheaders() instead of getallheaders().
What exactly do you need ? SERVER variables are also available in $_SERVER, even if PHP isn't an apache module.