These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

TEA (v1.3.1) - Member Management Mod for SMF 2, TeamSpeak 3 and Jabber

Author
Shin Chogan
Federal Navy Academy
Gallente Federation
#21 - 2013-09-24 20:29:16 UTC  |  Edited by: Shin Chogan
Xornicon Altair wrote:
Shin Chogan wrote:
Can you get the error out of your apache error logs please ... this doesn't happen for me either on my "production" forums or the one I use for testing.


[Tue Sep 24 19:51:06 2013] [error] [client 205.250.184.170] PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/www/forum/Sources/TEA.php:1981\nStack trace:\n#0 /home/www/forum/Sources/TEA.php(1981): SimpleXMLElement->__construct('')\n#1 /home/www/forum/Sources/TEA.php(1630): TEA->settings_rules('http://blackwat...')\n#2 /home/www/forum/Sources/TEA.php(3417): TEA->Settings('http://blackwat...')\n#3 /home/www/forum/Sources/Admin.php(519): ModifyTEASettings()\n#4 [internal function]: AdminMain()\n#5 /home/www/forum/index.php(151): call_user_func('AdminMain')\n#6 {main}\n thrown in /home/www/forum/Sources/TEA.php on line 1981, referer: http://blackwatchsyndicate.com/forum/index.php?action=admin;area=tea;sa=rules;save



hmmm ....

Sorry to ask but can you give me a step by step of exactly how you get to that error ?

edit : Bah ... forget that ... I see where the issue is.

Edit 2: Fundamentally though the problem is because you are not getting back XML from the API servers. Trouble is the TEA code isn't handling that very well.
Xornicon Altair
Black Watch Syndicate
#22 - 2013-09-25 04:16:18 UTC
Shin Chogan wrote:
Edit 2: Fundamentally though the problem is because you are not getting back XML from the API servers. Trouble is the TEA code isn't handling that very well.


That tells me WHAT the problem is, but, I have no idea how to fix it.

It also fails to accept my own API key.

This is the song....

Shin Chogan
Federal Navy Academy
Gallente Federation
#23 - 2013-09-26 13:27:53 UTC
Xornicon Altair wrote:
Shin Chogan wrote:
Edit 2: Fundamentally though the problem is because you are not getting back XML from the API servers. Trouble is the TEA code isn't handling that very well.


That tells me WHAT the problem is, but, I have no idea how to fix it.

It also fails to accept my own API key.

Replace line 1981 in TEA.php with :

Quote:

try{
$xml = new SimpleXMLElement($xml);
}
catch(Exception $e)
{
var_dump($xml);
var_dump($e);
die;
}


This is not a fix ... the code will stop rather than give the error 500 but it will print some info that I need to see in order to tell what you are getting instead of expected XML
Xornicon Altair
Black Watch Syndicate
#24 - 2013-09-26 22:29:22 UTC
Shin Chogan wrote:
This is not a fix ... the code will stop rather than give the error 500 but it will print some info that I need to see in order to tell what you are getting instead of expected XML


That dumped the following:

Quote:
bool(false) object(Exception)#6 (7) { ["message":protected]=> string(33) "String could not be parsed as XML" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(31) "/home/www/forum/Sources/TEA.php" ["line":protected]=> int(1982) ["trace":"Exception":private]=> array(6) { [0]=> array(6) { ["file"]=> string(31) "/home/www/forum/Sources/TEA.php" ["line"]=> int(1982) ["function"]=> string(11) "__construct" ["class"]=> string(16) "SimpleXMLElement" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> string(0) "" } } [1]=> array(6) { ["file"]=> string(31) "/home/www/forum/Sources/TEA.php" ["line"]=> int(1630) ["function"]=> string(14) "settings_rules" ["class"]=> string(3) "TEA" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> &string(46) "http://blackwatchsyndicate.com/forum/index.php" } } [2]=> array(6) { ["file"]=> string(31) "/home/www/forum/Sources/TEA.php" ["line"]=> int(3425) ["function"]=> string(8) "Settings" ["class"]=> string(3) "TEA" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> &string(46) "http://blackwatchsyndicate.com/forum/index.php" } } [3]=> array(4) { ["file"]=> string(33) "/home/www/forum/Sources/Admin.php" ["line"]=> int(519) ["function"]=> string(17) "ModifyTEASettings" ["args"]=> array(0) { } } [4]=> array(2) { ["function"]=> string(9) "AdminMain" ["args"]=> array(0) { } } [5]=> array(4) { ["file"]=> string(25) "/home/www/forum/index.php" ["line"]=> int(151) ["function"]=> string(14) "call_user_func" ["args"]=> array(1) { [0]=> &string(9) "AdminMain" } } } ["previous":"Exception":private]=> NULL }

