Last modified: 2010-05-15 15:27:00 UTC
Wikimedia is installed on a virtual host with SSL enabled: https://wiki.server.com. This works fine so far, but when clicking on Save after editing an article, the server returns a "Invalid request" and the scheme shows "http" instead of "https" (however the article is saved and putting an "s" behind the http helps to continue). The problem seems to be the $_SERVER['HTTPS'] check in DefaultSettings.php which apparently doesn't work (we're running Apache 2.0.52 and PHP 4.3.10 on Gentoo Linux). After some changes (see below) it works fine now by using the port as criterium for https detection (s. code). Also I added the prefix $wgServer in the line $wgScriptPath = $wgServer . '/wiki'; because it was missing. Changes in DefaultSettings.php: # check if server use https: if ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT']==443)) { $wgProto = 'https'; } else { $wgProto = 'http'; } # original statement # $wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
That works for me too, except that I have to use the string "ON" (capitalized) for comparison, as that's what my PHP engine provides.
Works with 1.6alpha, should work with 1.5 series too