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 (2.0)

Author
Dragonaire
Here there be Dragons
#201 - 2014-12-11 19:25:11 UTC
Tiberius Zol - I'm puzzled why you say you can't use composer as you can run it anywhere you can run Yapeal. All you need is PHP and the composer.phar file some where with access to a command line interface. The last part can even be some what optional if you have a public facing web server as well. You just need a web page that starts composer with the correct options in the right directory. Having file_path_normalizer as a separate package is no different than say monolog being a separate package that Yapeal also needs.

Legedric Striker - I wouldn't worry about it to much except if it keeps happening. Yapeal generally ignores the 'cachedUntil' DT from the XML if it way off and uses 'currentTime' plus the interval from 'utilEveApi'. Another thing that seems to happen a lot on days when CCP does updates is the API returns a lot of errors including ones that have 'retry after ...' and Yapeal is made to obey them any time it sees one but it'll self correct in all these cases normally within a day except if there really is a problem with your account or the key.

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
#202 - 2014-12-11 22:17:36 UTC
https://github.com/Dragonrun1/yapeal/issues/87
Make sure you run
yc D:U
so the database table is updated.

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

Tiberius Zol
Moira.
Villore Accords
#203 - 2014-12-12 11:42:23 UTC
is there a problem with the update script? I get several entrys like:

...
Could NOT find SQL file /eve/yapealneu/bin/sql/updates/01412102009.sql
Could NOT find SQL file /eve/yapealneu/bin/sql/updates/01412112108.sql
DatabaseUpdater::dropDatabaseProcedure

Seems that the first number is missing on all calls. Should be 201412112108.sql and not 01412112108.sql or do i miss something?

Mr. Tibbers on twitter: @Mr_Tibbers

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

Legedric Striker
DRUCKWELLE Evolution
#204 - 2014-12-12 12:15:55 UTC
Rename the sql files to what yapeal is trying to access, so delete the first digit.

Just as a workaround ;)

EVE-Skillplan.net - Plan your pilot skill training online on PC, Mac, tablet or smartphone!

Tiberius Zol
Moira.
Villore Accords
#205 - 2014-12-12 12:27:32 UTC
would be way to easy:


Could NOT find SQL file /eve/yapealneu/bin/sql/updates/1412102009.sql
Could NOT find SQL file /eve/yapealneu/bin/sql/updates/1412112108.sql

in this case it ignores the next first number. :-)

Mr. Tibbers on twitter: @Mr_Tibbers

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

Legedric Striker
DRUCKWELLE Evolution
#206 - 2014-12-12 12:35:44 UTC
Now that's strange ;)

EVE-Skillplan.net - Plan your pilot skill training online on PC, Mac, tablet or smartphone!

Dragonaire
Here there be Dragons
#207 - 2014-12-12 17:44:02 UTC  |  Edited by: Dragonaire
It gets the file names directly from the file system so they would be correct so something else going on. To just be a little clearer about how it works it makes sure the bin/sql/updates/ directory can be read, does a 'dir' or 'ls' on it and ignore any files in the directory that doesn't end in 'sql'. It then sorts the list it built and walks through look for ones the have a name that is larger then the one stored in the database table. Any that are are read and broken down into statements and things like the database name etc replaced before each statement is executed. It's actually a very simple process.

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

Tiberius Zol
Moira.
Villore Accords
#208 - 2014-12-12 17:53:22 UTC
looked at the databaseupdater stuff but found no solution. strange thing. any idea where to search?

Mr. Tibbers on twitter: @Mr_Tibbers

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

Tiberius Zol
Moira.
Villore Accords
#209 - 2014-12-12 18:07:46 UTC
after run composer again (to exclude a mistake) i got an error:

- Updating dragonrun1/file_path_normalizer dev-master (4203715 => 2e8d69c)
The package has modified files:
M .gitignore
M LICENSE
Discard changes [y,n,v,s,?]?


[ErrorException]
Use of undefined constant STDIN - assumed 'STDIN'

Mr. Tibbers on twitter: @Mr_Tibbers

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

Dragonaire
Here there be Dragons
#210 - 2014-12-12 18:10:15 UTC
I would say try deleting all the files in bin/sql/updates and do a 'composer up -o' that should make it replace the files just in case they got messed up some how or something else in Yapeal is not right

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

Tiberius Zol
Moira.
Villore Accords
#211 - 2014-12-12 18:22:38 UTC
still get the composer error...

Mr. Tibbers on twitter: @Mr_Tibbers

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

Dragonaire
Here there be Dragons
#212 - 2014-12-12 18:44:02 UTC
Use of undefined constant STDIN - Make sure you are using cli version of PHP and NOT CGI etc as they don't have STDIN by default available.

The other error sounds like you did a find/replace that didn't just change the stuff in your code but also on everything in vendor as well. I've done this a couple times myself with IDE. Try just deleting the vendor/dragonrun1/file_path_normalizer directory and running composer again it should be able to update it without prompt then. This might also help with the other problem.

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

