1
taokrieger
Yikes!!
  • 2004/9/4 2:58

  • taokrieger

  • Just popping in

  • Posts: 36

  • Since: 2002/10/29


What the heck did I do? I'm not sure - I don't remember changing anything on the server and then, all of a sudden, I get this:

WarningFailed opening 'XOOPS_ROOT_PATH/header.php' for inclusion (include_path='.:/usr/share/pear'in /var/www/html/modules/news/index.php on line 29

Warning
Failed opening 'XOOPS_ROOT_PATH/modules/news/class/class.newsstory.php' for inclusion (include_path='.:/usr/share/pear'in /var/www/html/modules/news/index.php on line 30

Fatal error
Call to a member function on a non-object in /var/www/html/modules/news/index.php on line 69

2
taokrieger
Re: Yikes!!
  • 2004/9/4 3:23

  • taokrieger

  • Just popping in

  • Posts: 36

  • Since: 2002/10/29


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.

Login

Who's Online

257 user(s) are online (182 user(s) are browsing Support Forums)


Members: 0


Guests: 257


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits