I've just installed wamp on a windows 8 PC, with php 5.4. Prior to this new PC, I was using windows 7 with php 5.3

The below code causes errors on localhost using windows 8, wamp, php5.4 (the code works on windows7 localhost wamp php 5.3)
SCREAM error suppression ignored . . .
Undefined index HTTPS

I don't know if the error is from using windows 8 or from php 5.4.3 instead of php
Or that my code is bad and that my old machine doesn't see it.
The code works perfect online.

To get MyPhpAdmin to work on localhost, I had to modify either phpmyadmin.conf (by putting allow from ::1) or httpd.conf (by putting listen to
I've tried both and it doesn't seem to affect what happens with the below code.

TIA for any help

PHP Code:
//function curPageURL() {
$pageURL 'http';
if (
$_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if (
$_SERVER["SERVER_PORT"] != "80") {
} else {
//return $pageURL;