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
Drapko Nitzhonot
Abdera Logistics
#261 - 2012-03-15 21:07:13 UTC
I'm still getting cron emails after changing to "warn" level:
Quote:
curl_error: Operation too slow. Less than 10 bytes/sec transfered the last 12 seconds


I'm getting this even there is no updates in log/ files.
Dragonaire
Here there be Dragons
#262 - 2012-03-17 15:19:17 UTC
Drapko Nitzhonot wrote:
I'm still getting cron emails after changing to "warn" level:
Quote:
curl_error: Operation too slow. Less than 10 bytes/sec transfered the last 12 seconds


I'm getting this even there is no updates in log/ files.
Sorry about that there seems there was some old debugging code left over in ext/eac_httprequest.curl.php which I hadn't noticed before which was directly printing out the errors on the CLI Oops I've pushed out a change that fixes that plus a few other minor things.

I am concern though after looking more fully at the second log message you were getting that you are still running an older version as the line 106 reported in the error should be 100 instead. Make sure you are following the full instructions on how to instill and update Yapeal and not getting a mix of old and new versions etc.

version 12.077.0801

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

Drapko Nitzhonot
Abdera Logistics
#263 - 2012-03-17 17:17:20 UTC
Thank you. I will install the new version Big smile
Kush Monster
Big Tobacco
#264 - 2012-03-30 22:11:36 UTC
I'm sure this has been covered but your wiki goes into inserting data but it doesn't go into extracting data.

let's say I want to insert a key and then register the chars associated with that key.

How do I get a list of character id's associated with the api key?

I can do this with SQL but the point of using a library would be so that I don't have to.

How to make mining enjoyable: An Autocannon, Faction Ammo, Your Mouth

Dragonaire
Here there be Dragons
#265 - 2012-03-31 17:57:40 UTC
Kush Monster wrote:
I'm sure this has been covered but your wiki goes into inserting data but it doesn't go into extracting data.

let's say I want to insert a key and then register the chars associated with that key.

How do I get a list of character id's associated with the api key?

I can do this with SQL but the point of using a library would be so that I don't have to.
I'd suggest reading the project home page a little closer as part of the main idea with Yapeal is that the database is the API for people's applications. There are some classes in class/util/ to help manage the non-API tables that an application might need but there's no way I could ever come up with a set of classes that allow as much versatility to access the API data as what each developer can do for their own project with a simple wrapper class around the SQL queries they need.

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

malaire
#266 - 2012-04-01 11:27:00 UTC
How do I clear the cache-directory of old files?

Running install/cacheCleaner.php from command line claims that cache was cleaned, but it wasn't. I tried running that both from yapeal and yapeal/install directory.

New to EVE? Don't forget to read: The Manual * The Wiki * The Career Options * and everything else

Dragonaire
Here there be Dragons
#267 - 2012-04-01 15:15:21 UTC
Check your cache settings in config/yapeal.ini as the default is 7 days so it will only clear files that are older than that.

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

malaire
#268 - 2012-04-01 15:49:10 UTC
Dragonaire wrote:
Check your cache settings in config/yapeal.ini as the default is 7 days so it will only clear files that are older than that.

I checked that. It is still 7 days but it did not delete files over 30 days old. I have only 3 accounts in yapeal, but cache is 5500 files and 400 MB. Sad

New to EVE? Don't forget to read: The Manual * The Wiki * The Career Options * and everything else

Gabba Cyno
#269 - 2012-04-02 15:41:52 UTC
Is there a reason I have to run the yapeal.php 5-7 times in a row before it actually updates my database?

.

Dragonaire
Here there be Dragons
#270 - 2012-04-02 17:12:28 UTC
Gabba Cyno wrote:
Is there a reason I have to run the yapeal.php 5-7 times in a row before it actually updates my database?
I'd be checking the error logs to see what's going wrong myself. You might have to run it a couple times for it to prime the account section tables before you'll start seeing data in your char and corp section tables but I've never seen any cases where it was more than a couple as long as something isn't going wrong.

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

Lluerssen
PHUB Corporation
MOONFIRE.
#271 - 2012-04-03 16:21:07 UTC
Mega epic failed bug:

PHP 5.3.0 The prepend parameter was added.

Check your YapealAutoloader.php ;)

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

Dragonaire
Here there be Dragons
#272 - 2012-04-03 17:01:15 UTC
Lluerssen wrote:
Mega epic failed bug:

PHP 5.3.0 The prepend parameter was added.

Check your YapealAutoloader.php ;)
huhQuestion since I'm not prepending anything your comment doesn't make any sense so maybe you can explain better what you're talking about.

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

Lluerssen
PHUB Corporation
MOONFIRE.
#273 - 2012-04-03 17:52:51 UTC  |  Edited by: Lluerssen
Okay.

I've used yapeal on a dev machine with php 5.3 version. Works fine.
When i uploaded yapeal to production machine, all yapeal interaction failed. I dived into code, and found class/YapealAutoload.php which contains this:

Quote:
public static function activateAutoLoad() {
if (FALSE == spl_autoload_functions()) {
spl_autoload_register(array('YapealAutoLoad', 'autoLoad'));
if (function_exists('__autoload')) {
spl_autoload_register('__autoload', FALSE);
};
} else {
// Prepend if other autoloaders already exist.
spl_autoload_register(array('YapealAutoLoad', 'autoLoad'), FALSE, TRUE);
};// else FALSE == spl_autoload_functions() ...
}// function activateAutoLoad


