stiez / pos-tracker-eve

Automatically exported from code.google.com/p/pos-tracker-eve
0 stars 0 forks source link

String could not be parsed as XML #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Admin Panel / Add an API Key

2. Enter API / Select Character

3. Error " String could not be parsed as XML "

What is the expected output? What do you see instead?

Expected output is to add the corporation api :)
An error

What version of the POS Tracker are you using?

5.2

Please provide any additional information below.

Was working perfectly on 5.1.7 Thought it was an upgrade issue so tried a 
completly fresh install still same issue.

Thanks

Original issue reported on code.google.com by duanewar...@gmail.com on 25 Jan 2012 at 2:25

GoogleCodeExporter commented 9 years ago
Sorry about this POST seems as though my host has issues checking on this now 
and will get back to you.

Original comment by duanewar...@gmail.com on 25 Jan 2012 at 3:01

GoogleCodeExporter commented 9 years ago
i am also getting this after i did 2 fresh install any ideas?

Original comment by Steve.ch...@gmail.com on 26 Jan 2012 at 3:20

GoogleCodeExporter commented 9 years ago
Just to make sure, try again as there was two API downtimes in the last 2 days 
and want to make sure it isn't that.

Original comment by frozenic...@gmail.com on 26 Jan 2012 at 5:00

GoogleCodeExporter commented 9 years ago
To add, you didn't by chance have this on the installer requirements did you?

CURL: No (Will use fopen)

as that means you will need to get CURL going as the fopen option is no longer 
available.

Original comment by frozenic...@gmail.com on 26 Jan 2012 at 5:05

GoogleCodeExporter commented 9 years ago
Thank you for choosing POS-Tracker FG Version! Please fill the form to set the 
database information.

    Current PHP version: 5.2.17 (Needs to be greater than 5.1.2)
    Your CURL Version: 7.15.5

Required Modules Installed

    CURL: Yes
    SimpleXML: Yes
    Hash: Yes
    Register_globals: Off
    cache/template_c: OK
    eveconfig/dbconfig.php: OK

Original comment by Steve.ch...@gmail.com on 26 Jan 2012 at 6:34

GoogleCodeExporter commented 9 years ago
Hrmm try this...

Edit your class.pos.php under the includes folder and if on 5.2.0 go to line 
5229

     * POSMGMT::API_ProxySelect()

Then look for this line here:

$apiURL = "https://api.eveonline.com";

and replace it with

$apiURL = "http://api.eveonline.com";

see what happens. If that does work that's good....but also bad because then it 
means you can't connect to the secure API which is going to be required "soon" 
for all API calls.

Original comment by frozenic...@gmail.com on 26 Jan 2012 at 9:17

GoogleCodeExporter commented 9 years ago
still getting the same issue :(

Original comment by Steve.ch...@gmail.com on 26 Jan 2012 at 11:36

GoogleCodeExporter commented 9 years ago
i think it could be the CURL Verison as we ran it on a diff server with a newer 
verison and it works fine 

Original comment by Steve.ch...@gmail.com on 26 Jan 2012 at 11:37

GoogleCodeExporter commented 9 years ago
I still believe this is a server side issue on my part, however i did just test 
the Above Fix, and i also installed a copy of 5.1.6 i had to hand and same 
issue. so this is not down to curl :)

Original comment by duanewar...@gmail.com on 27 Jan 2012 at 1:50

GoogleCodeExporter commented 9 years ago
Okay so what I would like each one of you to do is download this file:

http://iceneko.com/eve/the_test.zip

and extract the special class.pos.php file and replace it in your includes 
folder. Then go to the admin panel and put in your API information and hit 
Select Characters.

Now you should get a huge list of information and your menu will have gone down 
below all this. I wish you to send this to me at frozenice2525@gmail.com of 
course go ahead and edit the vCode if you like so I can't get your API data(or 
just make a temporary, your choice) but I ask that pretty much everything else 
be left alone unless for some super secret reason you can't show me your 
character names. What gets sent to me will only be seen by me and deleted 
afterwards.

Original comment by frozenic...@gmail.com on 27 Jan 2012 at 6:06

GoogleCodeExporter commented 9 years ago
Replaced class.pos.php added api Hit select character and got 

Error: String could not be parsed as XML

However i have seen you use simpleXML and as i said before i believe my issue 
is definatly server side and has something to do with simpleXML.

http://pandora-sphere.com/test.php

I really am sorry for waisting your time, and im placing a bet Steve has the 
same server provider i do :)

Original comment by duanewar...@gmail.com on 27 Jan 2012 at 8:43

GoogleCodeExporter commented 9 years ago
still get the same error as before like duanewar is 

Original comment by Steve.ch...@gmail.com on 27 Jan 2012 at 11:30

GoogleCodeExporter commented 9 years ago
I figured it was server side and don't feel sorry. I want to get this working 
for you guys if I can figure out a solution. So you guys get no errors besides 
the simpleXML error?

