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
Dragonaire
Here there be Dragons
#461 - 2014-04-04 22:25:09 UTC
Zynen - Make sure you are using different yapeal.config files with correct settings for each database and are use the -c option with the one that is NOT using the default config/yapeal.ini. It might be a good idea to use -c with both installs so you end up with something like this:

php -f yapeal.php -c config/yapeal-corp.ini
php -f yapeal.php -c config/yapeal-char.ini

Should help keep them straight plus if you do end up testing or trying to merge them later into a single setup it would be a bit easier maybe.

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

Dragonaire
Here there be Dragons
#462 - 2014-04-05 08:29:32 UTC
Okay think I managed to fixed the stuff I broke in default branch.

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

Lluerssen
Viziam
Amarr Empire
#463 - 2014-04-06 05:01:33 UTC  |  Edited by: Lluerssen
Additionally there is error with RegExp.

adodb checking xml version using /< schema.*?( version="([^"]*)")?.*?>/

but file have

schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.3"
xsi:noNamespaceSchemaLocation="xmlschema03.xsd"

Also, if you need help with yapeal, I could try offer my help :)

Sister of EvE: http://SisterOfEvE.ru/ Loot History Analyzer: http://SisterOfEvE.ru/loot_history/

Dragonaire
Here there be Dragons
#464 - 2014-04-06 05:22:54 UTC
So my reg-exp script foo isn't the best but what I get from that is it looks for a line starting with "< schema" and finds the version attribute and extracts the value to be checked. I'm I missing something and why were you looking at ADOdb is it giving you an error when trying to use the install/*.xml files or something?

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

Lluerssen
Viziam
Amarr Empire
#465 - 2014-04-06 14:55:16 UTC  |  Edited by: Lluerssen
Wrong versions of schema causing line 161 of createMySQLTables.php return empty $sql;
And this leads to "Failed to execute schema for util" & other files.

Btw, i would use: http://regexr.com/38lre this pattern )

Don't forget to open substitution part to check for matches ;)

Sister of EvE: http://SisterOfEvE.ru/ Loot History Analyzer: http://SisterOfEvE.ru/loot_history/

Dragonaire
Here there be Dragons
#466 - 2014-04-06 16:44:19 UTC
Lluerssen wrote:
Wrong versions of schema causing line 161 of createMySQLTables.php return empty $sql;
And this leads to "Failed to execute schema for util" & other files.

Btw, i would use: http://regexr.com/38lre this pattern )

Don't forget to open substitution part to check for matches ;)


So you are trying to say I should make changes to ADOdb which is a project I don't control to fix an error you are having in Yapeal? Shocked Just an idea lets try to figure out why createMySQLTables.php does like the util.xml first Blink I'm sure the version number has NOT changed in the files so that not the cause. My re-format of the XML might have but should NOT have. Just looked at a diff and found a couple things that my IDE did that probably cause the problem so I'll look at fixing it so it does NOT break things. Mainly it took out some spaces in the values like the &lt;opt platform="mysql">ENGINE = InnoDB COLLATE = ascii_general_ci&lt;/opt> just before ENGINE which will cause it to fail. also re-arranged the attributes in the schema line which is probably what is what you are looking at. The version attribute get moved after the xmlns one which it shouldn't have done. Also line wrapped the &lt;query> text which probably makes MySQL unhappy as well. I'll fix what it broke and push it out.

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

Lluerssen
Viziam
Amarr Empire
#467 - 2014-04-06 17:25:57 UTC  |  Edited by: Lluerssen
Yeah, you're write, especially because it came from "wrap lines at" option in your IDE :)

And also found new trouble.

> php -f checkForRequirements.php
createMySQLTables.php must be called directly and can not be included.

var_dump(get_included_files());

array(2) {
[0] =>
string(68) "/Users/bp/Documents/Projects/yapeal/install/checkForRequirements.php"
[1] =>
string(41) "/opt/local/var/db/php55/pear/pear-ini.php"
}

Are you going to say, that i should remove pear from auto include? )

And, because you already said that you want to get away from ADOdb, and it's uberly outdated... why should you care about changing adodb?

P.S. 5.5.6 totally fails with yapeal installation...

Sister of EvE: http://SisterOfEvE.ru/ Loot History Analyzer: http://SisterOfEvE.ru/loot_history/

Dragonaire
Here there be Dragons
#468 - 2014-04-06 18:10:14 UTC
So did push that should fix the problems with the XML files give it a try.

The include stuff has nothing to do with your include path etc. Those are there to insure you are running them directly in CLI and not trying to do a

include "config/createMySQLTable";

from another PHP file. If you look at some of the other files in class/ you'll notice they don't let you call them directly is they do need to be included or required. That's mostly there to protect against noobie mistake of think all PHP should be some where under their web root where the web server would allow it to be browsed to. If someone was to do that they get a error message instead. In the future I'll probably be dropping that since it's much more common now win all the PHP frameworks that they do not have their code in web root and people are more use to it being done that way.

Not surprised that Yapeal as is would fail PHP 5.5. The next version which I've start work on is going to require at least PHP 5.4 it looks like at this time. I've decided things like traits are just to useful to not use them and I expect that soon after PHP 5.5 is considered the current stable branch that PHP 5.3 will stop getting updated.

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

Dragonaire
Here there be Dragons
#469 - 2014-04-06 23:41:15 UTC
Just a quick couple notes here. I'm looking at moving Yapeal development over to GitHub. SourceForge has done a good job of updating their stuff but they got behind GitHub early on and they just don't seem to be able to catch up. A good example of this is there is still no way to let Packagist receive automatic updates on commits. I've given SF a few months now and there still does NOT seem to be anything planned Sad Those of you that followed the link have seen I already have Yapeal over there and now linked to this GitHub version of it. I'm looking at what I need to do to move the Wiki as well not that it got used a whole lot by me or anyone else Blink I never really used the issue tracker on GoogleCode or with SF but I'm thinking I'm going to use the one on GitHub more so don't be surprised if bug reports here don't get replies to do bug report there in the future from me.

Look to hear feedback from everyone about moving both good and bad.

The stuff that's currently at SF will continue to be there and at least where I can I'm just going to have SF auto re-direct you to GitHub once the move is complete so links to the site don't break etc.

Just a couple pointers for anyone wanting to use the GitHub code. The new 1.0.x branch is what you want to use to keep up with bug fixes to the current code. Basically will just change from doing hg clone / pull to using git clone / pull using the new URL of course Smile There is also a new 2.0.x branch where you can look in on or even better help out working on and shape the next version of Yapeal. Just a little warning nothing current is runnable there but hopeful parts of it will start coming together soon(tm).

Okay enough for now I'll get on with the other admin stuff I need to do so I can maybe get back to some coding later today Blink

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

Eto Demerhzel
Science and Trade Institute
Caldari State
#470 - 2014-04-07 22:01:07 UTC  |  Edited by: Eto Demerhzel
hi,

I'm really a noob here, but i try to config yapeal..
So, i have setup all the needed, follow instruction in install.md, and all goes well.. i think.. i have using the file i find on Fuzzy website, and follow the instruction https://www.fuzzwork.co.uk/resources/xamppyapealInstall.txt to put my ApiKey.
(my first step in learning php and all that stuff, it's to made a page for adding all my chars^^).
When i check the utilRegistredKey table, i have my keyid, vcode and api mask..

But when a try to run yapeal in cli "php -f yapeal.php"
i have this
Quote:
WARN: Caching invalid API XML for account/APIKeyInfo
File: .../yapeal-1.0.3/class/YapealApiCache.php(192)


follow by this, but i think it's normal because the first step fail

Quote:
INFO: No corporations for corp section
File: .../yapeal-1.0.3/class/SectionCorp.php(82)
2014-04-07 21:35:00.881
INFO: No characters for char section
File: .../yapeal-1.0.3/class/SectionChar.php(82)


and.. nothing in
accountAPIKeyInfo
accountCharacters
accountKeyBridge


so.. i don't understand what i do wrong.. ??


edit: i found that http://eve-search.com/thread/7540-1/page/14#395
but not helping.. max_allowed_packet is set to 16m


(english is not my primary langage)
Dragonaire
Here there be Dragons
#471 - 2014-04-08 21:25:17 UTC  |  Edited by: Dragonaire
Eto Demerhzel - One of couple things could be going on with the first being CCP changed the API by adding new stuff to it etc. I do NOT think they have but been kind of out of the loop on API updates so possible. Easiest way for you to help figure it out is to make sure you have cache_output in config\yapeal.ini set to either "file" or "both" so Yapeal puts a copy in your cache\account\ directory. Look in that directory and find the *.xml file it saved there and open it and compare it to the one you'll find at http://wiki.eve-id.net/APIv2_Account_APIKeyInfo_XML. If there is any extra attributes than the ones shown in the < row line CCP made some changes and if you'll sent an E-mail directly to my github e-mail I'll take a look at it and see about updating Yapeal. If the file looks nothing like the example than it would also be helpful if you sent it to me.

If the XML looks fine than it's got to be something else and I'd look through the last page or two on this thread to see if there's an answer there. You might also try grabbing the current Yapeal 1.0.x version with composer or git from GitHub. I've pushed out a couple changes that you'll probably want as well from it though the changes shouldn't have really changed anything in the account section APIs just char, corp etc.

UPDATE Never mind I setup Yapeal locally so I could test and see that CCP did add alliance and faction stuff which had been asked for by some other developers so will be updating Yapeal. Keep watching for it to show up in git.

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

Eto Demerhzel
Science and Trade Institute
Caldari State
#472 - 2014-04-08 23:33:20 UTC
hi,

I have send you a mail on github..
Dragonaire
Here there be Dragons
#473 - 2014-04-16 17:33:48 UTC  |  Edited by: Dragonaire
So released v1.0.4 with the fixes for faction and alliance additions to the Eve APIs. Would have put it out a few days ago but had to get a better Windows development environment setup and did some work on another project. Also kind of forgot about it and did some work on some of the other development versions of Yapeal as well before I remembered.Oops

For composer use require: "yapeal/yapeal": "1.0.4"
or even better so you do NOT have to update it for stable version updates use require: "yapeal/yapeal": "~1.0"
To look at it on GitHub or grab it with Git the URL is: https://github.com/Dragonrun1/yapeal/tree/1.0.4

I'm look for some help also in updating the install instructions for Yapeal found in INSTALL.md. If someone would be so kind as to write up some new ones based on their experience it would be great. You can even find a new INSTALL.md issue for it.

As usual let me know if there's still problems but all the APIs I tests seem to be working right now.

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

Dragonaire
Here there be Dragons
#474 - 2014-04-21 06:06:01 UTC
So I've created a new test branch where I'm doing a lot of clean up on Yapeal. it's the new 1.1.x one and I need some help testing. For anyone that has a test install for their app where they can give it a try and give feedback it would be very helpful. I've been doing what testing I can here and it's running error free but I have only my own keys to test with so not getting much of a workout. I moved almost everything around so you might have to poke around a little to see where things are but bin/ is only new directory really that you might need as config/ and yapeal.php are unmoved but not unchanged.

ADOdb is NOT died yet but I'm continuing to work in replacing it and Logger and the network connection stuff. Plan is to next replacing Logger with Monolog. There is nothing harder then trying to track down an error in what is suppose to report them during development and I'll need something very solid for the other changes to database and network connections.

Anyway please give the new stuff a try if you can and let me know if anything is broken or just doesn't seem to work.

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

BoomBoss
KarmaFleet
Goonswarm Federation
#475 - 2014-04-26 21:51:01 UTC  |  Edited by: BoomBoss
Hola,

Even though I have set max_allowed_packet=16M it is still giving me below error:

WARN: Insert/upsert failed for erm_serverServerStatus
File: C:\yapeal\class\YapealQueryBuilder.php(425)

I am using the latest YAPEAL from sourceforge GitHub. Installed it today without any errors whatsoever.

Any ideas?
Madam Mika
Ascendance Rising
Ascendance..
#476 - 2014-04-27 04:41:31 UTC
Dragonaire, Im glad to see this is still active in the Eve Community!!!
Dragonaire
Here there be Dragons
#477 - 2014-05-03 18:51:02 UTC
BoomBoss wrote:
Hola,

Even though I have set max_allowed_packet=16M it is still giving me below error:

WARN: Insert/upsert failed for erm_serverServerStatus
File: C:\yapeal\class\YapealQueryBuilder.php(425)

I am using the latest YAPEAL from sourceforge GitHub. Installed it today without any errors whatsoever.

Any ideas?

Does it always break on ServerStatus? That one of the simplest APIs and hasn't changed for a long time. Might try turning on file caching and take a look at the XML and see if it has some different fields. You can find an example over on eve-id

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

jsmb
The Deuoi
Brute Force Solutions
#478 - 2014-05-24 17:01:31 UTC
I have a question not pertaining to this, I am trying to pull the accessmask from eve so i am using

https://api.eveonline.com/account/APIKeyInfo.xml.aspx?keyID=XXX&&vCode=XXX

if i put that into my browser i can see the eveapi -> result -> key @ accessMask

I am trying to import it into a google doc spreadsheet
so importxml("https://api.eveonline.com/account/APIKeyInfo.xml.aspx?keyID=XXX&&vCode=XXX", "/eveapi/result/key/@accessMask") but i get errors any chance you might now why?
Dragonaire
Here there be Dragons
#479 - 2014-05-24 17:44:49 UTC
I really know nothing about GDocs as only one I've ever looked at someone else made and that was a couple years ago so not much help there I'm afraid. I'd point you to http://wiki.eve-id.net/APIv2_Page_Index it usual has some addition (better) docs than what you find from CCP wiki. One thing I do notice is you have 2 x '&' which is incorrect. Other thing that doesn't look right to me but could be is I think it should be "/eveapi/result/key@accessMask". Notice no '/' between key and accessMask. My Xpath is a little rusty so yours might be correct. You might also just try "@accessMask" as there is only one and you shouldn't need the full path to find it.

You say you are getting errors but not what kind: Is it GDocs saying something is wrong? or API servers not understand what they are receiving?

In the end what I'll think you are going to find is your trying to make a speadsheet do a database's job which at some point will fail no matter what. One of the reasons I made Yapeal was to bridge the gap between the Eve Api XML and something that can actually handle the info (DB) so other developers can just worry about their application instead how to make it work.

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

Zynen
#480 - 2014-05-26 21:31:36 UTC
Dragonaire wrote:
Zynen - Make sure you are using different yapeal.config files with correct settings for each database and are use the -c option with the one that is NOT using the default config/yapeal.ini. It might be a good idea to use -c with both installs so you end up with something like this:

php -f yapeal.php -c config/yapeal-corp.ini
php -f yapeal.php -c config/yapeal-char.ini

Should help keep them straight plus if you do end up testing or trying to merge them later into a single setup it would be a bit easier maybe.


1.0.4 fixed all of my issues!