ID: 31271 Updated by: [EMAIL PROTECTED] Reported By: gary dot every at ingramentertainment dot com -Status: Open +Status: Feedback Bug Type: OpenSSL related Operating System: Gentoo Linux PHP Version: 4.3.10 New Comment:
Are you sure you didn't change anything else? $_SERVER variables are set by your web server, not by PHP. So I would be surprised if just changing PHP and not anything related to whatever web server you are using would affect this. Previous Comments: ------------------------------------------------------------------------ [2004-12-23 18:22:30] gary dot every at ingramentertainment dot com Description: ------------ I've been using $_SERVER['SSL_PROTOCOL_VERSION'] since php3 and after updating from 4.3.6 to 4.3.10 that particular variable is no longer available. We've been using it to check to see if the user is currently on our https: site, and if not, redirect them to it. I've overcome the issue, but it took some head-scratching. Below is the source, both what I had, and what I needed to do to fix it: Reproduce code: --------------- if(!isset($_SERVER['SSL_PROTOCOL_VERSION'])) { Header("Location: https://www.url.com"); } // Code that replaced it if($_SERVER['SERVER_PORT'] != 443) { Header("Location: https://www.url.com"); } Expected result: ---------------- Was expecting the SSL_PROTOCOL_VERSION to be set once they were on the https site, but it didn't, which put me in an endless loop attempting to redirect to the https site. Actual result: -------------- Again, put me in an endless loop because $_SERVER['SSL_PROTOCOL_VERSION'] was never set. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31271&edit=1