Okay so what I did is modify the file again so it doesn't override the 
additional data.

http://iceneko.com/eve/the_test2.zip

Original comment by frozenic...@gmail.com on 27 Jan 2012 at 5:37

GoogleCodeExporter commented 9 years ago
One more test version, this is specific to curl and it's a long shot but hey 
why not.

http://iceneko.com/eve/curl_test.zip after putting this version in just do as 
the same steps as before admin panel / add api

Original comment by frozenic...@gmail.com on 27 Jan 2012 at 6:29

GoogleCodeExporter commented 9 years ago
for the 1st one Test2 i got this when i added API

Extensions: Array
(
    [0] => date
    [1] => libxml
    [2] => openssl
    [3] => pcre
    [4] => zlib
    [5] => bz2
    [6] => calendar
    [7] => ctype
    [8] => hash
    [9] => filter
    [10] => ftp
    [11] => gettext
    [12] => gmp
    [13] => session
    [14] => iconv
    [15] => Reflection
    [16] => standard
    [17] => shmop
    [18] => SimpleXML
    [19] => SPL
    [20] => sockets
    [21] => exif
    [22] => tokenizer
    [23] => xml
    [24] => apache2handler
    [25] => imagick
    [26] => bcmath
    [27] => curl
    [28] => dba
    [29] => dbase
    [30] => dom
    [31] => gd
    [32] => imap
    [33] => json
    [34] => ldap
    [35] => mbstring
    [36] => mcrypt
    [37] => mhash
    [38] => mssql
    [39] => mysql
    [40] => mysqli
    [41] => ncurses
    [42] => odbc
    [43] => PDO
    [44] => pdo_dblib
    [45] => pdo_mysql
    [46] => PDO_ODBC
    [47] => pdo_pgsql
    [48] => pdo_sqlite
    [49] => pgsql
    [50] => posix
    [51] => pspell
    [52] => recode
    [53] => snmp
    [54] => soap
    [55] => SQLite
    [56] => sysvmsg
    [57] => sysvsem
    [58] => sysvshm
    [59] => tidy
    [60] => wddx
    [61] => xmlreader
    [62] => xmlrpc
    [63] => xmlwriter
    [64] => xsl
    [65] => zip
    [66] => ionCube Loader
    [67] => Zend Optimizer
)

APIURL: https://api.eveonline.com

URL: /account/Characters.xml.aspx

DATA: Array
(
    [keyID] => 334076
    [vCode] => fulGctLQCtYoyi9e9LVt2gnr8wMY1Q9d14s7JJ9UVlAYVs89nIqSt4joKhQrsKoD
    [version] => 2
)

CONTENT: 

XML: 

Fatal error: Call to a member function xpath() on a non-object in 
/datasan/www/vhosts/pink/httpdocs/pos/includes/class.pos.php on line 4283

And for the 2nd one curl test i got the same as as i was before 

Original comment by Steve.ch...@gmail.com on 27 Jan 2012 at 6:34

GoogleCodeExporter commented 9 years ago
Okay that tells me cURL isn't sending anything back. So lets see why:

http://iceneko.com/eve/the_test3.zip

This will not only create information on the screen but also make a request.txt 
file under your includes folder.

Original comment by frozenic...@gmail.com on 27 Jan 2012 at 8:32

GoogleCodeExporter commented 9 years ago
Test3 Results

Warning : SSL: certificate subject name 'cloud03.unlimitedwebhosting.co.uk' 
does not match target host name 'api.eveonline.com'

Info: Array ( [url] => https://api.eveonline.com/account/Characters.xml.aspx 
[content_type] => [http_code] => 0 [header_size] => 0 [request_size] => 0 
[filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 
0 [namelookup_time] => 0.00011 [connect_time] => 0.000195 [pretransfer_time] => 
0 [size_upload] => 0 [size_download] => 0 [speed_download] => 0 [speed_upload] 
=> 0 [download_content_length] => 0 [upload_content_length] => 0 
[starttransfer_time] => 0 [redirect_time] => 0 )

1

Completed. Check in your folder for request.txt 

dont see were this file is tho 

Original comment by Steve.ch...@gmail.com on 27 Jan 2012 at 11:23

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It should be in where your class.pos.php file is.

Original comment by frozenic...@gmail.com on 28 Jan 2012 at 12:17

GoogleCodeExporter commented 9 years ago
Though that one warning kinda gave me an idea.

http://iceneko.com/eve/the_test4.zip

If the warning goes away then try the 2nd file in the folder.

Thanks by the way for testing all this :)

Original comment by frozenic...@gmail.com on 28 Jan 2012 at 12:26

