| Author |
Message |
GuRu
Nuke Soldier


Joined: Apr 09, 2003
Posts: 15
|
Posted:
Wed Apr 09, 2003 8:23 pm |
  |
Alright here's the setup:
Windows 2K SP3
Apache 2.0.45
PHP 4.3.1
MySQL 4.0.12
config.php:
$dbhost = "localhost";
$dbuname = "root";
$dbpass = "******";
$dbname = "nuke";
$prefix = "nuke";
$user_prefix = "nuke";
$dbtype = "MySQL";
Output from analyzer:
http://www.planettrevor.net/zach/analyzer.html
Connect Test Results:
http://www.planettrevor.net/zach/conntest.html
I have also replaced the mainfile.php with the updated file.
Whenever I try to load and of the main pages (Index.php, Admin.php, etc)
And get a blank page with the source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>
Does anybody have any ideas?
PS I know I posted a similar problem in another thread, but this is a completely different os install. Thanks |
|
|
    |
 |
GuRu
Nuke Soldier


Joined: Apr 09, 2003
Posts: 15
|
Posted:
Wed Apr 09, 2003 9:03 pm |
  |
I have also changed the php.ini file as recommended in the Welcome thread. In addition, i have earched extensively and found no solution that solved my problem. |
|
|
    |
 |
Raven
General


Joined: Mar 22, 2003
Posts: 5233
Location: USA
|
Posted:
Thu Apr 10, 2003 2:46 am |
  |
|
    |
 |
GuRu
Nuke Soldier


Joined: Apr 09, 2003
Posts: 15
|
Posted:
Thu Apr 10, 2003 5:41 am |
  |
Yes- When i try to load index.php and then look at the error log. i get this:
[Thu Apr 10 08:41:20 2003] [error] [client 192.168.1.108] PHP Warning: main(language/lang-.php) [<a href='http://www.php.net/function.main'>function.main</a>]: failed to create stream: No such file or directory in C:\web\mainfile.php on line 29
[Thu Apr 10 08:41:20 2003] [error] [client 192.168.1.108] PHP Warning: main() [<a href='http://www.php.net/function.main'>function.main</a>]: Failed opening 'language/lang-.php' for inclusion (include_path='.;c:\php4\pear') in C:\web\mainfile.php on line 29
[Thu Apr 10 08:41:20 2003] [error] [client 192.168.1.108] PHP Fatal error: Call to a member function on a non-object in C:\web\index.php on line 18
Any ideas what these erors are or how to fix them? |
|
|
    |
 |
Raven
General


Joined: Mar 22, 2003
Posts: 5233
Location: USA
|
Posted:
Thu Apr 10, 2003 5:50 am |
  |
| Quote: |
| [Thu Apr 10 08:41:20 2003] [error] [client 192.168.1.108] PHP Fatal error: Call to a member function on a non-object in C:\web\index.php on line 18 |
The above line is where index.php is dying and results in a blank page. What is your line 18 in index.php? |
_________________ Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff |
|
    |
 |
GuRu
Nuke Soldier


Joined: Apr 09, 2003
Posts: 15
|
Posted:
Thu Apr 10, 2003 11:28 am |
  |
Here's the begining of my index.php file:
<?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
require_once("mainfile.php");
$_SERVER['PHP_SELF'] = "modules.php";
$sql = "SELECT main_module from ".$prefix."_main";
$result = $db->sql_query($sql); <---LINE 18
$row = $db->sql_fetchrow($result);
$name = $row[main_module];
$home = 1; |
|
|
    |
 |
GuRu
Nuke Soldier


Joined: Apr 09, 2003
Posts: 15
|
Posted:
Thu Apr 10, 2003 11:40 am |
  |
I just noticed a new problem with phpmyadmin!
I can load index.html just fine. But when i select nuke from he drop down menu, it tries to load a new page and i get a "page can not be displayed error". Upon inspection of the apace error log file, i see this error message:
[Thu Apr 10 14:37:58 2003] [error] [client 192.168.1.108] File does not exist: C:/web/mysqladmin, referer: http://bigfoot/phpmyadmin/main.php?lang=en-iso-8859-1&server=1
Could this be related to my previous error? any Thoughts? |
|
|
    |
 |
Raven
General


Joined: Mar 22, 2003
Posts: 5233
Location: USA
|
Posted:
Thu Apr 10, 2003 1:46 pm |
  |
