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.
 

Yapeal PHP API library (version 1.0.5)

First post
Author
Tiberius Zol
Moira.
#381 - 2013-07-04 13:23:25 UTC
Another question:

I didn't find the lastknownlocation information in the database. im not sure, but i think it should come with a full api with the characterinfo.xml

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Somerset Mahm
Cognitive Distortion
#382 - 2013-07-04 18:31:32 UTC
CharacterSheet does not contain this info. Corp/MemberTrackingExtended does, but that's a corp key you need.

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)

Tiberius Zol
Moira.
#383 - 2013-07-04 22:29:19 UTC
I don't mean CharacterSheet, but CharacterInfo -> http://wiki.eve-id.net/APIv2_Eve_CharacterInfo_XML
It's in the eve group.

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Minerva Arbosa
Spatial Forces
Warped Intentions
#384 - 2013-07-09 04:25:41 UTC
Is there a way when setting up a Yapeal to import the database tables straight into the database via phpMyAdmin or another similar utility? Also, why is only PHP CLI supported?
Somerset Mahm
Cognitive Distortion
#385 - 2013-07-09 04:54:00 UTC
PHP CLI is because Yapeal is meant to be run via cron.

I don't quite grok the first part of your question-- do you mean you need to create the db tables? If so, you can do this by running install/createMySQLTables.php

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)

Louis Vitton
Viziam
Amarr Empire
#386 - 2013-07-09 05:02:27 UTC
If Somerset's idea doesnt work for you post again and i will upload a dump of the most recent database with no information in it so that you can then use phpmyadmin to install it.
Dvorak Telemnar
Dimple Dore
#387 - 2013-07-11 10:30:59 UTC  |  Edited by: Dvorak Telemnar
About to embark on my own steep learning curve in attempting to convert a google docs recruitment tool I wrote along time ago into PhP so been following this thread with earnest.

Somerset : May I suggest you start a new thread as the new maintainer of the project and link back to this one giving credit to all whose hard work has gone before? That way you will be able to maintain a change log and version info on the first post :)
Tiberius Zol
Moira.
#388 - 2013-07-11 12:58:01 UTC
Hi.

Is there any possibility to run yapeal without PHP CLI?
My provider doesn't support CLI despite the fact he allow to create cron jobs.

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Erica Northman
Aliastra
Gallente Federation
#389 - 2013-07-14 18:57:44 UTC
WARN: Caching invalid API XML for corp/CorporationSheet

Im getting this error. Any idea how to fix this ?

Creator of evemanager. Project website.

Somerset Mahm
Cognitive Distortion
#390 - 2013-07-14 20:03:37 UTC
Erica Northman wrote:
WARN: Caching invalid API XML for corp/CorporationSheet

Im getting this error. Any idea how to fix this ?


Thanks for the report! I've committed a new Yapeal version. To upgrade:

Download the new version and replace your copy of Yapeal (or use Mercurial, recommended!)
Run install/createMySQLTables.php to update the table schema.

Changelog:

- Change CURLOPT_SSL_VERIFYHOST to 2 as the previous behavior has been deprecated in the latest versions of libcurl and PHP is now throwing a deprecation notice.

- Add new "FactionID" column to corp/corporationSheet. If a corporation participates in faction warfare, their chosen faction will be here.

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)

Somerset Mahm
Cognitive Distortion
#391 - 2013-07-14 20:12:14 UTC
Tiberius Zol wrote:
Hi.

Is there any possibility to run yapeal without PHP CLI?
My provider doesn't support CLI despite the fact he allow to create cron jobs.


If you can create cron jobs, can you set yapeal to run as a cronjob?

Something like */1 * * * * /usr/bin/php53 /home/tiberius/yapeal/yapeal.php

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)

Tiberius Zol
Moira.
#392 - 2013-07-15 12:02:54 UTC
had to comment out the "CLI-query" part in the yapeal.php to get it to work properly.

But after update, i can't run install/createMySQLTables.php

get
Warning: fwrite(): supplied argument is not a valid stream resource in yapeal/install/createMySQLTables.php on line 186

Mr. Tibbers on twitter: @Mr_Tibbers