Tiberius Zol
Moira.
Villore Accords
#213 - 2014-12-12 22:08:50 UTC
Dragonaire wrote:

The other error sounds like you did a find/replace that didn't just change the stuff in your code but also on everything in vendor as well. I've done this a couple times myself with IDE. Try just deleting the vendor/dragonrun1/file_path_normalizer directory and running composer again it should be able to update it without prompt then. This might also help with the other problem.


Thank you. This worked for me for both problems.

Mr. Tibbers on twitter: @Mr_Tibbers

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

Dragonaire
Here there be Dragons
#214 - 2014-12-13 23:06:47 UTC
Okay so been looking at the list of past issues and thinking about them a little and decided if I took the time and made one change to the whole database it would solve a lot of issues that keep coming up all the time. The issues are cause because some tables are created using ASCII character set and others UTF8. That general worked well in the past but as CCP has made things like character, corporation and alliance names etc more internationally compatible it has become a lot more of a problem. So I decided to just convert everything now and it should prevent many issues in the future for everyone especially me Blink

https://github.com/Dragonrun1/yapeal/issues/89

Just update Yapeal and run 'yc D:U'. Note that it might take a little while to run depending on how much data you have in your database because it has to check/convert the existing char, varchar, text, etc columns for all 126 tables in Yapeal plus set the default for new columns on all the tables and the database as a whole.

As always thank you for using Yapeal, Dragonaire

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
#215 - 2014-12-14 17:28:40 UTC
Figure out the other error Jahn Ntago was having and pushed out something that should fix it. Turned out to be an edge case of an API keyID for an account with no characters that APIKeyInfo wasn't handling well Blink.
https://github.com/Dragonrun1/yapeal/issues/90

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

Tiberius Zol
Moira.
Villore Accords
#216 - 2014-12-15 09:15:39 UTC
Hm i got an error it i try to update the DB.
Seems, as the script want to update: accountApiKeyInfo
But in the DB is only a: accountAPIKeyInfo

I never changed the name. Which one is the right name?

Mr. Tibbers on twitter: @Mr_Tibbers

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

Dragonaire
Here there be Dragons
#217 - 2014-12-15 15:47:55 UTC  |  Edited by: Dragonaire
accountAPIKeyInfo is right I'll fix. One problem with doing most of my testing on Windows is it lower cases all table names and so doesn't care P
While I'm at it I push the new 'archive' versions of the older updates. Basically the sql/updates/ directory was getting kind of messy with over 20 update SQL files so I decided to condense them into monthly files for the past months that use name of the last update from that month. This has reduced the number down to 8 which is much easier to deal with. I may do some addition changes but I'm trying to do it in stages and keep it backward compatible as well so its kind of a WIP but do let me know of any problems you notice.

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

Tiberius Zol
Moira.
Villore Accords
#218 - 2014-12-15 22:15:20 UTC
Dragonaire wrote:
accountAPIKeyInfo is right I'll fix. One problem with doing most of my testing on Windows is it lower cases all table names and so doesn't care P
While I'm at it I push the new 'archive' versions of the older updates. Basically the sql/updates/ directory was getting kind of messy with over 20 update SQL files so I decided to condense them into monthly files for the past months that use name of the last update from that month. This has reduced the number down to 8 which is much easier to deal with. I may do some addition changes but I'm trying to do it in stages and keep it backward compatible as well so its kind of a WIP but do let me know of any problems you notice.


one more to fix charcorporateContactList should be charCorporateContactList (two times)

Mr. Tibbers on twitter: @Mr_Tibbers

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

Dragonaire
Here there be Dragons
#219 - 2014-12-16 10:30:13 UTC
Blink fixed

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
#220 - 2015-01-01 19:40:26 UTC
So thought some of you might find this interesting. One of my another small projects from GitHub that I use in Yapeal has been nominated for an award on the PHP Classes siteBig smile. You can find more about the class here:
http://www.phpclasses.org/package/8912.html

And you can also find out about voting for it or any of the other nominated classes here:
http://www.phpclasses.org/vote.html

On other Yapeal news I've started a new experimental branch where I'll be working on new stuff. I'm basically going to use it as a play ground/testing area for some possible new ideas for Yapeal that may or may not be in future versions. You should expect it to be often broken and have a lot of WIP code but if your interested in seeing what the future of Yapeal might hold you're welcome to have a look and comment on GitHub. Do try to keep anything related to the experimental code on GitHub and not here so as not to confuse anyone read this thread. I may from time to time ask for input here but usually only when what I'm working on becomes a RC for next version of Yapeal.

Something I'm currently looking at adding an event system to Yapeal or even re-writing Yapeal itself to use a event-dispatch system. The reason I've been looking at this is that it would open up the possibility to have Yapeal run in a cloud which would let it scale much better for large sites. Anyway like I said some of you might find it interesting to follow what I'm doing in the experimental branch.

As always thank you for using Yapeal, Dragonaire

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