This is the song....

Shin Chogan
Federal Navy Academy
Gallente Federation
#25 - 2013-09-27 09:00:35 UTC
ok ... do any API related functions work ?

So return that section to how it was. Then got to line 91 in TEAC.php :
Quote:

curl_close($ch);

Return $data;


change this to :

Quote:

curl_close($ch);
var_dump($data);die;
Return $data;


Again this is just more debug. Tell me what the result is. Depending on your browser and what is returned you may well need to view the page source to get the full content of what is returned.
Xornicon Altair
Black Watch Syndicate
#26 - 2013-09-27 10:24:17 UTC  |  Edited by: Xornicon Altair
Shin Chogan wrote:
Again this is just more debug. Tell me what the result is. Depending on your browser and what is returned you may well need to view the page source to get the full content of what is returned.


All it returned was this:

Quote:
bool(false)


That's even with looking at the page source.

And no, no other API related functions work.

An idea popped into my head. This server is freshly setup, I've never run anything else off of it. Is it possible that I missed a base pre-req? I can't think of anything that I missed... I got Apache2, PHP5, MySQL, curl, php5-mysql... I can't think of anything else that might be needed, but, did I possibly overlook something?

EDIT: when I try to add my own API key for checking, it gives me this error: [ERROR] Api must be of Type Character and show ALL toons :)

I've seen that before on here, so, I'll see if any of those fixes work for this.

EDIT2: Nope, no changes. I'll await your response.

This is the song....

Shin Chogan
Federal Navy Academy
Gallente Federation
#27 - 2013-09-27 10:51:31 UTC
Xornicon Altair wrote:
Shin Chogan wrote:
Again this is just more debug. Tell me what the result is. Depending on your browser and what is returned you may well need to view the page source to get the full content of what is returned.


All it returned was this:

Quote:
bool(false)


That's even with looking at the page source.

And no, no other API related functions work.

An idea popped into my head. This server is freshly setup, I've never run anything else off of it. Is it possible that I missed a base pre-req? I can't think of anything that I missed... I got Apache2, PHP5, MySQL, curl, php5-mysql... I can't think of anything else that might be needed, but, did I possibly overlook something?

EDIT: when I try to add my own API key for checking, it gives me this error: [ERROR] Api must be of Type Character and show ALL toons :)

I've seen that before on here, so, I'll see if any of those fixes work for this.

EDIT2: Nope, no changes. I'll await your response.


You are missing php5-curl ... BUT the code "should" warn you of this. If it isn't then we have another bug :)
Xornicon Altair
Black Watch Syndicate
#28 - 2013-09-27 18:24:41 UTC
Shin Chogan wrote:
You are missing php5-curl ... BUT the code "should" warn you of this. If it isn't then we have another bug :)


I've checked and it appears to be installed. On the possibility that there was something wrong with it, I removed it and reinstalled it and the same problem is occuring.

Any other pre-reqs that might be missing?

This is the song....

Shin Chogan
Federal Navy Academy
Gallente Federation
#29 - 2013-09-27 18:55:08 UTC
Xornicon Altair wrote:
Shin Chogan wrote:
You are missing php5-curl ... BUT the code "should" warn you of this. If it isn't then we have another bug :)


