Help needed fatal error in sync script

EQDKP integration forum

Help needed fatal error in sync script

Postby Sonier » Sat Oct 25, 2008 7:38 am

Hi all

I'm not even sure if this script is still in use, i hope it is, i have over 350+ members i need to migrate to my eqdkp database..

Ok, i've downloaded the script, and placed it in a folder of its own, edited the conf.php file but i'm getting this error every time i run it.

Fatal error: Call to a member function GetArray() on a non-object in
importroster\sync_roster_members_with_eqdkp.php on line 28
PHP Fatal error: Call to a member function GetArray() on a non-object in \WowDKP\importroster\sync_roster_members_with_eqdkp.php on line 28

I'm using WowRoster v2 and the Latest EQDKP

Any help greatfully received.
Sonier
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Thu Aug 03, 2006 8:56 pm

Help needed fatal error in sync script

Postby zanix » Sat Oct 25, 2008 8:44 am

If the script is old, it might not work with Roster 2.0
Which script is it?
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Help needed fatal error in sync script

Postby Sonier » Sat Oct 25, 2008 6:31 pm

I'm running script Bring_eqdkp_roster_v0.5_138_126

Its the latest version i could find in these forums.
Sonier
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Thu Aug 03, 2006 8:56 pm

Help needed fatal error in sync script

Postby Sonier » Sun Oct 26, 2008 12:11 am

Heres is the line it refers to
$eqdkp_classes = $rseqdkp_classes->GetArray();

Here is the section of the code.
$rseqdkp_classes = $db_eqdkp->Execute('SELECT class_id, class_name, class_min_level, class_max_level FROM '.$eqdkp_prefix.'classes');
$eqdkp_classes = $rseqdkp_classes->GetArray();
$rseqdkp_races = $db_eqdkp->Execute('SELECT race_id, race_name FROM '.$eqdkp_prefix.'races');
$eqdkp_races = $rseqdkp_races->GetArray();

From what i can gather, its just a simple database get command, which is going wrong. I've checked and rechecked the config.inc.php file and set the database details up correctly but it still fails, oddly enough, even if i put incorrect data into the config.inc.php file it still comes up with the same error message, which tells me its an issue connecting to the db, but can't see what, the only major thing i can think of, which doesn't even make sence, is that both the roster and the EQDKP occupy the same MySQL database.
Sonier
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Thu Aug 03, 2006 8:56 pm

Help needed fatal error in sync script

Postby zanix » Sun Oct 26, 2008 1:46 am

Code: Select all
$rseqdkp_classes->GetArray(); 


The line above that might be having an error
Code: Select all
$rseqdkp_classes $db_eqdkp->Execute('SELECT class_id, class_name, class_min_level, class_max_level FROM '.$eqdkp_prefix.'classes'); 


It's possible that the db layer that this script uses may be having an error on that SQL statement, but I don't know enough about this db library to help

You can try to add this line
Code: Select all
include("adodb/adodb-exceptions.inc.php"); 

Above this line
Code: Select all
include('adodb/adodb.inc.php'); 


But I'm not sure if this will give you an error display or not...
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Help needed fatal error in sync script

Postby Sonier » Sun Oct 26, 2008 2:58 am

Ok, i added rge line like you geggested and got this.

[code=php]
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [2003: Can't connect to MySQL server on 'localhost' (10061)] in CONNECT(, '', '****', ) ' in \bridge_eqdkp_roster\adodb\adodb-exceptions.inc.php:76 Stack trace: #0 D\bridge_eqdkp_roster\adodb\adodb.inc.php(425): adodb_throw('mysql', 'CONNECT', 2003, 'Can't connect t...', '', '', Object(ADODB_mysql)) #1 \bridge_eqdkp_roster\adodb\adodb.inc.php(451): ADOConnection->Connect(NULL, NULL, NULL, NULL, true) #2 \bridge_eqdkp_roster\sync_roster_members_with_eqdkp.php(24): ADOConnection->NConnect(NULL, NULL, NULL, NULL) #3 {main} thrown in \bridge_eqdkp_roster\adodb\adodb-exceptions.inc.php on line 76
PHP Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [2003: Can't connect to MySQL server on 'localhost' (10061)] in CONNECT(, '', '****', ) ' in \bridge_eqdkp_roster\adodb\adodb-exceptions.inc.php:76 Stack trace: #0 \bridge_eqdkp_roster\adodb\adodb.inc.php(425): adodb_throw('mysql', 'CONNECT', 2003, 'Can't connect t...', '', '', Object(ADODB_mysql)) #1 bridge_eqdkp_roster\adodb\adodb.inc.php(451): ADOConnection->Connect(NULL, NULL, NULL, NULL, true) #2 \bridge_eqdkp_roster\sync_roster_members_with_eqdkp.php(24): ADOConnection->NConnect(NULL, NULL, NULL, NULL) #3 {main} thrown in \bridge_eqdkp_roster\adodb\adodb-exceptions.inc.php on line 76

From the looks of the error, its looking for the localhost database, but the database isn't stored on the localhost, its stored on anotehr server, for which i entered in the config.php file.
Last edited by Sonier on Sun Oct 26, 2008 2:59 am, edited 1 time in total.
Sonier
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Thu Aug 03, 2006 8:56 pm

Help needed fatal error in sync script

Postby Sonier » Mon Oct 27, 2008 7:33 pm

If this is a major error, then perhaps someone could give me a link to the sql script itself so that i can run it directly on the database ?

Thanks in advance
Sonier
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Thu Aug 03, 2006 8:56 pm

Help needed fatal error in sync script

Postby Sonier » Mon Oct 27, 2008 9:37 pm

ok, i'm going to dump the database and create 2 seperate db's, 1 for roster and 1 for eqdkp and see what happens, will keep you posted.
Sonier
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Thu Aug 03, 2006 8:56 pm

Help needed fatal error in sync script

Postby Sonier » Tue Nov 11, 2008 4:56 pm

Ok, i've got somewhere, i'm still unsure why, but i had to edit the NConnects and fill the info in manually, so my new code now looks like this.

// Connect all the databases
$db_eqdkp->NConnect('myhost', 'myuser', 'mypass', 'mydb');
$db_roster->NConnect('myhost', 'myuser', 'myadmin', 'mydb');

//Grab the arrays of EQDKP
$rseqdkp_classes = $db_eqdkp->Execute('SELECT class_id, class_name, class_min_level, class_max_level FROM wowdkp_classes');
$eqdkp_classes = $rseqdkp_classes->GetArray();
$rseqdkp_races = $db_eqdkp->Execute('SELECT race_id, race_name FROM wowdkp_races');
$eqdkp_races = $rseqdkp_races->GetArray();

Ok, now i don't get the error on line such and such, but my new problem is that the page does nothing, just blank.

Any advice?
Sonier
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Thu Aug 03, 2006 8:56 pm

Help needed fatal error in sync script

Postby Sonier » Tue Nov 11, 2008 5:15 pm

Ok, finally got it working.

I had to ditch the ocnfig file all together, and use that info in the main page itself, works a treat now :)
Sonier
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Thu Aug 03, 2006 8:56 pm

Help needed fatal error in sync script

Postby zanix » Wed Nov 12, 2008 8:43 am

Nice
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to EQDKP

Who is online

Users browsing this forum: No registered users and 0 guests

cron