Mr. Tibbers Blog: www.eve-versum.de

Erica Northman
Aliastra
Gallente Federation
#393 - 2013-07-15 20:39:10 UTC
I have the lasest hg.

2013-07-15 20:34:59.793
WARN: Insert/upsert failed for utilXmlCache
File: /*yapeal/class/YapealQueryBuilder.php(493)
2013-07-15 20:34:59.796
WARN: mysqli error: [2006: MySQL server has gone away] in EXECUTE("truncate table `eveAllianceList`")

Code: 2006
Trace:
#0 /*yapeal/ext/ADOdb/adodb.inc.php(1042): adodb_throw('mysqli', 'EXECUTE', 2006, 'MySQL server ha...', 'truncate table ...', false, Object(ADODB_mysqli))
#1 /*yapeal/ext/ADOdb/adodb.inc.php(1017): ADOConnection->_Execute('truncate table ...', false)
#2 /*yapeal/class/api/eve/eveAllianceList.php(188): ADOConnection->Execute('truncate table ...')
#3 /*yapeal/class/api/AApiRequest.php(112): eveAllianceList->prepareTables()
#4 /*yapeal/class/SectionEve.php(113): AApiRequest->apiStore()
#5 /*yapeal/yapeal.php(164): SectionEve->pullXML()
#6 {main}
--------- END TRACE ----------

File: /*yapeal/class/api/eve/eveAllianceList.php(195)
2013-07-15 20:34:59.796
WARN: Could not prepare eveAllianceList API tables to accept new data for 0
File: /*yapeal/class/api/AApiRequest.php(115)
2013-07-15 20:34:59.797
FATAL: Uncaught exception in yapeal.php
File: /*/yapeal/yapeal.php(183)
2013-07-15 20:34:59.797
FATAL: Failed to get ADOFieldObjects for columns in YapealQueryBuilder
Trace:
#0 /*/yapeal/class/api/eve/eveAllianceList.php(84): YapealQueryBuilder->__construct('eveAllianceList', 'mysqli://fredri...')
#1 /*/yapeal/class/api/AApiRequest.php(126): eveAllianceList->parserAPI()
#2 /*/yapeal/class/SectionEve.php(113): AApiRequest->apiStore()
#3 /*yapeal/yapeal.php(164): SectionEve->pullXML()
#4 {main}
--------- END TRACE ----------

File: /*/yapeal/yapeal.php(184)

Creator of evemanager. Project website.

Erica Northman
Aliastra
Gallente Federation
#394 - 2013-07-15 20:39:38 UTC
Erica Northman wrote:
I have the lasest hg.

2013-07-15 20:34:59.793
WARN: Insert/upsert failed for utilXmlCache
File: /*yapeal/class/YapealQueryBuilder.php(493)
2013-07-15 20:34:59.796
WARN: mysqli error: [2006: MySQL server has gone away] in EXECUTE("truncate table `eveAllianceList`")

Code: 2006
Trace:
#0 /*yapeal/ext/ADOdb/adodb.inc.php(1042): adodb_throw('mysqli', 'EXECUTE', 2006, 'MySQL server ha...', 'truncate table ...', false, Object(ADODB_mysqli))
#1 /*yapeal/ext/ADOdb/adodb.inc.php(1017): ADOConnection->_Execute('truncate table ...', false)
#2 /*yapeal/class/api/eve/eveAllianceList.php(188): ADOConnection->Execute('truncate table ...')
#3 /*yapeal/class/api/AApiRequest.php(112): eveAllianceList->prepareTables()
#4 /*yapeal/class/SectionEve.php(113): AApiRequest->apiStore()
#5 /*yapeal/yapeal.php(164): SectionEve->pullXML()
#6 {main}
--------- END TRACE ----------

File: /*yapeal/class/api/eve/eveAllianceList.php(195)
2013-07-15 20:34:59.796
WARN: Could not prepare eveAllianceList API tables to accept new data for 0
File: /*yapeal/class/api/AApiRequest.php(115)
2013-07-15 20:34:59.797
FATAL: Uncaught exception in yapeal.php
File: /*/yapeal/yapeal.php(183)
2013-07-15 20:34:59.797
FATAL: Failed to get ADOFieldObjects for columns in YapealQueryBuilder
Trace:
#0 /*/yapeal/class/api/eve/eveAllianceList.php(84): YapealQueryBuilder->__construct('eveAllianceList', 'mysqli://fredri...')
#1 /*/yapeal/class/api/AApiRequest.php(126): eveAllianceList->parserAPI()
#2 /*/yapeal/class/SectionEve.php(113): AApiRequest->apiStore()
#3 /*yapeal/yapeal.php(164): SectionEve->pullXML()
#4 {main}
--------- END TRACE ----------

