Quote Originally Posted by nabrown78 View Post
Hi All.
I saw one other person post with this issue, but no real solution. Everything is working fine with my Google checkout, but on an empty shopping cart page, I get the following error and a greyed-out GCO button:
Code:
Fatal error:  Cannot redeclare selfurl() (previously declared in /home/sally/public_html/store/googlecheckout/gcheckout.php:38) in /home/sally/public_html/store/googlecheckout/gcheckout.php on line 42
I have done searched the code of the entire site, and there is only one declaration of selfURL().

Any ideas?

Thanks for any help...
Hi nabrown

i don'y really know the cause of the issue

but this should solve it

replace in googlecheckout/gcheckout.php 38

PHP Code:
   function selfURL() { 
      
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" ""
      
$protocol strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s
      
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); 
      return 
$protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; 
    } 
with this

PHP Code:
  if (!function_exists('selfURL')) {
    function 
selfURL() { 
      
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" ""
      
$protocol strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s
      
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); 
      return 
$protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; 
    }
  } 
please send your feedbacks

hope this helps

ropu