Addon upload and add users not working properly

Support and feedback for UniAdmin

Addon upload and add users not working properly

Postby NiennaMiriel » Mon Aug 21, 2006 11:21 pm

I originally had the same problem as gamesandglory had here.

I fixed that by changing my filesize to 10MB. Now, I am able to upload an add on with no problems, but it doesn't display in my add on management list. It is located in my addon_zips file.

Where should I be looking to troubleshoot this issue?

I seem to be seeing the same behavior as Dreadpickle here except that I don't have an additional prefix for my tables. I configured my database and whatnot in the config.php

Additionally, I receive
Code: Select all
DEBUG: ERROR: Out of range value adjusted for column 'id' at row 1
when I try to add a new user.

[Edit: Using MySQL 5.0 and PHP 5.1.5 with my Apache 2 webserver.]
Last edited by NiennaMiriel on Wed Sep 06, 2006 3:50 am, edited 6 times in total.
User avatar
NiennaMiriel
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Aug 21, 2006 6:20 am
Location: Wichita, KS

Re: Updated! Addon upload and add users not working properly

Postby NiennaMiriel » Thu Aug 24, 2006 3:07 am

I was able to add users by manually entering them into the database.

I simply attempted to add them through the website and then I copied the SQL statement (so that I had the encrypted password) into MySQL and removed the reference to the id column, as that is an identity column and should be populated manually.

Then just so I don't have to do it again, I modified users.php

Lines 242 & 247
Code: Select all

$sql 
"INSERT INTO `".$config['db_tables_users']."` ( `id` , `name` , `password` , `level` )VALUES ('', '$userN', '".md5($userP)."', '$userL');";

$sql "INSERT INTO `".$config['db_tables_users']."` ( `id` , `name` , `password` , `level` )VALUES ('', '$userN', '".md5($userP)."', '1');";
 


Code: Select all

$sql 
"INSERT INTO `".$config['db_tables_users']."` ( `name` , `password` , `level` )VALUES ('$userN', '".md5($userP)."', '$userL');";
$sql "INSERT INTO `".$config['db_tables_users']."` ( `name` , `password` , `level` )VALUES ('$userN', '".md5($userP)."', '1');";
 
Last edited by NiennaMiriel on Thu Aug 24, 2006 3:33 am, edited 1 time in total.
User avatar
NiennaMiriel
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Aug 21, 2006 6:20 am
Location: Wichita, KS

Updated! Addon upload and add users not working properly

Postby NiennaMiriel » Thu Aug 24, 2006 3:54 am

Looks like that same problem is causing my add ons not to update:

addons.php Lines 223-224 & 227-228

Code: Select all

$sql 
"INSERT INTO `".$config['db_tables_addons']."` (`id`, `time_uploaded` , `version` , `enabled` , `name`, `dl_url`, `homepage` )VALUES (
'', '"
.time()."', '".addslashes($version)."', '1', '".addslashes($addonName)."', '".addslashes($downloadLocation)."', '".addslashes($homepage)."');";

$sql "INSERT INTO `".$config['db_tables_addons']."` (`id`, `time_uploaded` , `version` , `enabled` , `name`, `dl_url` )VALUES (
'', '"
.time()."', '".addslashes($version)."', '1', '".addslashes($addonName)."', '".addslashes($downloadLocation)."');";
 


Code: Select all

$sql 
"INSERT INTO `".$config['db_tables_addons']."` ( `time_uploaded` , `version` , `enabled` , `name`, `dl_url`, `homepage` )VALUES (
'"
.time()."', '".addslashes($version)."', '1', '".addslashes($addonName)."', '".addslashes($downloadLocation)."', '".addslashes($homepage)."');";

$sql "INSERT INTO `".$config['db_tables_addons']."` ( `time_uploaded` , `version` , `enabled` , `name`, `dl_url` )VALUES (
'"
.time()."', '".addslashes($version)."', '1', '".addslashes($addonName)."', '".addslashes($downloadLocation)."');";
 


Then when I tried to update using UU, I received an error in the debugger when trying to write to the settings.

