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.
 

[EVEOTS] Eve Online Teamspeak 3 API Registration with PHP5 v1.8

First post
Author
Atock
Paradise Team
#61 - 2011-12-12 12:08:50 UTC
MJ Maverick wrote:
Sjet Idahon wrote:
Hey MJ,

i installed EVEOTS on my Windows vServer but when i try to register an User, an error occurs.

An error occured: API Date could not be read / parsed, original exception: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed [117]

- Sjet -

Very strange, haven't heard of that before. I know what it is though. That is basically the API server not responding. Now, this could be a temporary problem at CCPs end in which case just try again later. However it's worth checking with your provider and going over your server settings to see if there is anything that is checking if SSL certificates are valid (CCP seem to have a problem with that from time to time). If there is such an option, disable it.


I had the same issue on my server, even though the certificate should be fine. The error is actually caused in the pheal library (pheal.php) when it tries to establish a connection via curl and checks the certificate. This fails for some reason and throws an exception.
For testing purposes I bypassed the certificate check via inserting:
curl_setopt (self::$curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt (self::$curl, CURLOPT_SSL_VERIFYPEER, 0);
at line 324.
Well it works now... but that's certainly not a solution to live with ;)
MJ Maverick
Hybrid Industrial
#62 - 2011-12-12 16:54:06 UTC
Unfortunately if it's a Pheal problem then I can't really make a fix, only work around's so if that works for you then good find. :)
Atock
Paradise Team
#63 - 2011-12-15 18:55:34 UTC
MJ Maverick wrote:
Unfortunately if it's a Pheal problem then I can't really make a fix, only work around's so if that works for you then good find. :)


Hehe yeah took me some time ;) But besides that issue it really works perfectly and we finally have a working TS3 right management system for our alliance.
MJ Maverick
Hybrid Industrial
#64 - 2011-12-15 22:06:37 UTC  |  Edited by: MJ Maverick
Glad to of helped. :)

Don't forget to Like the OP.
Yegar
Deep Core Mining Inc.
Caldari State
#65 - 2012-01-08 01:47:40 UTC  |  Edited by: Yegar
Atock wrote:
MJ Maverick wrote:
Sjet Idahon wrote:
Hey MJ,

i installed EVEOTS on my Windows vServer but when i try to register an User, an error occurs.

An error occured: API Date could not be read / parsed, original exception: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed [117]

- Sjet -

Very strange, haven't heard of that before. I know what it is though. That is basically the API server not responding. Now, this could be a temporary problem at CCPs end in which case just try again later. However it's worth checking with your provider and going over your server settings to see if there is anything that is checking if SSL certificates are valid (CCP seem to have a problem with that from time to time). If there is such an option, disable it.


I had the same issue on my server, even though the certificate should be fine. The error is actually caused in the pheal library (pheal.php) when it tries to establish a connection via curl and checks the certificate. This fails for some reason and throws an exception.
For testing purposes I bypassed the certificate check via inserting:
curl_setopt (self::$curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt (self::$curl, CURLOPT_SSL_VERIFYPEER, 0);
at line 324.
Well it works now... but that's certainly not a solution to live with ;)


This is what I need but I'm not sure where to put it. I open pheal.php but the formatting is all nuts and I don't have a line 324. Can you tell me what comes before and after the needed input?

Thanks,

Yegar

Nevermind.. I got Notepad ++ :)
Yegar
Deep Core Mining Inc.
Caldari State
#66 - 2012-01-08 02:05:41 UTC  |  Edited by: Yegar
I got past the SSL issue (also hosting on a windows machine) and am now getting:

Quote:
An error occured: API Date could not be read / parsed, original exception: String could not be parsed as XML [117]


This happens when trying to register my alt.

I verified the character ID in config.php for the API connection test. I even reverted back to yours as this is the instruction in the errors section of the read-me.

Thanks,

Yegar

---EDIT---

I believe I've narrowed the issue down to the "make sure API is up" section -- but I'm not sure what the issue could be. I've tried my character name and ID and yours.

I'm in debugging and never get "API Connection was established." (pulled expected response from the code)
MJ Maverick
Hybrid Industrial
#67 - 2012-01-08 04:05:57 UTC
Theoretically, if this link is working. All should be good with the API service : http://api.eveonline.com/eve/CharacterID.xml.aspx?&names=MJ%20Maverick

Does this error only occur with your alt? How old is your alt and what version of PHP are you running?
Yegar
Deep Core Mining Inc.
Caldari State
#68 - 2012-01-08 04:10:44 UTC
It happens with any char... because it isn't getting to that point. SO I commented out all of the API server test stuff in index.php and can now enter a character. I submit and get an error 500 like the code is broken... BUT.. if I do little things like put a space in the API key then it kicks back the appropriate error for a space (interesting)

Anyhow, thanks for the reply, any help is appreciated. The error is occurring at the API server "ping" (as I interpret it)

