Introducing ArmorySync

Sync Blizzards' Armory data with WoWRoster (addon depreciated no longer works see ApiSync)

Moderators: Ulminia, poetter

Re: Introducing ArmorySync

Postby Kristoff22 » Thu Apr 12, 2007 10:19 pm

zanix wrote:There is a warning in php.ini for this setting
; Whether to enable the ability to force arguments to be passed by reference
; at function call time. This method is deprecated and is likely to be
; unsupported in future versions of PHP/Zend. The encouraged method of
; specifying which arguments should be passed by reference is in the function
; declaration. You're encouraged to try and turn this option Off and make
; sure your scripts work properly with it in order to ensure they will work
; with future versions of the language (you will receive a warning each time
; you use this feature, and the argument will be passed by value instead of by
; reference).
allow_call_time_pass_reference = On


Thanks for double checking that for me... I got a bit lazy (sorry!). I've modified the code so that it should not throw that warning. I need to test and push it up.
Kristoff22
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Mon Nov 13, 2006 5:54 am

Re: Introducing ArmorySync

Postby Karavirs » Fri Apr 13, 2007 4:22 pm

I was having the browser timeout problem also. But it would work if I selected only a small group (say 60 and up).

Soo... I added a MaxLevel variable in config.php and changed the sql query in index.php

Now I can change my config and grab 10 levels at a time (min=10 max=20)

Added this line after the MinLevel line in config.php
Code: Select all
$addon_conf['ArmorySync']['MaxLevel'] = 50; // The maximum level to be updated


Changed line 27 of index.php to this
Code: Select all
      "WHERE members.level >= " . $addon_conf['ArmorySync']['MinLevel'] . " AND members.level <= " . $addon_conf['ArmorySync']['MaxLevel'] ." " .
Image

Image
User avatar
Karavirs
WR.net Apprentice
WR.net Apprentice
 
Posts: 49
Joined: Mon Feb 26, 2007 6:33 pm
Location: Chicago

Re: Introducing ArmorySync

Postby blackice » Fri Apr 13, 2007 6:45 pm

Kristoff22 wrote:You need to modify php.INI and allow pass_by_reference, as it says in that error. Also, you should up the maximum execution time, as it takes awhile for the sync to complete.


Thanks that help.

Now I am getting, it gets back to the main page and from what I can tell the player gets synched I also see a couple of lines for "About to update player" and then this


Update Errors
Code: Select all
    
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1
Cannot update Character Data
1366: Incorrect integer value: '' for column 'stat_def' at row 1



Any ideas?

Edited

I was able to fine this out about Incorrect integer value.

this is an sql_mode issue. To have the old behaviour you should execute
set sql_mode = ''; -- empty string means 'traditional MySQL-mode'

Refer to: http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html

MySQL Bug
Last edited by blackice on Sun Apr 15, 2007 6:56 am, edited 2 times in total.
User avatar
blackice
WR.net Apprentice
WR.net Apprentice
 
Posts: 34
Joined: Tue Jul 25, 2006 4:15 pm

Introducing ArmorySync

Postby Vexitor » Fri Apr 13, 2007 9:06 pm

Is there any way to automate this?

My thought would be to use a cron job and schedule it to run every 8-12 hours or so.

Just a thought. Not sure how it would work now...with the password requirement and all...
Image
User avatar
Vexitor
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Sun Jul 09, 2006 7:59 pm

Introducing ArmorySync

Postby tendo » Tue Apr 17, 2007 1:54 am

This could be the hawtness. I'm going to try to get it to work in the next week or so, I'm hoping I don't have as many problems as some of the other folks.

Great work guys, I thought i was going to have to write this myself D:
tendo
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Tue Apr 17, 2007 12:10 am

Re: Introducing ArmorySync

Postby kaleyn » Wed Apr 18, 2007 12:05 pm

Any ideas on how to set a limit to the number of members it feeds to the update query?

I'd like to set it up so that everytime you click on the Amorysync link it updates the first 10-15 members. It then pops up with the reporting screen.

I can just keep clicking that button, till everyone is updated, and the report screen shows no updates.

I think this should be fairly easy, but I've been scratching my head trying to figure out how to do it.

