PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14925
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
steve1
Regular
Regular


Joined: Dec 26, 2003
Posts: 50

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

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
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14925
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
steve1
Regular
Regular


Joined: Dec 26, 2003
Posts: 50

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

I will check into the db, and will let you know shortly.
View user's profile Send private message
steve1
Regular
Regular


Joined: Dec 26, 2003
Posts: 50

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

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
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14925
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
steve1
Regular
Regular


Joined: Dec 26, 2003
Posts: 50

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

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.
View user's profile Send private message
steve1
Regular
Regular


Joined: Dec 26, 2003
Posts: 50

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

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
View user's profile Send private message
Hectario
New Member
New Member


Joined: Feb 21, 2005
Posts: 3

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

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
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14925
Location: Kansas

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

Change
Code:
$dbtype = "mysql";
to
Code:
$dbtype = "MySQL";
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Hectario
New Member
New Member


Joined: Feb 21, 2005
Posts: 3

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

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.
View user's profile Send private message
Hectario
New Member
New Member


Joined: Feb 21, 2005
Posts: 3

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

changed dbhost to freecoolsite.com and it is working! EVERYONE USING PHP ON A FREE HOSTING PLACE CHANGE DBHOST TO UR HOSTNAME.COM!
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14925
Location: Kansas

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

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum