Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fatal error on page

    Fatal error: Cannot instantiate non-existent class: sql_db in /home/akronpcd/public_html/fbisquad/db/db.php on line 86

    I get that when I go to my site..I tried installing Chronos and an error came up for that and now this is coming up.
    Last edited by crazykilla; 09-11-2005 at 10:39 PM.

  • #2
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How wonderful for you?

    It means that a class that is trying to be initialized (eg: assigned to an object variable), hasn't actually been defined.

    However with so little information, and not even knowing any real problem, or seeing any code... without anything else, there is little we will be able to help you with.

    Just check the readme files that came with the software, check the website, check that if you are including files yourself that you have included all the right ones, and if you dont solve the problem post back here, preferably with some more information.

  • #3
    New Coder
    Join Date
    Sep 2005
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP Code:
    <?php
    /***************************************************************************
     *                                 db.php
     *                            -------------------
     *   begin                : Saturday, Feb 13, 2001
     *   copyright            : (C) 2001 The phpBB Group
     *   email                : [email]support@phpbb.com[/email]
     *
     *   $Id: db.php,v 1.10 2002/03/18 13:35:22 psotfx Exp $
     *
     *
     ***************************************************************************/

    /***************************************************************************
     *   This file is part of the phpBB2 port to Nuke 6.0 (c) copyright 2002
     *   by Tom Nitzschner (tom@toms-home.com)
     *   [url]http://bbtonuke.sourceforge.net[/url] (or [url]http://www.toms-home.com[/url])
     *
     *   As always, make a backup before messing with anything. All code
     *   release by me is considered sample code only. It may be fully
     *   functual, but you use it at your own risk, if you break it,
     *   you get to fix it too. No waranty is given or implied.
     *
     *   Please post all questions/request about this port on [url]http://bbtonuke.sourceforge.net[/url] first,
     *   then on my site. All original header code and copyright messages will be maintained
     *   to give credit where credit is due. If you modify this, the only requirement is
     *   that you also maintain all original copyright messages. All my work is released
     *   under the GNU GENERAL PUBLIC LICENSE. Please see the README for more information.
     *
     ***************************************************************************/

    /***************************************************************************
     *
     *   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, or
     *   (at your option) any later version.
     *
     ***************************************************************************/

    global $forum_admin;
    if (
    $forum_admin == 1) {
        
    $the_include "../../../db";
    } elseif (
    $inside_mod == 1) {
        
    $the_include "../../db";
    } else {
        
    $the_include "db";
    }

    switch(
    $dbtype) {

        case 
    'MySQL':
            include(
    "".$the_include."/mysql.php");
            break;

        case 
    'mysql4':
            include(
    "".$the_include."/mysql4.php");
            break;

        case 
    'postgres':
            include(
    "".$the_include."/postgres7.php");
            break;

        case 
    'mssql':
            include(
    "".$the_include."/mssql.php");
            break;

        case 
    'oracle':
            include(
    "".$the_include."/oracle.php");
            break;

        case 
    'msaccess':
            include(
    "".$the_include."/msaccess.php");
            break;

        case 
    'mssql-odbc':
            include(
    "".$the_include."/mssql-odbc.php");
            break;
        
        case 
    'db2':
            include(
    "".$the_include."/db2.php");
            break;

    }

    $db = new sql_db($dbhost$dbuname$dbpass$dbnamefalse);
    if(!
    $db->db_connect_id) {
        die(
    "<br><br><center><img src=images/logo.gif><br><br><b>There seems to be a problem with the MySQL server, sorry for the inconvenience.<br><br>We should be back shortly.</center></b>");
    }

    ?>
    That is the code in the file it is saying the error is coming from

  • #4
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Are you sure the files are being found... As they are being called under "include()", there is a good chance your webserver wont be configured to display an errors of files not found..

    Try placing:

    error_reporting(E_ALL);

    at the top of the database page so that you can ensure the files are being found... Alternativley (what i would do), is chancge the includes() to requires(), as lets face it, nothings going to work anyway without those vital DB classes.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •