2
Ok. So I have a number of domains that use the same XOOPS installation. Based on a post many, many months ago, I setup multiple mainfile.php files for each domain name and then used the following setup for 'mainfile.php':
if (!(isset($serverName)))
{
$serverName = $SERVER_NAME;
$serverName = str_replace("www.","",$serverName);
$serverName = str_replace(".com","",$serverName);
$serverName = str_replace(".net","",$serverName);
$serverName = str_replace(".org","",$serverName);
}
if (!(empty($serverName)))
{
include($serverName.".mainfile.php");
}
?>
~
All of a sudden, that stopped working. I cannot figure out why. I then changed
$serverName = $SERVER_NAME;
to
$serverName = $_SERVER['SERVER_NAME'];
and now everything functions perfectly again. --shrug-- It puzzles me that everything worked fine for months and then it went haywire. Oh well, at least it works now.