I've checked and it appears to be installed. On the possibility that there was something wrong with it, I removed it and reinstalled it and the same problem is occuring.

Any other pre-reqs that might be missing?



No not really ... the server can get to api.eveonline.com ?
Xornicon Altair
Black Watch Syndicate
#30 - 2013-09-28 00:22:23 UTC
Pings go through just fine. I tried telnet, but that failed. I would not be surprised if they have telnet blocked. How else might I test?

This is the song....

xHjfx
The Legion of Spoon
Curatores Veritatis Alliance
#31 - 2013-09-28 02:06:21 UTC
Xornicon Altair wrote:
Pings go through just fine. I tried telnet, but that failed. I would not be surprised if they have telnet blocked. How else might I test?


Telnet to port 443?
Xornicon Altair
Black Watch Syndicate
#32 - 2013-09-28 02:25:22 UTC
xHjfx wrote:
Xornicon Altair wrote:
Pings go through just fine. I tried telnet, but that failed. I would not be surprised if they have telnet blocked. How else might I test?


Telnet to port 443?


Thanks. This worked flawlessly.

So yes, I can contact the server without issue.

This is the song....

Shin Chogan
Federal Navy Academy
Gallente Federation
#33 - 2013-09-30 09:09:46 UTC  |  Edited by: Shin Chogan
Xornicon Altair wrote:
xHjfx wrote:
Xornicon Altair wrote:
Pings go through just fine. I tried telnet, but that failed. I would not be surprised if they have telnet blocked. How else might I test?


Telnet to port 443?


Thanks. This worked flawlessly.

So yes, I can contact the server without issue.



So you can connect to the api servers manually, you have php-curl installed but when it tries to make an API call you get nothing not even an error.

Silly clutch at straw here ... you do have https://api.eveonline.com set in the server field at the bottom of the Tea setting page ?
Xornicon Altair
Black Watch Syndicate
#34 - 2013-09-30 09:35:31 UTC
Shin Chogan wrote:
Xornicon Altair wrote:
xHjfx wrote:
Xornicon Altair wrote:
Pings go through just fine. I tried telnet, but that failed. I would not be surprised if they have telnet blocked. How else might I test?


Telnet to port 443?


Thanks. This worked flawlessly.

So yes, I can contact the server without issue.



So you can connect to the api servers manually, you have php-curl installed but when it tries to make an API call you get nothing not even an error.

Silly clutch at straw here ... you do have https://api.eveonline.com set in the server field at the bottom of the Tea setting page ?


Not such a straw. That, indeed, was the missing element! Many thank yous for your assistance!

This is the song....

Shin Chogan
Federal Navy Academy
Gallente Federation
#35 - 2013-09-30 09:53:45 UTC
Sweet ... Glad that fixed it coz I was out of ideas :)
Xornicon Altair
Black Watch Syndicate
#36 - 2013-09-30 09:58:09 UTC
Shin Chogan wrote:
Sweet ... Glad that fixed it coz I was out of ideas :)


Now it's time to figure out why that was missing in the first place. But, I guess that's up to you. I'm up and running and grateful for your help.

If you ever get into Amarr FW, look me up. I'd love to fly with you!

This is the song....

Diva Ex Machina
Caldari Provisions
Caldari State
#37 - 2013-10-03 16:54:18 UTC
A minor thing: On the modify profile > jabber tab page, the jabber account is not created until I go through the process of selecting an alt character > change profile > selected main character > add password > change profile.

Is this a problem you're aware of or do I just have a borked layout or something?
Shin Chogan
Federal Navy Academy
Gallente Federation
#38 - 2013-10-04 09:56:42 UTC
Diva Ex Machina wrote:
A minor thing: On the modify profile > jabber tab page, the jabber account is not created until I go through the process of selecting an alt character > change profile > selected main character > add password > change profile.