If this were me, I would install Apache 1.3.27 and verify that the same problem exists. Under windoz it's pretty trivial using the installer. You may discover it's an Apache 2.x issue. Just a thought .... |
_________________ Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff |
|
    |
 |
GuRu
Nuke Soldier


Joined: Apr 09, 2003
Posts: 15
|
Posted:
Thu Apr 10, 2003 2:16 pm |
  |
Nope, same problem with apache 1.3.27 Any other suggestions? |
|
|
    |
 |
Raven
General


Joined: Mar 22, 2003
Posts: 5233
Location: USA
|
Posted:
Thu Apr 10, 2003 2:23 pm |
  |
I just sent you a PM with a suggestion on how to try to debug this. let me know if you want to goto that extreme. |
_________________ Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff |
|
    |
 |
GuRu
Nuke Soldier


Joined: Apr 09, 2003
Posts: 15
|
Posted:
Thu Apr 10, 2003 2:28 pm |
  |
| Raven wrote: |
| I just sent you a PM with a suggestion on how to try to debug this. let me know if you want to goto that extreme. |
*Replied* |
|
|
    |
 |
Raven
General


Joined: Mar 22, 2003
Posts: 5233
Location: USA
|
Posted:
Thu Apr 10, 2003 4:11 pm |
  |
I got it to work, but I'm going to let you figure out which one of the files is causing it. What I did was replace all of your base nuke files with mine and it came right up. I am sending you my base files and if you want you can compare them and determine which one of yours is erring. My guess is, is that it's either index.php or mainfile.php. Let us know
BTW, for the rest of you, Guru zipped his site and I d/l it and put it up on my site, along with his database files, so that I could emulate his setup and debug it from here. |
_________________ Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff |
|
    |
 |
Raven
General


Joined: Mar 22, 2003
Posts: 5233
Location: USA
|
Posted:
Thu Apr 10, 2003 4:58 pm |
  |
There may be/is a 'bug' in the db.php module. I had fixed it originally in my installation, but forgot to bring it to anyone's attention. In db/db.php, lines 42-48, is this code:
| Code: |
if ($forum_admin == 1) {
$the_include = "../../../db";
} elseif ($inside_mod == 1) {
$the_include = "../../db";
} else {
$the_include = "db";
} |
Unfortunately that assumes that you are installing this in your web root, which many do, but many don't. So, you need to modify those lines to be the absolute path. There is probably a more exotic way, but this seems to work and I can't find any security hole (yet anyway). Chatserv and AI, jump in here if this is erroneous. Here is the modification. It's on line 47:
| Code: |
if ($forum_admin == 1) {
$the_include = "../../../db";
} elseif ($inside_mod == 1) {
$the_include = "../../db";
} else {
$the_include = "/your_web_root/nuke/html/db";
} |
Obviously, this will need to change to fit your directory structure.
Note that not everyone has had this issue, but many have. It won't hurt to try this if you experience these symptoms. Here is the symptomatic error messages:
| Code: |
Thu Apr 10 19:24:48 2003] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Call to undefined function: message_die() in C:\web\db\db.php on line 88, referer: http://bigfoot/
[Thu Apr 10 19:24:48 2003] [error] [client xxx.xxx.xxx.xxx] PHP Warning: (null)() [<a href='http://www.php.net/ref.outcontrol'>ref.outcontrol</a>]: output handler 'ob_gzhandler' cannot be used twice in Unknown on line 0, referer: http://bigfoot/ |
This did solve Guru's problem  |
_________________ Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Last edited by Raven on Thu Apr 10, 2003 7:43 pm; edited 2 times in total |
|
    |
 |
ArtificialIntel

Joined: Jan 31, 2004
Posts: -88
|
Posted:
Fri Apr 11, 2003 5:06 am |
  |
hmmmmmm I'm not convinced, but if it works, it'll do.
The only reason you should get a message_die(); error from the db.php file was if the database information in config.php is incorrect (database name, username or password).
AI |
|
|
   |
 |
Raven
General


Joined: Mar 22, 2003
Posts: 5233
Location: USA
|
Posted:
Fri Apr 11, 2003 5:14 am |
  |
db.php dies when it can't reach the database server. This could be a configuration error as AI points out or it could be a path error as I have proven in my site as well as several others. There seems to be some mystery around line 47 of db.php as I have posted here. I am still trying to sort it all out, but I do know there is an issue that does not concern the config file. |
_________________ Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff |
|
    |
 |
|
|