+ Reply to Thread
Results 1 to 6 of 6

Thread: Need help implementing script, db.php error

  1. #1
    hospitalshmoo77 is offline x10Hosting Member hospitalshmoo77 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    3

    Need help implementing script, db.php error

    I'm trying to get this open source thing to work, Installed it as far as i can tell correctly, and this is what i get

    Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dashmoo/public_html/functions/system/init.php on line 81

    I don't really know anything about this stuff so here is the file that is mentioned

    /* We use our own error handling. */
    require_once ('./functions/system/errorHandler.php');

    /* Include all the functions */
    require_once ('./functions/registry.php');

    /* Initialize cookies. Mhh, cookies. */
    session_start();

    /* get the domain name. */
    $DOMAIN = $_SERVER[HTTP_HOST];
    $SCRIPT = dirname($_SERVER[SCRIPT_NAME]);
    $URL = "http://" . $DOMAIN . $SCRIPT;

    /* Die and roll over if we use an archaic PHP version. */
    if (version_compare(phpversion(), "5.0.0") == "-1") {
    die("You are running PHP Version " . phpversion() . ", but at least PHP 5.0.0 is required.<br>" .
    "Please upgrade your PHP version and try again.<br>");
    }

    /* Check that Register globals is OFF */
    if (ini_get('register_globals')) {
    die("<b>Error:</b> You have register_globals set to on in your php.ini.<br><br> " .
    "Not only is this extremly insecure, but even more problematic: " .
    "MiningBuddy does not work on hosts with register_globals on. " .
    "Turn it off, and try again.");
    }

    /* Set the error handler. */
    set_error_handler('errorHandler', E_WARNING);

    /* Do we have the config file? */
    if ($_SESSION["initdone"] != true) {
    if (!file_exists("./etc/config." . $DOMAIN . ".php")) {
    die("Please set up MiningBuddy first by copying /etc/config-release.php " . "to /etc/config." . $DOMAIN . ".php and edit it to suit your needs.");
    }
    }

    /* Include important files. */
    require_once ("./etc/config." . $DOMAIN . ".php");

    /* is the images cache dir existant and writeable? */
    if (!file_exists("./images/cache/" . $DOMAIN)) {
    mkdir("./images/cache/" . $DOMAIN, 0755);
    }

    /* load Pear. */
    require_once ('DB.php');
    if (!class_exists(DB)) {
    die("<b>Error:</b> Unable to load PEAR-DB! It is a requirement. Please add this package, and try again.");
    }

    /* Config file compatible with this release? */
    if ($_SESSION["initdone"] != true) {
    if ("$CONF_VER" != "$CONFIGVER") {
    die("Your etc/config." . $DOMAIN . ".php file is out of date. Please update it.");
    }
    elseif ($HAVE_READ != true) {
    die("Please edit the configuration file ./etc/config." . $DOMAIN . ".php!");
    }
    }

    /* Create a timestamp and the database - needed before auth! */
    $DB = makeDB();
    $TIMEMARK = date(U) - (getConfig("timeOffset") * 60 * 60);

    /* Create empty user object */
    $MySelf = new user(false, false);

    /* Lets check if we have the right SQL version */
    if ($_SESSION["initdone"] != true) {

    global $SQLVER;

    // Check the Version information of the Database.
    $CURRENT = $DB->getCol("SELECT value FROM config WHERE name = 'version' LIMIT 1");

    // NO schema found!
    if ($DB->isError($CURRENT)) {
    die("Please set up the database first! (See README)");
    }

    // Version number incorrect.
    if ("$CURRENT[0]" < "$SQLVER") {

    // Install upgrade.
    $filename = "./doc/sql/mysql-update-" . $CURRENT[0] . "-" . ($CURRENT[0] + 1) . ".txt";

    // Update the tables.
    print ("Your SQL tables are not compatible.<br>");

    if (file_exists($filename)) {
    die("Please update your sql tables with the sql update file \"$filename\".");
    } else {
    die("Please update your tables.");
    }
    }
    }

    /* Is this call made from within EvE? */
    if (ereg("EVE-minibrowser", $_SERVER[HTTP_USER_AGENT])) {

    $IGB = TRUE;

    // Trust, Inc.
    if (getConfig("trustSetting") > 0) {
    if ($_SERVER['HTTP_EVE_TRUSTED'] != 'yes') {

    // Request Trust
    header("eve.trustme:http://" . $DOMAIN . "/::This is " . $VERSION . ".");
    ob_flush();
    die();

    } else {
    $EVE_Charname = $_SERVER['HTTP_EVE_CHARNAME'];
    }
    }
    }

    /* If we are this far, we have passed the checks. */
    if ($_SESSION["initdone"] != true) {
    $_SESSION["initdone"] == true;
    }

    // Load the sitename.
    $SITENAME = getConfig("sitename");

    global $BLESSED;
    if ($BLESSED) {
    $VERSION .= " [blessed]";
    }

    // Ebil MSIE!
    //if (!$_SESSION["initdone"] && ereg("MSIE 7", $_SERVER[HTTP_USER_AGENT]) && !isset ($_GET[image])) {
    // makeNotice("MiningBuddy does not work with Internet Explorer 7.0 and above. It does work, however with free alternatives like FireFox, Mozilla or Seamonkey - and of course, from in-game. " .
    // "<br>- Mozilla: <a href=\"http:/mozilla.org\">mozilla.org</a>" . "<br>- Firefox: <a href=\"http:/mozilla.com\">mozilla.com</a>" .
    // "<br>- Seamonkey: <a href=\"http://www.mozilla.org/projects/seamonkey/\">http://www.mozilla.org/projects/seamonkey/</a>", "error", "Browser not supported", " ", " ");
    //}

    // Update Check!
    $UPDATE = checkForUpdate();
    ?>



    It seems DB.php isn't referenced right or something.....I was trying to install this and was supposed to be somewhat easy. Any help would be greatly apprciated.

    The files can be downloaded at http://alchemist-industries.com/inde...mid=70&lang=en

    That is what i'm trying to get to work. Lemme know what else you would need to assist me and thanks in advance =)

  2. #2
    cashforr's Avatar
    cashforr is offline x10Hosting Member cashforr is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    Hungary
    Posts
    10

    Re: Need help implementing script, db.php error

    you give the link to:
    miningbuddy-0.6.tar.zip
    File Name: miningbuddy-0.6.tar.zip
    File Size: 543.40 kB
    Date: 04. September 2010

    do you have this error since that date???

  3. #3
    hospitalshmoo77 is offline x10Hosting Member hospitalshmoo77 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    3

    Re: Need help implementing script, db.php error

    I just downloaded this and tried to implement it. I've never had it work before. When I unziped the file on my computer and tried to run the index.php file it runs a check basically saying that everythings where it should be. I uploaded it exactly how it is set up just in my www folder and set up the SQL database and thats the error i get



    I just found a newer version i will try to upload and get working. Maybe the one I'm using is out of date, not working, and no longer supported. I'll post an update tonight see if it resovles this.
    Last edited by hospitalshmoo77; 05-10-2011 at 10:42 AM.

  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Need help implementing script, db.php error

    Quote Originally Posted by hospitalshmoo77 View Post


    Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dashmoo/public_html/functions/system/init.php on line 81


    Learn to read error messages. They tell you what the problem is.

    Failed opening required 'DB.php'
    Tried to open a file but couldn't. If you would have included the entire error message, it probably would have said something like "no such file or directory". ie, you are missing a file

    in /home/dashmoo/public_html/functions/system/init.php on line 81
    This tells you where the error happens. Lines 80-81 are:

    /* load Pear. */
    require_once ('DB.php');
    Your script is trying to load DB.php, which is a PEAR module.

    PEAR is not installed on x10hosting. You can install the basic PEAR files and DB.php yourself.
    Nothing is always absolutely so.

  5. #5
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Need help implementing script, db.php error

    For sample code, please post only a concise (complete yet minimal) example. Otherwise, there's too much extraneous code to wade through. Please use [php], [html] or [code] tags (as appropriate) to separate and format code.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  6. #6
    hospitalshmoo77 is offline x10Hosting Member hospitalshmoo77 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    3

    Re: Need help implementing script, db.php error

    Problem solved with newer version of the script. Thanks for the suggestions.

+ Reply to Thread

Similar Threads

  1. implementing openssl
    By ginverted in forum Programming Help
    Replies: 4
    Last Post: 09-06-2009, 10:59 PM
  2. implementing AJAX ??
    By n3v3rl0v3 in forum Programming Help
    Replies: 5
    Last Post: 03-18-2009, 08:37 PM
  3. Delete Error Logs script error D:
    By Shadow121 in forum Programming Help
    Replies: 0
    Last Post: 06-29-2008, 08:39 PM
  4. Script Error
    By Anton in forum Free Hosting
    Replies: 6
    Last Post: 12-27-2005, 06:45 PM
  5. Implementing Ads to PhPNuke
    By Aeon in forum Free Hosting
    Replies: 19
    Last Post: 02-17-2005, 01:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers