From: gary dot every at ingramentertainment dot com Operating system: Gentoo Linux PHP version: 4.3.10 PHP Bug Type: OpenSSL related Bug description: $_SERVER no longer contains SSL_PROTOCOL_VERSION
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 bug report at http://bugs.php.net/?id=31271&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31271&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31271&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31271&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31271&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31271&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31271&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31271&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31271&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31271&r=support Expected behavior: http://bugs.php.net/fix.php?id=31271&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31271&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31271&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31271&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31271&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31271&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31271&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31271&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31271&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31271&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31271&r=mysqlcfg