I'd really appreciate any help from anyone on this one. I've moved scripts from one server (Red Had Linux) to another (Mac OS X Panther Server 10.3.6), both running PHP 4.3.2. I've scoured PHP documentation and haven't been able to find what's wrong with this code. There are no other errors.
Running: PHP 4.3.2, Apache 1.3.29, MySQL 4.0.18. Register_globals is Off.
I'm getting this error with the code that follows:
Parse error: parse error in /Library/WebServer/Documents/gsi/include/session.php on line 2
Here's the code:
<?php
IF ($site_secure=="YES" AND {$SERVER["SERVER_PORT"]}!=443){
$destination="https://".{$SERVER["HTTP_HOST"]}.{$_SERVER["REQUEST_URI"]};
header('Location: $destination');
exit;
}
IF ($site_secure=="NO" AND {$SERVER["SERVER_PORT"]}!=80){
$destination="http://".{$SERVER["HTTP_HOST"]}.{$_SERVER["REQUEST_URI"]};
header('Location: $destination');
exit;
}
?>
Thanks.