Author: joerg
Description:
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';
Version: 1.3.x
Severity: normal
OS: Linux
Platform: PC