GoogleCodeExporter commented 9 years ago
* About to connect() to api.eveonline.com port 443
*   Trying 127.0.0.1... * connected
* Connected to api.eveonline.com (127.0.0.1) port 443
* successfully set certificate verify locations:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*    subject: 
/C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=cl
oud03.unlimitedwebhosting.co.uk/emailAddress=root@cloud03.unlimitedwebhosting.co
.uk
*    start date: 2011-09-17 13:42:39 GMT
*    expire date: 2012-09-16 13:42:39 GMT
* SSL: certificate subject name 'cloud03.unlimitedwebhosting.co.uk' does not 
match target host name 'api.eveonline.com'
* Closing connection #0

That the request file details

Original comment by Steve.ch...@gmail.com on 28 Jan 2012 at 1:00

GoogleCodeExporter commented 9 years ago
#Test 4 Results

Open the file and upload the 1st file and got this:

Warning :

Info: Array ( [url] => https://api.eveonline.com/account/Characters.xml.aspx 
[content_type] => text/html; charset=iso-8859-1 [http_code] => 404 
[header_size] => 145 [request_size] => 246 [filetime] => -1 [ssl_verify_result] 
=> 18 [redirect_count] => 0 [total_time] => 0.018236 [namelookup_time] => 
8.7E-5 [connect_time] => 0.000157 [pretransfer_time] => 0.017715 [size_upload] 
=> 0 [size_download] => 225 [speed_download] => 12338 [speed_upload] => 0 
[download_content_length] => 225 [upload_content_length] => 0 
[starttransfer_time] => 0.018226 [redirect_time] => 0 )

1

Completed. Check in your folder for request.txt

Original comment by Steve.ch...@gmail.com on 28 Jan 2012 at 1:04

GoogleCodeExporter commented 9 years ago
Request file:

* About to connect() to api.eveonline.com port 443
*   Trying 127.0.0.1... * connected
* Connected to api.eveonline.com (127.0.0.1) port 443
* successfully set certificate verify locations:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*    subject: 
/C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=cl
oud03.unlimitedwebhosting.co.uk/emailAddress=root@cloud03.unlimitedwebhosting.co
.uk
*    start date: 2011-09-17 13:42:39 GMT
*    expire date: 2012-09-16 13:42:39 GMT
*    issuer: 
/C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=cl
oud03.unlimitedwebhosting.co.uk/emailAddress=root@cloud03.unlimitedwebhosting.co
.uk
* SSL certificate verify result: self signed certificate (18), continuing 
anyway.
> POST /account/Characters.xml.aspx HTTP/1.1
Host: api.eveonline.com
Accept: */*
Content-Length: 93
Content-Type: application/x-www-form-urlencoded

keyID=334076&vCode=fulGctLQCtYoyi9e9LVt2gnr8wMY1Q9d14s7JJ9UVlAYVs89nIqSt4joKhQrs
KoD&version=2< HTTP/1.1 404 Not Found
< Date: Sat, 28 Jan 2012 01:02:09 GMT
< Server: Apache
< Content-Length: 225
< Content-Type: text/html; charset=iso-8859-1
* Connection #0 to host api.eveonline.com left intact
* Closing connection #0

Original comment by Steve.ch...@gmail.com on 28 Jan 2012 at 1:04

GoogleCodeExporter commented 9 years ago
then i tried the one in the folder of the folder and got the same message from 
the beginning 

Original comment by Steve.ch...@gmail.com on 28 Jan 2012 at 1:05

GoogleCodeExporter commented 9 years ago
Well that would explain why the XML doesn't work, you're getting a 404 error 
while connecting to EVE's API servers so nothing is coming back. Curious as to 
why but I think I see why...umm what is your server doing lol.

My output:

* About to connect() to api.eveonline.com port 443 (#0)
*   Trying 87.237.39.199... * connected
* Connected to api.eveonline.com (87.237.39.199) port 443 (#0)

Your output:

* About to connect() to api.eveonline.com port 443
*   Trying 127.0.0.1... * connected
* Connected to api.eveonline.com (127.0.0.1) port 443

I don't even...know where to go with that lol because it's not actually 
reaching EVE's API servers really. It's hitting your local server instead. This 
is going to take some more investigating.

Original comment by frozenic...@gmail.com on 28 Jan 2012 at 1:46

GoogleCodeExporter commented 9 years ago
Actually your host may know the answer to this. Ask why cURL insists on using 
localhost instead of connecting externally.

Original comment by frozenic...@gmail.com on 28 Jan 2012 at 2:03

GoogleCodeExporter commented 9 years ago
I've been talking to some server admins and they are still looking into 
possibilities for me however one idea did come up. A server can setup requests 
that are destined to be outbound are required to go through a proxy. So I may 
need to setup proxy support to support these kinda server setups. If someone 
who is asking their host to see if any kinda proxy is setup may help in trying 
to cut down possibilities of what's causing this.

Original comment by frozenic...@gmail.com on 29 Jan 2012 at 2:46

GoogleCodeExporter commented 9 years ago
Host issue pointing API to localhost instead of going externally.

Original comment by frozenic...@gmail.com on 17 Mar 2012 at 6:28