Is this a problem you're aware of or do I just have a borked layout or something?



Hmm ... not aware of that one ... when you say select alt character where are you selecting this.

Just as a note the Jabber account setup is a completely seperate step so you register/add api to your forum account (you have to save your profile if you are adding an api) that then go to the jabber page and select a toon and set a password and save that.
Diva Ex Machina
Caldari Provisions
Caldari State
#39 - 2013-10-04 10:50:30 UTC
Thanks for replying so quickly.

Shin Chogan wrote:
Diva Ex Machina wrote:
A minor thing: On the modify profile > jabber tab page, the jabber account is not created until I go through the process of selecting an alt character > change profile > selected main character > add password > change profile.

Is this a problem you're aware of or do I just have a borked layout or something?



Hmm ... not aware of that one ... when you say select alt character where are you selecting this.

Just as a note the Jabber account setup is a completely seperate step so you register/add api to your forum account (you have to save your profile if you are adding an api) that then go to the jabber page and select a toon and set a password and save that.


That's exactly the tab page I am talking about. Lol

Under the Profile menu item, select TEMAR's Eve Api
Go to the Jabber tab page

If I select my main char, enter a password and save it (by clicking change profile), the jabber account isn't created. No messages other than your profile is updated. I thought for a while my settings were bad or something until I tried selecting an alt char and saving, and then selecting my main again and saving again, then noticed the jabber account was created.. I deleted the account on jabber and tried again. Same thing. I tested it a few more times and same thing every time. I am not sure why that is exactly.

If you can give a hint about which file the jabber form is in perhaps I can go in and look at the code and see what the problem might be.

Also, do you know of any plugins available for SMF that support eve fittings and other in game browser functions? I had a search around and the only ones I could find seem to be abandoned. In my opinion this is the only area in which SMF doesn't surpass phpBB as a forum for Eve alliances.
Shin Chogan
Federal Navy Academy
Gallente Federation
#40 - 2013-10-04 11:20:11 UTC
Diva Ex Machina wrote:
Thanks for replying so quickly.

Shin Chogan wrote:
Diva Ex Machina wrote:
A minor thing: On the modify profile > jabber tab page, the jabber account is not created until I go through the process of selecting an alt character > change profile > selected main character > add password > change profile.

Is this a problem you're aware of or do I just have a borked layout or something?



Hmm ... not aware of that one ... when you say select alt character where are you selecting this.

Just as a note the Jabber account setup is a completely seperate step so you register/add api to your forum account (you have to save your profile if you are adding an api) that then go to the jabber page and select a toon and set a password and save that.


That's exactly the tab page I am talking about. Lol

Under the Profile menu item, select TEMAR's Eve Api
Go to the Jabber tab page

If I select my main char, enter a password and save it (by clicking change profile), the jabber account isn't created. No messages other than your profile is updated. I thought for a while my settings were bad or something until I tried selecting an alt char and saving, and then selecting my main again and saving again, then noticed the jabber account was created.. I deleted the account on jabber and tried again. Same thing. I tested it a few more times and same thing every time. I am not sure why that is exactly.

If you can give a hint about which file the jabber form is in perhaps I can go in and look at the code and see what the problem might be.

Also, do you know of any plugins available for SMF that support eve fittings and other in game browser functions? I had a search around and the only ones I could find seem to be abandoned. In my opinion this is the only area in which SMF doesn't surpass phpBB as a forum for Eve alliances.


I can't replicate that behaviour at all.
I had a test account with no API key.
Added key and hit save.
Selected main character and hit save.
Went to Jabber page (main toon was already selected) added password and hit save ... look on jabber server and the account is there.

All the Jabber stuff is in TEA_Jabber.php and TEA_Jabber_OF.php ( _OF is the utility functions most of which are unused :) )

As for the rest of it no I don't know of any fittings/IGB functions. What exactly are you looking for in terms of IGB functions ?