File: /*/yapeal/yapeal.php(184)


Any idea why I get this ?

* = removed the home directory listing.

Creator of evemanager. Project website.

Erica Northman
Aliastra
Gallente Federation
#395 - 2013-07-15 20:41:12 UTC  |  Edited by: Erica Northman
Sorry alot of issues here.

I still have no rows in corpCorporationSheet. Uploaded and cleared cache. yapeal running every minute via cron.

log/yapeal_warning says this:

WARN: Caching invalid API XML for corp/CorporationSheet
File: /*yapeal/class/YapealApiCache.php(192)
2013-07-15 16:05:22.371
WARN: Caching invalid API XML for corp/CorporationSheet
File: /*/yapeal/class/YapealApiCache.php(192)

and I have updated via hg today. Did 3 changes or something. Also did the install/mysqlcreatetables.

Creator of evemanager. Project website.

Somerset Mahm
Cognitive Distortion
#396 - 2013-07-15 22:53:59 UTC
You're getting an error that the "MySQL server has gone away", so something may be wrong with your config.

My first inclination would be to blow away your setup and try starting fresh, as when I do the steps from my dev environment everything seems to work and I get rows in corpCorporationSheet.

Sorry I can't be more help!

[somer ~]$ mysql --version
mysql Ver 14.14 Distrib 5.5.31, for Linux (x86_64) using readline 5.1
[somer ~]$ php53 --version
PHP 5.3.24 (cli) (built: Apr 25 2013 08:01:58)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)

Dragonaire
Here there be Dragons
#397 - 2013-07-16 03:11:13 UTC
Erica Northman - See post 330 on this thread about possible cause as it's the most common cause of your error especially in Windows.

Tiberius Zol - The error in line 186 is when the script is trying to tell you it has finished without errors and since you are NOT using CLI it doesn't understand it.

Yapeal was made for CLI only because the normal CGI version is missing things it needs but as you've found by modifying it a little it will often work just without some features but I will say except if your host provider has gone out of their way to compile PHP themselves and said not to build CLI it would have been built by default and the PHP CLI is probably available you'll just have to do a little digging around.

Somerset Mahm - Your doing a great job and keep up the good work.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Erica Northman
Aliastra
Gallente Federation
#398 - 2013-07-16 11:21:12 UTC
Dragonaire wrote:
Erica Northman - See post 330 on this thread about possible cause as it's the most common cause of your error especially in Windows.


Not running Windows, but Centos 6.

max_allowed_packet fixed it :) ty.

It also fixed the corpCorporationSheet problem.

Creator of evemanager. Project website.

Mintoko
Taedium In Perpetuam
#399 - 2013-07-19 10:34:21 UTC
I just noticed that I'm no longer getting downloads of the Corp WalletJournal. My last wallet download was 4/10/13, which means I've lost a lot of data.

Has there been a change in the api? I had been working with rev500 and have now updated to rev505, but there's no change.
Somerset Mahm
Cognitive Distortion
#400 - 2013-07-19 17:33:37 UTC
I rely on corpWalletJournal heavily so it's probably my most-tested piece. The API has not changed for it in any way that I know, and I'm still receiving wallet data.

I would first make sure that your key's access mask is correct and that the key is still active in utilRegisteredKeys. Very rarely (every 2-3 months for me usually) the API has horked an error that causes Yapeal to think the key is no longer valid, which makes it deactivate it. You'll see this error in your logs as well.

SOMER Blink Microlotteries that finish in minutes! Running for over 2 years :)