interface.php Lines 62-63

Code: Select all
    $sql "INSERT INTO `".$config['db_tables_stats']."` ( `id` , `ip_addr` , `host_name` , `action` , `time` , `user_agent` ) VALUES
        ( '', '"
.$_SERVER['REMOTE_ADDR']."', '".addslashes(gethostbyaddr($_SERVER['REMOTE_ADDR']))."', '$action', '".time()."', '".addslashes($_SERVER["HTTP_USER_AGENT"])."' );"


Code: Select all

    $sql 
"INSERT INTO `".$config['db_tables_stats']."` ( `ip_addr` , `host_name` , `action` , `time` , `user_agent` ) VALUES
        ( '"
.$_SERVER['REMOTE_ADDR']."', '".addslashes(gethostbyaddr($_SERVER['REMOTE_ADDR']))."', '$action', '".time()."', '".addslashes($_SERVER["HTTP_USER_AGENT"])."' );";
 


No way should I have to change this much to make it work, right? Still not sure I have it working, as I'm not getting any updates now, I'm just getting "There are no Addon(s) which require an Update.". :(
Last edited by NiennaMiriel on Thu Aug 24, 2006 4:08 am, edited 1 time in total.
User avatar
NiennaMiriel
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Aug 21, 2006 6:20 am
Location: Wichita, KS

Re: Updated! Addon upload and add users not working properly

Postby NiennaMiriel » Wed Sep 06, 2006 1:05 am

I guess I'm going to have to reinstall and start over. Honestly no one can help me out here? I've seen devs answer questions in this forum since I posted this. I'm really bummed.
User avatar
NiennaMiriel
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Aug 21, 2006 6:20 am
Location: Wichita, KS

ANYONE? Addon upload and add users not working properly

Postby Bloozie » Wed Sep 06, 2006 2:05 am

I'm having a probelm like this too... no answers...
Bloozie
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Thu Jul 20, 2006 4:19 am

ANYONE? Addon upload and add users not working properly

Postby Kaylaura » Wed Sep 06, 2006 2:39 am

You've posted code, but I don't see any error messages.

First question - you're saying that now you are uploading addons okay but it is not displaying in your addons management list. Is that still the case?

Please post your conf.php
Kaylaura
WR.net Apprentice
WR.net Apprentice
 
Posts: 38
Joined: Wed Jul 05, 2006 9:36 pm

Re: ANYONE? Addon upload and add users not working properly

Postby NiennaMiriel » Wed Sep 06, 2006 2:50 am

Ok. Here's what's happening.

After modifying a ton of code above to remove explicit definitions of the identity column 'id' (which seems like way too much to make it work), I am able to upload and see the add ons in my add on management list.

However, when I put my sync URL into my UU and attempt to sync add ons, I receive "There are no Addon(s) which require an Update." in the UU debugger.

You asked for conf.php, but I have a config.php Is that the file you're looking for?

Code: Select all
<?php
$config
['host'] =                     'localhost';        // dbase host
$config['username'] =                 'xxxx';                // dbase username
$config['password'] =                 'xxxx';                    // dbase password
$config['database'] =                 'uniadmin';    // dbase name

//////////////// DO NOT TOUCH ANYTHING AFTER THIS LINE ////////////
ini_set('display_errors','1');
error_reporting(E_WARNING);
///////////////////////// DATABASE ////////////////////////////////
$config['db_prefix'] =                 'uniadmin_';
$config['db_tables_addons'] =         $config['db_prefix'].'addons';
$config['db_tables_files'] =         $config['db_prefix'].'files';
$config['db_tables_logos'] =         $config['db_prefix'].'logos';
$config['db_tables_settings'] =     $config['db_prefix'].'settings';
$config['db_tables_stats'] =         $config['db_prefix'].'stats';
$config['db_tables_users'] =         $config['db_prefix'].'users';
$config['db_tables_svlist'] =         $config['db_prefix'].'svlist';
//////////////////////// FOLDER SETTINGS //////////////////////////
$config['addon_folder'] =             'addon_zips';
$config['temp_analyze_folder'] =     'addon_temp';
$config['logo_folder'] =             'logos';
////////////////////////// OTHER STUFF ////////////////////////////
$config['ziplibsupport'] =            false;
$config['UAVer'] =                     'Beta 0.6.1';
$config['debugSetting'] =            true;
$url explode('/','http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
array_pop($url);
$url implode('/',$url).'/';
$config['URL'] =                    $url;
$config['IntLocation'] =             $config['URL'].'interface.php';
$dblink=mysql_connect($config['host'],$config['username'],$config['password']);
mysql_select_db($config['database'],$dblink);
include(
'debug.php');
include(
'MySqlCheck.php');
include(
'css.php');
include(
'cookieFunctions.php');

if (!
$interface){
    include(
'login.php');
    include(
'header.php');
    include(
'EchoPage.php');
}
?>
Last edited by NiennaMiriel on Wed Sep 06, 2006 3:02 am, edited 1 time in total.
User avatar
NiennaMiriel
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Aug 21, 2006 6:20 am
Location: Wichita, KS

ANYONE? Addon upload and add users not working properly

Postby Kaylaura » Wed Sep 06, 2006 3:00 am

okay you can take out the db login info in your above post now :)

Here's a thought - uniuploader does a get on the synchronize page, doesn't it? I'd look in there to see what's going on. What happens when you click on the link? (uniadmin/interface.php)

Edit: ah, nevermind ... It just returns a single message. Look in Uniuploader's debugger - what happens in there?
Last edited by Kaylaura on Wed Sep 06, 2006 3:03 am, edited 3 times in total.
Kaylaura
WR.net Apprentice
WR.net Apprentice
 
Posts: 38
Joined: Wed Jul 05, 2006 9:36 pm

ANYONE? Addon upload and add users not working properly

Postby Kaylaura » Wed Sep 06, 2006 3:04 am

Actually, check to see what the queries are in that interface.php file.
Kaylaura
WR.net Apprentice
WR.net Apprentice
 
Posts: 38
Joined: Wed Jul 05, 2006 9:36 pm

Re: ANYONE? Addon upload and add users not working properly

Postby NiennaMiriel » Wed Sep 06, 2006 3:11 am

I just uploaded ItemRack for the first time right before I went to update it. I haven't updated my own ItemRack already, so I'd think it would pick it up.

I didn't do anything with Atlas, and it's out of date, but I'd think that it would overwrite to ensure that everyone on the guild was on the same version. Especially for something like CT_Raid or whatnot.

Code: Select all
[2006/09/05 17:08:27]
[2006/09/05 17:08:27] RetrData: url: http://www.wowroster.net/uniuploader_updater2/update.php
[2006/09/05 17:08:27] RetrData: param1: OPERATION
[2006/09/05 17:08:27] RetrData: val1: GETLANGMD5
[2006/09/05 17:08:27] RetrData: Timeout: 20000
[2006/09/05 17:08:27] RetrData: ------------------------------------------------------------------------
[2006/09/05 17:08:27] e974d4962bc2282b4816a294bc2a568d
[2006/09/05 17:08:27] RetrData: ------------------------------------------------------------------------
[2006/09/05 17:08:27]
[2006/09/05 17:08:27] MD5SUM of local languages.ini: e974d4962bc2282b4816a294bc2a568d
[2006/09/05 17:08:28]
[2006/09/05 17:08:28] RetrData: url: http://www.wowroster.net/uniuploader_updater2/update.php
[2006/09/05 17:08:28] RetrData: param1: OPERATION
[2006/09/05 17:08:28] RetrData: val1: CHECKUPDATES
[2006/09/05 17:08:28] RetrData: Timeout: 20000
[2006/09/05 17:08:28] RetrData: ------------------------------------------------------------------------
[2006/09/05 17:08:28] 2.4.1|Version 2.4.1 changes:
[2006/09/05 17:08:28]
[2006/09/05 17:08:28] 1. URL syncronization URL enabled
[2006/09/05 17:08:28] 2. User Agent doesn't save unless it's changed via settings sync or user input.
[2006/09/05 17:08:28] 3. All references to wowroster.net changed to wowroster.net in UU and UU Updater
[2006/09/05 17:08:28] 4. Updater tries to update after 10 seconds of not detecting UU closure.
[2006/09/05 17:08:28] RetrData: ------------------------------------------------------------------------
[2006/09/05 17:08:28]
[2006/09/05 17:08:28]  UpdateAddons Debugging process started
[2006/09/05 17:08:28] Retrieving XML data.
[2006/09/05 17:08:28]
[2006/09/05 17:08:28] RetrData: url: http://jennieg.sytes.net:8001/depths/uniadmin/interface.php
[2006/09/05 17:08:28] RetrData: param1: OPERATION
[2006/09/05 17:08:28] RetrData: val1: GETADDONLIST
[2006/09/05 17:08:28] RetrData: param2: username
[2006/09/05 17:08:28] RetrData: val2: xxxx
[2006/09/05 17:08:28] RetrData: param3: password
[2006/09/05 17:08:28] RetrData: val3: xxxx
[2006/09/05 17:08:28] RetrData: Timeout: -1
[2006/09/05 17:08:28] RetrData: ------------------------------------------------------------------------
[2006/09/05 17:08:28] <addons>
[2006/09/05 17:08:28]    <addon name="TradesBar" version="2.05" >
[2006/09/05 17:08:28]    </addon>
[2006/09/05 17:08:28]    <addon name="ItemRack" version="1.975" >
[2006/09/05 17:08:28]    </addon>
[2006/09/05 17:08:28] </addons>
[2006/09/05 17:08:28] RetrData: ------------------------------------------------------------------------
[2006/09/05 17:08:28]
[2006/09/05 17:08:28] Beginning the XML document parsing
[2006/09/05 17:08:28] There are no Addon(s) which require an Update.
User avatar
NiennaMiriel
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Aug 21, 2006 6:20 am
Location: Wichita, KS

ANYONE? Addon upload and add users not working properly

Postby Kaylaura » Wed Sep 06, 2006 3:20 am

Okay, basically if you look in interface.php, the first function that gets run is GetAddonsList.

That function does this query:
Code: Select all
$sql "SELECT * FROM `".$config['db_tables_addons']."`"


Now, are those the only two addons you have uploaded? If not, then I think your uploading functionality is still buggy. I would guess that the addons are not actually inserting into your database.

Now, the second query fills out the file information for each of your uploaded addons:
Code: Select all
$sql "SELECT * FROM `".$config['db_tables_files']."` WHERE `addon_name` = '".addslashes($name)."'"


If that table is empty, again, your uploading functionality is bugged.

I'd check the first thing first - if what I think turns out to be right, you might want to start back at the uploading section. Edit your upload code to make it spit out the sql statements, and manually enter those statements and see what mysql spits out.
Kaylaura
WR.net Apprentice
WR.net Apprentice
 
Posts: 38
Joined: Wed Jul 05, 2006 9:36 pm

Re: ANYONE? Addon upload and add users not working properly

Postby NiennaMiriel » Wed Sep 06, 2006 3:49 am

Yes, those are the only 2 I've uploaded.

Yeah, the second table is empty. I'll have to look into that one. I wonder if it's the same problem as the others.

THANK YOU!!!!!

I missed a place where it tried to insert a blank ID:

addons.php line 248-249

Code: Select all
$sql "INSERT INTO `".$config['db_tables_files']."` ( `id`, `addon_name` , `filename` , `md5sum` )VALUES (
'', '"
.addslashes($addonName)."', '".addslashes($fileName)."', '".addslashes($md5)."');"


Code: Select all
$sql "INSERT INTO `".$config['db_tables_files']."` ( `addon_name` , `filename` , `md5sum` )VALUES (
'"
.addslashes($addonName)."', '".addslashes($fileName)."', '".addslashes($md5)."');"
User avatar
NiennaMiriel
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Aug 21, 2006 6:20 am
Location: Wichita, KS


Return to UniAdmin

Who is online

Users browsing this forum: No registered users and 0 guests