$_SERVER['HTTPS']

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

$_SERVER['HTTPS']

Post by net7 »

Code: Select all

$_SERVERї'HTTPS']
creats an error

Code: Select all

Notice: Undefined index: HTTPS in C:\Apache\Apache2\htdocs\admin\admin_functions.inc on line 92
Help please-- I think I have had this working before, but if not do you know how to get the HTTPS variable working? Or how to access it maybe..
bionicdonkey
Forum Contributor
Posts: 132
Joined: Fri Jan 31, 2003 2:28 am
Location: Sydney, Australia
Contact:

Post by bionicdonkey »

i don't think HTTP is an index (it's not in the manual). what did you need to access it for?
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

Post by net7 »

Well thats the way it was written in my O'Reilly Programming PHP book. However I think thats a bit old. I managed to figure out that..

1.) My server didn't have SSL installed on it =/
2.) That was the incorrect way to find if HTTPS was on

I figured out that the SSL port (after installing it) was 443, so I'd check the port of the visitor's connection to the server, if it was not 443 then they were to be directed back to an https:// address. :)
Post Reply