Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes for phpnuke 6.5
Author Message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Apr 11, 2003 7:47 am Reply with quote

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

[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


First of all, make sure that your TYPE, USERNAME, and PASSWORD are correct for your database connection in your config file. If they are, then proceed.

There may be a 'bug' in the db.php module. 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). 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";
}


Line 47 is directing to another module - mysql.php. If line 47 doesn't direct correctly, then it fails. By correcting the path, mysql.php is found and the connection is made and the site comes up. Without it, it never connects, not due to a username/password error, but due to the fact that it can't find the program that establishes the database connection. That is the issue. It is not an error in configuration. It's an error in locating the program (mysql.php) that actually has the code that establishes the database connection.

Obviously, this will need to change to fit your directory structure.
 
View user's profile Send private message
steve1
Regular
Regular



Joined: Dec 26, 2003
Posts: 50

PostPosted: Fri Dec 26, 2003 10:49 pm Reply with quote

Hi Raven,

Thank you for setting up such a great site. Ok, I followed your instructions, and one error went away, now I get this:

Fatal error: Cannot instantiate non-existent class: sql_db in d:\appserv\www\html\db\db.php on line 86


Any ideas? I am a newbie Sad
 
View user's profile Send private message
Raven







PostPosted: Fri Dec 26, 2003 11:01 pm Reply with quote

Steve,

Are you sure your MySQL database is setup correctly and all tables are installed? This error usually means that the database is not installed correctly.
 
steve1







PostPosted: Fri Dec 26, 2003 11:07 pm Reply with quote

I will check into the db, and will let you know shortly.
 
steve1







PostPosted: Fri Dec 26, 2003 11:14 pm Reply with quote

Hi Raven,

I created the "nuke" db, and populated it from "nuke.sql", and it went through just fine.

I set up my mySQL/etc. using appServ package, and during install, it allows set up a userid/pass which I chose. These are the ones I plugged into config.php, and still I get the same error.

I am totally baffled. Sad
 
Raven







PostPosted: Fri Dec 26, 2003 11:20 pm Reply with quote

Make sure that config.php is in the same folder as mainfile.php and that it is the real config.php and not just including config.php from some other folder.
 
steve1







PostPosted: Fri Dec 26, 2003 11:29 pm Reply with quote

They are in the same directory. I am running apache on Windows, and config.php is not a redirect or anything like that.

I basically modified config.php that was pre-setup. Have just fiddled with userid/pass to no avail, and that is all.
 
steve1







PostPosted: Sat Dec 27, 2003 12:00 am Reply with quote

Problem solved.

I decided to go back to Nuke 6.9. So I installed that in its own directory (subdir of root directory). I did not modify config.php at all.

Then I created the "nuke" DB, and populated it from nuke.sql. I had to change all the "--" to "#" to make this work, but it did finally work.

After that, I just got in, and everything is working. Don't know what I did wrong before, but it is too late at night to worry about it too much.

Thanks for for your help, and I am sure I am going to bug you again, Raven.

steve Very Happy
 
Hectario
New Member
New Member



Joined: Feb 21, 2005
Posts: 3

PostPosted: Mon Feb 21, 2005 1:27 am Reply with quote

I have the exact same error as STeve had but i will not go back to nuke 6.9.

Raven do u have any ideas? i've checked everything that u already sayd in this thread. I have created the database and imported nuke.sql. Config.php is modded and is in the same folder with mainfile.php.

This is the way it's modded:

$dbhost = "localhost";
$dbuname = "hectario_phpnuke";
$dbpass = "MYPASSWORD";
$dbname = "hectario_phpnuke";
$prefix = "nuke";
$user_prefix = "nuke";
$dbtype = "mysql";
$sitekey = "SdFk*fa28367-dm56w69.3a2fDS+e9";
$gfx_chk = 7;
$subscription_url = "";
 
View user's profile Send private message
Raven







PostPosted: Mon Feb 21, 2005 1:39 am Reply with quote

Change
Code:
$dbtype = "mysql";
to
Code:
$dbtype = "MySQL";
 
Hectario







PostPosted: Mon Feb 21, 2005 5:00 am Reply with quote

Got rid of the DB error but now it says:

There seems to be a problem with the MySQL server, sorry for the inconvenience.

We should be back shortly.

In the install instructions that i used it told me to change it to mysql but right now neitherone work.
 
Hectario







PostPosted: Mon Feb 21, 2005 5:29 am Reply with quote

changed dbhost to freecoolsite.com and it is working! EVERYONE USING PHP ON A FREE HOSTING PLACE CHANGE DBHOST TO UR HOSTNAME.COM!
 
Raven







PostPosted: Mon Feb 21, 2005 9:03 am Reply with quote

Hectario wrote:
changed dbhost to freecoolsite.com and it is working! EVERYONE USING PHP ON A FREE HOSTING PLACE CHANGE DBHOST TO UR HOSTNAME.COM!
Not necessarily. It just depends on how the host set it up Smile
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes for phpnuke 6.5

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©