EDIT: I've added a limiter, it only does 5 members at a time now, but the problem is that it does the same five memeber every time.

Does the mod update the "Last Updated" field to the current date and time? If it did, and we grabbed only those members who hadn't been updated in longer than 24 hours, then the first five should be excluded the second time around...does the mod work like this? And if not, what can we do make it work like this?
Last edited by kaleyn on Wed Apr 18, 2007 12:48 pm, edited 1 time in total.
Johann Wolfgang Von Goethe --
Treat people as if they were what they ought to be and you help them to become what they are capable of being.
User avatar
kaleyn
WR.net Apprentice
WR.net Apprentice
 
Posts: 37
Joined: Mon Jan 08, 2007 7:59 pm

Re: Introducing ArmorySync

Postby Weeladdie » Wed Apr 18, 2007 8:41 pm

kaleyn wrote:Any ideas on how to set a limit to the number of members it feeds to the update query?

I'd like to set it up so that everytime you click on the Amorysync link it updates the first 10-15 members. It then pops up with the reporting screen.

I can just keep clicking that button, till everyone is updated, and the report screen shows no updates.

I think this should be fairly easy, but I've been scratching my head trying to figure out how to do it.

EDIT: I've added a limiter, it only does 5 members at a time now, but the problem is that it does the same five memeber every time.

Does the mod update the "Last Updated" field to the current date and time? If it did, and we grabbed only those members who hadn't been updated in longer than 24 hours, then the first five should be excluded the second time around...does the mod work like this? And if not, what can we do make it work like this?


This is definately the solution to the appauling performance problems of the European Armory site, as even with only 40 Level 70 member's it times out.

Kaleyn, please can you post your code mods so far to see if others can help with this.
User avatar
Weeladdie
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Tue Jul 04, 2006 1:48 pm

Introducing ArmorySync

Postby Vanterax » Thu Apr 19, 2007 1:50 am

I got it working fine for all players above lvl60 (those are the ones we really need). However, talents are not updated despite being on the Armory.

I just read Kristoff22's post on that topic. Sounds quite tricky. Has there been any new developments toward this?
Vanterax
WR.net Apprentice
WR.net Apprentice
 
Posts: 66
Joined: Wed Dec 13, 2006 6:58 am

Introducing ArmorySync

Postby nightfighter » Thu Apr 19, 2007 2:18 am

If you sort by last updated field when limiting it like that, and update the first 5 that have the oldest update date you will always update the oldest updated records first.
User avatar
nightfighter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 169
Joined: Wed Jul 05, 2006 11:25 pm
Location: Boise, Idaho, USA

Introducing ArmorySync

Postby Kaelon » Thu Apr 19, 2007 10:33 am

Got this error when I installed the addon (just uploaded into the addons folder), and tried to run it from the Roster:

1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(players.dateupdatedutc,'%m/%d/%y %H:%i:%s') <= DATE_SUB(NOW(),
SQL:
SELECT members.name FROM `roster_members` members LEFT JOIN `roster_players` players ON members.name = players.name WHERE members.level >= 10 AND ( ISNULL(players.name) OR STR_TO_DATE(players.dateupdatedutc,'%m/%d/%y %H:%i:%s') <= DATE_SUB(NOW(), INTERVAL 24 HOUR) ) ORDER BY members.last_online DESC
File: index.php
Line: 32


Help?
Kaelon
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Thu Feb 15, 2007 6:44 am

Re: Introducing ArmorySync

Postby chade » Thu Apr 19, 2007 5:19 pm

Kristoff22 wrote:I've added some much needed functionality to ArmorySynch:

4. Added better support for large guilds. ArmorySynch now by default excludes all players under level 10. It also excludes all players who HAVE updated in the last 24 hours, and orders the rest of the list by the players who were last seen online. These are modifiable in config.php


Still having some issues, my guild roster is kinda large, but have change the setting in config.php to only sync data for characters 60+... still seems to be timing out.

After clicking ArmorSync addon and authentication with the admin password, that is the screen I sit on with a loading animation in Firefox. I can only tell when it stops syncing with a tcpdump on the server interface :)

I've modified the php.ini to have a timeout of 1000 but it does not appear to have resolved the problem. Strange because there are characters that are 60+ and have not yet had their data sync'd.