Yegar
Yegar
Deep Core Mining Inc.
Caldari State
#69 - 2012-01-08 04:11:53 UTC  |  Edited by: Yegar
MJ Maverick wrote:
Theoretically, if this link is working. All should be good with the API service : http://api.eveonline.com/eve/CharacterID.xml.aspx?&names=MJ%20Maverick

Does this error only occur with your alt? How old is your alt and what version of PHP are you running?


That link starts with
Quote:
This XML file does not appear to have any style information associated with it. The document tree is shown below


Does that mean anything?

--EDIT--

Sorry, I'm using the latest PHP I would hope (just downloaded today)

---EDIT EDIT---

v5.3
MJ Maverick
Hybrid Industrial
#70 - 2012-01-08 16:27:59 UTC  |  Edited by: MJ Maverick
Is the PHP extension "php_openssl.dll" enabled?

http://php.net/manual/en/install.windows.extensions.php
extension=php_openssl.dll
Yegar
Deep Core Mining Inc.
Caldari State
#71 - 2012-01-08 20:10:12 UTC
MJ Maverick wrote:
Is the PHP extension "php_openssl.dll" enabled?

http://php.net/manual/en/install.windows.extensions.php
extension=php_openssl.dll



Yes, and the associated .dll is present.
MJ Maverick
Hybrid Industrial
#72 - 2012-01-08 22:14:25 UTC
Unfortunately with that error it is almost certainly something not configured right on your server. I've been Google'ing and there's a hundred and one reasons this could happen. As I don't know how your server is configured it would be for more constructive for you to do it.

Google the original PHP error: "String could not be parsed as XML"
Yegar
Deep Core Mining Inc.
Caldari State
#73 - 2012-01-08 23:35:36 UTC
MJ Maverick wrote:
Unfortunately with that error it is almost certainly something not configured right on your server. I've been Google'ing and there's a hundred and one reasons this could happen. As I don't know how your server is configured it would be for more constructive for you to do it.

Google the original PHP error: "String could not be parsed as XML"



I'm terribly uneducated on this stuff.. but love figureing it out. Can you provide a bit of a translation? What string is being parsed in that section of code? Is it the charID or character name or both?
Yegar
Deep Core Mining Inc.
Caldari State
#74 - 2012-01-09 00:15:44 UTC
Ok.. so maybe a connection error between my server and the API server?

I commented out the API server check again and this time the code advances to the "make sure API is for the account and has no expiry" and fails there on line 162.

Now this raises a question because I disabled the SSL stuff using the two lines of code suggested above, but the site still reaches out to the https API server.... does that matter?
MJ Maverick
Hybrid Industrial
#75 - 2012-01-09 01:15:59 UTC
This is what the server is failing to parse at line 117:
http://api.eveonline.com/eve/CharacterInfo.xml.aspx?&characterID=935338328

It is failing to read that XML, or interpret it at least. I bet 162 fails for the same reason, whenever XML needs parsing your server hits a brick wall. I'm sorry I can't be of more help but I think this one is definitely one you should raise with your host. They will know far more about your server setup than me. :/
Yegar
Deep Core Mining Inc.
Caldari State
#76 - 2012-01-09 01:17:59 UTC
MJ Maverick wrote:
This is what the server is failing to parse at line 117:
http://api.eveonline.com/eve/CharacterInfo.xml.aspx?&characterID=935338328

It is failing to read that XML, or interpret it at least. I bet 162 fails for the same reason, whenever XML needs parsing your server hits a brick wall. I'm sorry I can't be of more help but I think this one is definitely one you should raise with your host. They will know far more about your server setup than me. :/



Unfortunately I am my host :)

I guess I'm not getting out of this for free :(

Thank you for your time though!
MJ Maverick
Hybrid Industrial
#77 - 2012-01-09 04:59:20 UTC
mail me a link to your php.ini and I'll have quick look to see if there is anything obvious.
ArtjomN
Federal Navy Academy
Gallente Federation
#78 - 2012-01-11 09:44:37 UTC
In cron.php
After line you need too add $errors = false;
or you will get
PHP Notice: Undefined variable: errors in /usr/local/www/apache22/data/eveots/cron.php on line 212
MJ Maverick
Hybrid Industrial
#79 - 2012-01-11 22:44:16 UTC
Ahh the joys of Schizophrenia mode. Fixed in 1.8
Yegar
Deep Core Mining Inc.
Caldari State
#80 - 2012-01-14 02:13:50 UTC  |  Edited by: Yegar
So.. wow..


I transferred everything to my corps host.. which immediately cured my current issue. Of course I had to troubleshoot some connection issues to get back to my home SQL server, got that. Then the site was making it all the way to attempting to connect to the TS server. While trouble shooting the serverquery the site somehow reverted to the 117 error.... ouch.

I'm still troubleshooting... just thought I'd give an update.

__edit__

Just tried again and the 117 cleared itself up. Getting connection refused (F10)