Dave M G wrote:
In LocalSettings.php, I've set the $wgScriptPath
as so:
$wgScriptPath = dirname($_SERVER[PHP_SELF]);
Right under it, so that I could verify that the variable is being set to
what I want it to return, I put right underneath:
echo "<br />" . $wgScriptPath . "<br/>";
This should make it so that the contents of $wgScriptPath appear
somewhere near the top of the page when I go to the top page of my
MediaWiki. And it does. But, that reveals that the contents of
$wgScriptPath are:
/web_sites/gutteridge.info/web/index.php
Do you think this is because $_SERVER["PHP_SELF"] contains the additional
client-supplied path components after index.php, and is therefore removing eg
"/Main_Page" from the end? This would be my guess.
PHP_SELF isn't totally reliable as it seems to take the URL as sent from the
client, not the path to the script itself. I'm not 100% sure there is a reliable
one, but look elsewhere in $_SERVER for other variables or follow the other
several suggestions I gave you.
-- brion vibber (brion @
pobox.com)