Closed GoogleCodeExporter closed 9 years ago
getallheaders is a php builtin and it works fine here. What version of php are
you
running? It looks like you might need php4.3 or newer for it.
Original comment by nip...@gmail.com
on 18 Sep 2008 at 1:50
Im running PHP5 (FastCGI)....
Original comment by twa8...@yahoo.com
on 18 Sep 2008 at 6:50
sorry, no idea about that for now, will eventually ask to some PHP specialist at
Smile as soon as I can. Anyone?
Original comment by rva...@gmail.com
on 18 Sep 2008 at 8:12
The only thing I can suggest is post the output of phpinfo(). You must have some
difference in your configuration, possibly due to using fastcgi
Original comment by nip...@gmail.com
on 19 Sep 2008 at 1:45
[deleted comment]
FOUND MY ANSWER:
According to the PHP documentation, when PHP is running as a CGI, the function
getallheaders() is not available.
You can still get almost all server and environmental variables with the CGI
version
though. See phpinfo() to see which vars PHP has access to. Also see the list of
predefined variables that PHP has access to.
Original comment by twa8...@yahoo.com
on 19 Sep 2008 at 8:10
[deleted comment]
And i found a fix. Just add this code right before the call to getallheaders
if (!function_exists('getallheaders')) {
function 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;
}
}
This is probably something that could be added the code incase anyone else is
running CGI???
Original comment by twa8...@yahoo.com
on 19 Sep 2008 at 8:17
Hi, thank you for the fix, I'll commit that patch, it sounds very reasonnable.
Actually, that getallheaders is just a dirty test to have the same PHP page be
able
to either deal with an XML/RPC request or with a regular browser HTTP GET
method so
anyone can ensure the connector as been installed at the right place, with the
proper
PHP version and we can bootstrap Magento. So thank you.
Original comment by rva...@gmail.com
on 19 Sep 2008 at 9:22
Original comment by rva...@gmail.com
on 19 Sep 2008 at 9:30
Original comment by GrouhPamart
on 26 Sep 2008 at 5:40
Original issue reported on code.google.com by
twa8...@yahoo.com
on 18 Sep 2008 at 8:39