At yapeal's google page i found it supports 5.2 php (production machine). BUT!
In function spl_autoload_register(array('YapealAutoLoad', 'autoLoad'), FALSE, TRUE);
We see 3rd argument, that was added in php 5.3

When i removed it spl_autoload_register(array('YapealAutoLoad', 'autoLoad'), FALSE); all problems gone :)

P.S. I wished to commit some code to yapeal. But merc stopping me from doing that ;) Guys, move to github please :)

P.P.S. from http://code.google.com/p/yapeal/
Quote:
PHP 5.2.4 or greater with following extensions*:

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

Dragonaire
Here there be Dragons
#274 - 2012-04-04 04:54:40 UTC  |  Edited by: Dragonaire
This is the bug report and it was fixed sometime in 2008.
https://bugs.php.net/bug.php?id=42823
I'm not sure yet which version it got fixed in but you need to make sure you are using an up to date version in the 5.2.* series.
I know the first version that talks about the new prepending option is with 5.3 but it's talking about a fix of the fix Blink so it was added earlier. Given that it was put into the CVS in May I'm thinking it was added in version 5.2.6-8 which is about the version I was using at the time. Thank you for bring it to my attention though because I do need to update the minimum version of PHP Yapeal will run with.

Quote:
P.S. I wished to commit some code to yapeal. But merc stopping me from doing that ;) Guys, move to github please :)
Why would I want to down grade to Git P If you have some bug fixes etc you can always clone the project and do a pull request as well to me. Mercurial does everything Git does only better and is easier for a long time Subversion user like me to remember the commands Smile

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

Somerset Mahm
Cognitive Distortion
#275 - 2012-04-04 06:17:02 UTC
+1 for Mercurial though I do wish you would use Bitbucket instead of SourceForge :P

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

Dragonaire
Here there be Dragons
#276 - 2012-04-04 08:31:52 UTC
I like Bitbucket in many ways but some of the other things a project hosting site needs like bug tracking and a good wiki for docs etc they just don't have yet IMHO. When I started looking at how to improve the hosting for Yapeal GoogleCode, Bitbucket, and several others just didn't seem as good as what SF offers now. Yapeal start on SF but I moved it to Google Code because at the time they had better features but they then made changes so you couldn't use some things like downloads the way most projects use them and Github has started melting down under the load etc but in the mean time SF updated their stuff and now out do the rest and have a clear vision for how to continue to improve over the next few years which is more than I've seen with most of the other sites. At least that how I saw it Blink

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

Lluerssen
PHUB Corporation
MOONFIRE.
#277 - 2012-04-04 13:40:12 UTC
Quote:
This is the bug report and it was fixed sometime in 2008.
https://bugs.php.net/bug.php?id=42823


Ouch! Looks like you didn't understood what i say.

You're using 3rd parameter for `spl_autoload_register`, which added only in 5.3 PHP, is this clear?

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

Dragonaire
Here there be Dragons
#278 - 2012-04-04 14:49:10 UTC  |  Edited by: Dragonaire
Actually you missed the point that it was added sometime in the 5.2.* series and additionally bug fixed in 5.3.0. The reason I say that is you are the only one that has had problems with it and many people including me have used it with 5.2.* without problems plus the time frame when the bug was fixed. They then fixed some addition things related to this change in 5.3.0 so for them to have fixed the fix it had to have existed in an older version since there isn't a 5.3.-1 version Blink It doesn't help that when it was added it wasn't added to the changelog correctly so when it was pulled in has to be inferred but since the latest version in the 5.2 series is 5.2.17+ it's really a mute point now. Add to that that the 5.2 series is likely to be dropped from maintenance when 5.4 comes out of testing everyone that can should already be moving to 5.3. I've personal been using it since 5.3.1 or so which came out almost 3 years ago. There has been many things from 5.3+ that I'd like to use in the past but I can't until 5.2 is retired officially and hosting sites update.

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

Desmont McCallock
#279 - 2012-04-04 15:03:01 UTC
Dragonaire wrote:
I like Bitbucket in many ways but some of the other things a project hosting site needs like bug tracking and a good wiki for docs etc they just don't have yet IMHO. When I started looking at how to improve the hosting for Yapeal GoogleCode, Bitbucket, and several others just didn't seem as good as what SF offers now. Yapeal start on SF but I moved it to Google Code because at the time they had better features but they then made changes so you couldn't use some things like downloads the way most projects use them and Github has started melting down under the load etc but in the mean time SF updated their stuff and now out do the rest and have a clear vision for how to continue to improve over the next few years which is more than I've seen with most of the other sites. At least that how I saw it Blink


Indeed BitBucket needs to move on from Creole 1.0 for its wiki markup.
Although I had my concerns about the wiki being public (when set so) and anyone could mess up the pages, the solution to that is that even the wiki is on VCS (so backups always exists).

As for the issue tracker, it has a decent system. I have though my concerns on the fact that anyone, even anonymous users, can create tickets and spamming of the tracker is a risk. They could of course force a log-in or registration in order to be able to create tickets. But then again that limits the odds of getting notified about issues in your code, as users tend to not register to sites that they will not use often and BitBucket is after all a place for devs.
Dragonaire
Here there be Dragons
#280 - 2012-04-04 15:21:57 UTC
Yep those were some of the same reasons I didn't go with them. I changed the defaults on SF as well to require a little more than anonymous access to report bugs but since they also use openID etc almost anyone with an E-mail address can have logins there. I figure since people can still report bugs on this thread as well it's not really a problem either Blink

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