wendyanas / google-checkout-php-sample-code

Automatically exported from code.google.com/p/google-checkout-php-sample-code
0 stars 0 forks source link

getallheaders() function not on CGI servers #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. on a server without PHP installed as an Apache module (like using suphp
or something), getallheaders() does not work. This function is used on line
53 of the responsehandlerdemo.php file.

What is the expected output? What do you see instead?
There is an error that says the function does not exist. 

What version of the product are you using? On what operating system?
v1.3RC2 on CentOS 4.4 linux

Please provide any additional information below.
This has been corrected in the PHP zencart version, but not in this

Original issue reported on code.google.com by coleman...@yahoo.com on 26 Apr 2007 at 5:14

GoogleCodeExporter commented 8 years ago
Sorry, I didn't put my correct version of the product. This is it:
google-checkout-php-sample-code-v1.1.2.zip

Original comment by coleman...@yahoo.com on 26 Apr 2007 at 5:16

GoogleCodeExporter commented 8 years ago
I have the same problem, added the following function to the file and sintead 
get an
error on line 102 of xmlparser.hp

And even better one, that absolutely mimics getallheaders behaviour (including
keynames - first character in each word is uppercase and words separated with 
'-'
instead of underscore), and still does not use regexp:
<?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;
}
?>

Original comment by neomaxim...@gmail.com on 8 May 2007 at 10:25

GoogleCodeExporter commented 8 years ago
function removed in v1.2

http://google-checkout-php-sample-code.googlecode.com/svn/branches/1.2beta/CHANG
ELOG

ropu

Original comment by rovagn...@gmail.com on 13 Jun 2007 at 4:24