Roster url: http://tawow-roster.bodgy.org
Last edited by chade on Sat Apr 21, 2007 12:36 pm, edited 1 time in total.
Image
User avatar
chade
WR.net Apprentice
WR.net Apprentice
 
Posts: 3
Joined: Thu Feb 15, 2007 4:02 am
Location: Canberra

Re: Introducing ArmorySync

Postby daddelkopp » Thu Apr 19, 2007 10:41 pm

@Kaelon:

I replaced in index.php (29) [fix by tinmarok]:
Code: Select all
"OR CONCAT( '20',MID( players.dateupdatedutc, 7, 2  ) ,  '-', MID( players.dateupdatedutc, 4, 2  ) ,  '-', MID( players.dateupdatedutc, 1, 2  ) ,  ' ', MID( players.dateupdatedutc, 9, 10  )  )  <= DATE_SUB(NOW(), INTERVAL " . $addon_conf['ArmorySync']['SynchCutoffTime'] . " HOUR) ) " .


I get the fallowing error (example for one guildmember):

Code: Select all
Warning: fsockopen() [function.fsockopen]: unable to connect to armory.wow-europe.com:80 in /xx/xx/xx/xx/xx/roster/addons/ArmorySynch/functions.general.php on line 37
CRITICAL ERROR - socket not connectedCRITICAL ERROR - no root XML node found: armory.wow-europe.com page
Non-Critical Error: Empty Content for Ferengi. Player has probably not updated in awhile.
Ferengi synched: 30 seconds. Total runtime: 90 seconds.


We are a guild on german Server "Lothar".
Does ArmorySync need fopen? My hoster doesn't allow fopen or curl.
I use $addon_conf['ArmorySync']['UseCurl'] = false;

daddelkopp
Last edited by daddelkopp on Thu Apr 19, 2007 10:42 pm, edited 1 time in total.
User avatar
daddelkopp
WR.net Journeyman
WR.net Journeyman
 
Posts: 99
Joined: Wed Jan 03, 2007 10:22 am

Introducing ArmorySync

Postby kalideda » Thu Apr 19, 2007 11:04 pm

Sorry, if this had been previously discussed in this thread,
the localisation part seems to be missing or buggy,
i've added this (line 26 of function.general.php) :
curl_setopt ($ch, CURLOPT_COOKIE, "cookieLangId=fr_fr");
add the same line line 28 (for the "non browser_send" case)

and line 47 (for non curl send)
"Cookie: cookieLangId=fr_fr\r\n".

And it works better (for french locales)
Last edited by kalideda on Thu Apr 19, 2007 11:41 pm, edited 2 times in total.
kalideda
WR.net Apprentice
WR.net Apprentice
 
Posts: 25
Joined: Thu Aug 31, 2006 1:48 pm

Re: Introducing ArmorySync

Postby Kristoff22 » Fri Apr 20, 2007 1:54 am

kalideda wrote:Sorry, if this had been previously discussed in this thread,
the localisation part seems to be missing or buggy,
i've added this (line 26 of function.general.php) :
curl_setopt ($ch, CURLOPT_COOKIE, "cookieLangId=fr_fr");
add the same line line 28 (for the "non browser_send" case)

and line 47 (for non curl send)
"Cookie: cookieLangId=fr_fr\r\n".

And it works better (for french locales)


Thanks Kalideda, I wish you had posted earlier! That's what I just finished up and am testing before I push it up. I'm also working on getting it to work for the non curl function (fsockopen). Should have an international version working by this weekend, or maybe even tonight!
Kristoff22
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Mon Nov 13, 2006 5:54 am

Re: Introducing ArmorySync

Postby Kristoff22 » Fri Apr 20, 2007 1:57 am

daddelkopp wrote:We are a guild on german Server "Lothar".
Does ArmorySync need fopen? My hoster doesn't allow fopen or curl.
I use $addon_conf['ArmorySync']['UseCurl'] = false;

daddelkopp


We do require either fsockopen or curl for ArmorySync to work.
Kristoff22
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Mon Nov 13, 2006 5:54 am

PreviousNext

Return to ArmorySync - Depreciated

Who is online

Users browsing this forum: No registered users and 1 guest

cron