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.
 

Teamspeak and phpBB Forums EVE Online API Registration System

Author
Drake Draconis
Brutor Tribe
Minmatar Republic
#101 - 2011-10-03 20:35:20 UTC  |  Edited by: Drake Draconis
MisterMagotchi wrote:
Drake Draconis wrote:
Lets just say that when people get kicked or API keys expire too soon I don't want them to be able to do certain things that "registered" users can do.
Every user is a Registered User. A user even with a new, freshly created account, is a Registered User, possibly in addition to other groups (like Newly Registered Users). Normally to give a user extra permissions, they are then added to another group, but they aren't removed from Registered Users. Are not 100% of all your human users in the Registered Users group?


I quarentine failed API accounts to keep things easy to sort out from registered users group.

Basically its to prevent abuse for those who get booted and want to cause trouble that requires registered user access.

While every user is a reigstered user...not all have default access in that group necessarily.

================ STOP THE EVEMAIL SPAM! https://forums.eveonline.com/default.aspx?g=posts&t=78152

MisterMagotchi
Deep Core Mining Inc.
Caldari State
#102 - 2011-10-05 01:56:59 UTC
Gary:

One person so far has asked for such a feature, not "so many". I maintain that 100% of all human users should always be in the Registered Users group, EVE usage aside. To only show the link to users who have not already registered is a bad idea also, as it doesn't make it easy for people to change their API key if they feel like it or to change their registered character (if they have multiple in registered corps.).

The Registered Users group should always be in the ignore list. It's a bad idea to remove users from that group.

You shouldn't have to add any lines to the code to do that. Line 115 of the current code for check-users.php is where you can set the forums group failed users go into upon failure. However, and this is the contention of this whole argument, to change that value is unsupported and in my opinion a bad idea, so I don't have any plans to add it to the configuration, in order to prevent confusion and data loss (the accidental removal of a bunch of users from the Registered Users group).

Drake:

I still don't understand. If you don't want failed API users to cause trouble, then don't give the Registered Users group very much power. There's no reason why a failed API user should be in a different category than a random Joe Blow that freshly registers on the forums as far as permissions go.

Anyway, as said, you can change it on line 115, but until someone gives me an explanation of the broad appeal of this, which I contest should be 0 with my current knowledge, it's an unsupported option.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#103 - 2011-10-06 18:04:31 UTC  |  Edited by: MisterMagotchi
Big problem:

Apparently when EVE's API server isn't completely down, it sometimes gives other error messages about being disabled.

My code currently wasn't explicitly checking for the bad API key error message, but was saying the key was bad if it just couldn't get the character list info.

This means that in this state, likely many registered people will get unregistered.

I just lost 13 people this morning.

I hope you guys have backups.

I'll be releasing a fix soon.

EDIT:
I can't fix it yet, as the API server is still down with the message, "Web site database temporarily disabled."

EDIT:
Now it says, "EVE backend database temporarily disabled."
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#104 - 2011-10-07 01:59:22 UTC
New version released.

From my changelog: "2011-10-06 - 1.56 - Fixed users having registration deleted when EVE API server gives error messages other than authentication failures. Made similar fix in registration script to differentiate between a bad key and the API server giving other errors. Added forums link to end of registration script success message. Caused the Username column to sort case insensitively in registration list. Minor documentation changes."

Changed files (replace): setup.inc.php, eve-api-get-names.json.php, admin/index.php, readme.html
Eugene Spencer
Stribog Proving
#105 - 2011-10-07 11:10:27 UTC
Thanks for the updated. One of my users reported the issue twenty minutes ago. Patched and all sorted.

Cheers again!

Eugene

I have a specific comb for my beard.

Drake Draconis
Brutor Tribe
Minmatar Republic
#106 - 2011-10-08 21:23:39 UTC
Much thanks for the update!

:)

================ STOP THE EVEMAIL SPAM! https://forums.eveonline.com/default.aspx?g=posts&t=78152

Rache Le'Bonbon
Aliastra
Gallente Federation
#107 - 2011-10-10 01:50:45 UTC
I have tried and tried to get this working and for some reason after I put in the API info, and click to get the characters... NOTHING it acts as if clicking that part has no effect on the script what so ever. Does anyone have any idea what could be causing this problem?

Thank you in advance
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#108 - 2011-10-10 02:50:10 UTC
For one, it requires Javascript, but I assume you have that enabled.

When you change focus away from the API Key ID or Verification Code boxes (clicking anywhere else basically), either you should get some form of error message, or the characters list should populate with characters you have in registered corps.

If you want to send me a mail or email with your comms. details, I could help walk you through it.
TA5E
Caldari Provisions
Caldari State
#109 - 2011-10-10 06:03:58 UTC  |  Edited by: TA5E
The change event doesn't get triggered when you click the drop down box, you need to click elsewhere on the page.

Also, the json script stalls at

$characters = simplexml_load_file('https://api.eveonline.com/account/APIKeyInfo.xml.aspx?keyID=' . $_POST['Key_ID'] . '&Vcode=' . $_POST['Key_Ver_Code'])
or die(json_encode(array('error' => 'Error connecting to EVE API server.')));

I hard coded the key id and the vcode and removed the previous checks and put a die right after that, but the simplexml_load_file never loads.

EDIT:

SOLUTION for 1and1 Hosting: They have disabled allow_url_fopen, which is what simplexml_load_file is. So add that to a php.ini file in your api folder.

