[MySQL] Advanced Unstuck Tool Integration Error menu

User Tag List

Results 1 to 3 of 3
  1. #1
    The_Red's Avatar Member
    Reputation
    12
    Join Date
    Mar 2009
    Posts
    46
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [MySQL] Advanced Unstuck Tool Integration Error

    Okay here's the code:
    Code:
    <?php
    /*-------------------------------------------------------+
    | ArcSite with PHP-Fusion CMS Core
    | Copyright (C) 2010
    | http://www.php-fusion.co.uk/
    +--------------------------------------------------------+
    | Filename: ./Player Tools/unstuck.php
    | Author: The Red
    +--------------------------------------------------------+
    | This program is released as free software under the
    | Affero GPL license. You can redistribute it and/or
    | modify it under the terms of this license which you
    | can read by viewing the included agpl.txt or online
    | at www.gnu.org/licenses/agpl.html. Removal of this
    | copyright header is strictly prohibited without
    | written permission from the original author(s).
    +--------------------------------------------------------*/
    require_once "../maincore.php";
    require_once THEMES."templates/header.php";
    include LOCALE.LOCALESET."playertools.php";
    
    if ($emulator == 0) { redirect("news.php"); }
    
    // Database Connection -------------------------------------------------------------
    // You should not need to change these three, unless you know what you are doing and know you need to.
    $logcon = mysqli_connect($ldb_host, $ldb_user, $ldb_pass, $ldb_name);
    $webcon = mysqli_connect($web_host, $web_user, $web_pass, $web_name);
    $charcon = mysqli_connect($cdb_host, $cdb_user, $cdb_pass, $cdb_name);
    
    //Pull info into arrays
    if($emulator == 1) {
    	$acct_info = mysqli_fetch_assoc(mysqli_query($logcon, "SELECT * FROM accounts WHERE login='".$userdata['game_acc']."'"));
    	$char_query = mysqli_query($charcon, "SELECT * FROM characters WHERE acct='".$acct_info['acct']."'");
    	$char_list = mysqli_fetch_assoc($char_query);
    } elseif($emulator == 2) {
    	$acct_info = mysqli_fetch_assoc(mysqli_query($logcon, "SELECT * FROM account WHERE username='".$userdata['game_acc']."'"));
    	$char_query = mysqli_query($charcon, "SELECT * FROM character WHERE account='".$acct_info['id']."'");
    	$charcon->use_result();
    	$char_list = mysqli_fetch_array($char_query);
    	echo $char_list['name'];
    }
    
    if (isset($_POST['register'])) {
    	$error = ""; $db_fields = ""; $db_values = "";
    	$character = stripinput(trim(preg_replace("/ +/i", " ", $_POST['character'])));
    
    	if ($character == "") {
    		$error .= $locale['pt003']."<br />\n";
    	}
    
    	if ($error == "") {
    		opentable($locale['pt001']);
    		echo "<div style='text-align:center'><br />\n".$locale['pt004']."<br /><br />\n".$locale['pt005']."<br /><br />\n</div>\n";
    		closetable();
    	} else {
    		opentable($locale['pt0002']);
    		echo "<div style='text-align:center'><br />\n".$locale['pt006']."<br /><br />\n$error<br />\n<a href='".FUSION_SELF."'>".$locale['pt007']."</a></div></br>\n";
    		closetable();
    	}
    } else {
    ?>
    <style type="text/css">
    .pltb {
    	position:absolute;
    	width:400px;
    	height:auto;
    	text-align:center;
    	font-family:verdana;
    	font-size:12px;
        z-index:10;
    	left: 50%;
        margin-left: -200px;
    }
    
    fieldset {
        padding:8px;
        border:1px solid #ccc;
    }
    </style>
    <?php opentable($locale['pt001']); ?>
    <p></p><p></p>
    <div class="pltb">
      <fieldset>
    <?php
    echo "<form name='inputform' method='post' action='".FUSION_SELF."' onsubmit='return ValidateForm(this)'>\n";
    echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
    echo "<td class='tbl'>".$locale['pt008']."<span style='color:#ff0000'>*</span></td>\n";
    echo "<td class='tbl'><select name='character'>";
    //for ($l = 2;$l <= mysqli_num_rows($char_query); $l++) echo "<option>".$char_list[$l]."</option>";
    echo "</td>\n</tr>\n";
    closetable();
    ?>
      </fieldset>
    </div>
    
    <?php
    echo "<script type='text/javascript'>
    function ValidateForm(frm) {
    	if (frm.character.value==\"\") {
    		alert(\"".$locale['pt003']."\");
    		return false;
    	}
    }
    </script>\n";
    
    }
    require_once THEMES."templates/footer.php";
    ?>
    When viewing the page I get the following errors:
    Notice: Undefined index: game_acc in C:\xampplite\htdocs\mycms\Player Tools\unstuck.php on line 36

    Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\xampplite\htdocs\mycms\Player Tools\unstuck.php on line 39


    The $userdata array is established in the maincore by a basic mysql connection. I am using MySQLi in my tool so i have better functionality connecting to three databases simultaneously. I've tryed establishing the userdata array with MySQLi to no avail. The main problem i'm having is it keeps telling me its boolean and won't spit out the data i'm trying to pull.

    The connection variables are pulled from the maincore which pulls all the variables from a Configuration class. This is a super global system i've implemented into the code.

    Any suggestions? This is one major road block in the way of finishing my ArcSite CMS website.
    Press ALT+F4 it will save you alot of trouble XD.

    [MySQL] Advanced Unstuck Tool Integration Error
  2. #2
    EXtremiXed's Avatar Member
    Reputation
    10
    Join Date
    Mar 2009
    Posts
    48
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok this issue is easier to fix than you think.

    locate your php.ini file which is in use

    local your error reporting section in this file and replace

    Code:
    error_reporting =  E_ALL
    And try something like this

    Code:
    error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING
    Note there can be more than one php.ini but only one is in use, find the correct one

  3. #3
    The_Red's Avatar Member
    Reputation
    12
    Join Date
    Mar 2009
    Posts
    46
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Better yet why don't i just add error_reporting(E_NONE); to the top of my script and it will do the same thing, absolutely nothing but hide the error message that is. Hiding it does not take away the fact that none of my arrays are constructed...or at least that my final one is returning boolean >.< and darn i forgot to take out by test echo and the useless use_result line
    Press ALT+F4 it will save you alot of trouble XD.

Similar Threads

  1. [NoggIt and Cryect Tools] WoW Error?
    By Appled in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 02-09-2011, 05:18 AM
  2. Mysql error & Phpmyadmin
    By msnad9833 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 10-02-2007, 08:17 PM
  3. MySQL Server Configuration Error
    By Blueeyedtimothy in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 08-31-2007, 04:25 PM
  4. Wfisher (Advanced fishing tool)
    By peterwurst in forum World of Warcraft Bots and Programs
    Replies: 25
    Last Post: 08-23-2007, 02:38 PM
All times are GMT -5. The time now is 07:37 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search