Hi all. I've recently change my php set up such that register_globals is OFF, but now after going through and changing vars such as $SERVER_PROTOCOL and $SERVER_NAME to their $_SERVER['var'] counterparts I'm getting a very strange problem.
Here's the error message:
Parse error: parse error, expecting ','' or';'' in /u1/trng/gateway/_classes/site/site.inc.php on line 104
Here's lines 103-107:
103: function getServer() {
104: global $_SERVER['SERVER_PROTOCOL'];
105: global $_SERVER['SERVER_NAME'];
106: return $this->server = strtolower(substr($_SERVER['SERVER_PROTOCOL'],0,strpos($_SERVER['SERVER_PROTOCOL'],"/")))."://".$_SERVER['SERVER_NAME'];
107: }
Can anyone see what the problem is? Both global declarations are terminated by semi-colons, and I've changed nothing other than how I refer to the server vars.
Appologies for the code wrapping on the return within the function (line 106). For some reason no matter what I put there it wraps 2 characters after the '0,' on the return line, but in the source it's not an issue.
Thanks in advance,
Pablo