Herp derp. Tho it would be cool if you included the jquery.min.js file with the rar (if there are no copyright things).
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#110 - 2011-10-10 07:50:07 UTC
I prefer just having it load the latest version of jQuery from Google. Many people already have it cached anyway, as a lot of sites do that.
Eugene Spencer
Stribog Proving
#111 - 2011-10-10 13:09:04 UTC
Hi B4D W0LF,

Would it be possible to have some kind of visual to tell the user that work is going on in the background? A wee loading gif or something? Feedback from my users suggest that people don't think anything is happening after they enter their API details. Sometimes it can take a while for the script to retrieve the API data and users have been refreshing and re-entering their details, since they think nothing is happening.

Just a thought!
Eugene

I have a specific comb for my beard.

Rache Le'Bonbon
Aliastra
Gallente Federation
#112 - 2011-10-10 14:00:49 UTC
My PHP Info shows all that is ON. My hosting company allows us to change php.ini settings, but the script is def stalling someplace. I hate when things pause and give ya no clue on where it paused lol.

Also TA5E you can get the latest version of jquery from http://jquery.com/ and put it into your site.
Rache Le'Bonbon
Aliastra
Gallente Federation
#113 - 2011-10-10 16:08:57 UTC
YEA!!! I found the problem!!

There is currently a certificate problem with

https://api.eveonline.com/account/APIKeyInfo.xml.aspx?

You can get the same info with just

http://api.eveonline.com/account/APIKeyInfo.xml.aspx?

So no need to use a HTTPS site to get the info as web certs can and will cause problems with scripts if they are out of date.

I knew it was something simple so I just made a simple script to test out the simplexml_load_file function. I was still not receiving any information so I used CURL to try and get the information. Upon using CURL it informed me

"Error fetching data: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"

So I changed it from HTTPS to HTTP using simplexml and it worked like a charm.
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#114 - 2011-10-10 18:46:29 UTC
Rache: You're welcome to use the HTTP version if you want, but there's nothing wrong with the HTTPS site on their end, and I recommend the HTTPS over the HTTP for the fact that when you use SSL you aren't transmitting API Key information in plain text.

Eugene: I've thought about some sort of loading thing, but as you say, it would only be a meaningless passive loading indicator like a GIF. I'll plan to do that for the next release, On mine, as long as the API server isn't down, it's instant. The most I ever see it take is about 3 seconds. I've also never had anyone mention that as a problem in the past in my alliance, but I admit I've thought of it myself. Working with it the other day when the API server was sluggish/down for a while, though, I definitely saw where the need might be in that area either the API server or one's web server is slow.
Rache Le'Bonbon
Aliastra
Gallente Federation
#115 - 2011-10-10 18:53:12 UTC
True, you are not transmitting the API key, However as you see from my post above "SSL certificate problem, verify that the CA cert is OK" A problem does exist someplace lol. I haven't used simplexml very much. Is there a command to ignore Cert's? I would prefer to use SSL if I could. Ill also look up on google as well and see if I cant find a ignore command.
TA5E
Caldari Provisions
Caldari State
#116 - 2011-10-10 19:00:04 UTC
My 1and1 webhost doesn't seem to want to do "exec("php check-users.phhp"); or any "exec("php...");

Tho exec("echo 'hello'"); works.
Rache Le'Bonbon
Aliastra
Gallente Federation
#117 - 2011-10-10 19:09:43 UTC
Make sure you can use exec in your hosting companies site, also can you add a php.ini to your site. Some hosting companies allow this and it helps a lot, you can modify php to your liking.
Drake Draconis
Brutor Tribe
Minmatar Republic
#118 - 2011-10-10 19:32:57 UTC  |  Edited by: Drake Draconis
EDIT: Nm.


1 And 1 user here as well... I do have some sort of fix here but I can't recall what it took to get mine working...

I'll need to look into that when I get the chance.

Odd thing to report.... I only see 1 user reported in the error log but no one else shows up in that log.

================ STOP THE EVEMAIL SPAM! https://forums.eveonline.com/default.aspx?g=posts&t=78152

Rache Le'Bonbon
Aliastra
Gallente Federation
#119 - 2011-10-10 21:37:16 UTC  |  Edited by: Rache Le'Bonbon
Now I am having the problem that it is not connecting to my TS3 server. I know all ports are open I can access and modify the Teamspeak 3 Server from the same server. Anyone have any idea's to try?

Yes my white list has been updated, and working properly as I can connect with the admin website.

This is the error msg I am receiving!

Error connecting to TS server to check whether or not the Teamspeak Unique ID you entered is recognized by the Teamspeak server.

But everything is correct I must have checked it a 100 times now..
MisterMagotchi
Deep Core Mining Inc.
Caldari State
#120 - 2011-10-10 21:37:30 UTC  |  Edited by: MisterMagotchi
TASE:
You need to edit line 263 of index.php in the current package and change "php" to "/usr/bin/php5" (the full path to PHP5 on your host). You also need to change the cron job to use "/usr/bin/php5".

I may make that a config. option in the next release. I won't be able to fix the cron job part, but I guess I can make a note about it in the documentation. In a properly configured environment, in my opinion, "php" should point to the latest version of PHP on the server, but in 1and1's case, they're using PHP4 and PHP5 concurrently, so for compatibility, they have PHP4 as the default.

I believe you also need to do as Rache says on 1&1 with the php.ini file (make a php.ini file in the directory that contains "allow_url_fopen = On"). I think Drake had to do that as well.

Drake:
Either you haven't had anybody lose their registration and haven't otherwise had errors, or there's a problem. Try editing your entry directly in the EVE Registration table in the database so that your Verification Code is invalid, and set your Cached Until timestamp to something way in the past, and see if it then revokes your privileges and puts an error in the log.