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
Controller Vrelk
The Scope
Gallente Federation
#161 - 2011-12-14 04:37:32 UTC  |  Edited by: Controller Vrelk
What is the correct way to add an API key to the system? I manually added one to utilregisteredkey and set `active` to 1 and the existing example one to `active`=0.

When I run yapeal.php from console I get this:
Quote:
ERROR: No sections were found in utilSections check database.
File: /home/****/*****/ratter/yapeal/yapeal.php(155)


It also does not add the other information to the rest of the tables. The key has access to char/WallerJournal only.

I tried going through the wiki (which is outdated, as you have said before) and code to find the correct way of doing so, but didn't find anything that seemed to do what I wanted.
Dragonaire
Here there be Dragons
#162 - 2011-12-14 05:32:21 UTC
Make sure the char section in utilSections has isActive=1
It sound like you did the rest right though you didn't say what your activeAPIMask value was but if it's NULL the one from sections will control it.

As to the wiki yes it is outdated on a lot of stuff but the UsingClassUtilClasses and UtilDatabaseTableDependences are still useful for understanding the things you're having trouble with and have been updated to the current way things work since I last wrote about them being outdated.
If you have any other questions just ask I'm much better answering questions here than I ever have been trying to write about how to use stuff for new people in general Blink

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
#163 - 2011-12-14 05:47:32 UTC
Alrighty, I did some tests on a copy of my DB and it looks like dropping all my account*, eve*, and util* tables and then rerunning createMySQLTables.php does the trick.

If schema changes are made to existing tables, does createMySQLTables update them? Or do I have to do any schema updates manually? (Just planning ahead)

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

Dragonaire
Here there be Dragons
#164 - 2011-12-14 06:04:48 UTC
Most of them it should be able to handle on it's own if you stay within a couple versions of current version on the few times when I have to break it and you need to handle it manually I make sure to put something in the CHANGELOG plus say something about it here in the thread also with instructions on what to do or look out for.

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

Spike Keikira
Noob's with Rockets
#165 - 2011-12-14 15:46:41 UTC  |  Edited by: Spike Keikira
New Update New Trouble... Cry

Quote:

2011-12-14 14:37:27.723
WARN: Row was missing required fields (inWatchlist) that are needed for yp_charContactList
File: /var/www/yapeal/class/YapealQueryBuilder.php(217)
2011-12-14 14:37:28.821
WARN: mysqlierror: [1062: Duplicate entry '90668646-1119499077' for key 'PRIMARY'] in adodb_throw(insert into `yp_charContactList` (`ownerID`,`contactID`,`contactName`,`inWatchlist`,`standing`) values
.
.
.
.

Code: 1062
Trace:
#0 /var/www/yapeal/ext/ADOdb/adodb.inc.php(227): adodb_throw('mysqli', 'adodb_throw', 1062, 'Duplicate entry...', 'insert into `yp...', false, Object(ADODB_mysqli))
#1 /var/www/yapeal/ext/ADOdb/adodb.inc.php(1042): ADODB_TransMonitor('mysqli', 'EXECUTE', 1062, 'Duplicate entry...', 'insert into `yp...', false, Object(ADODB_mysqli))
#2 /var/www/yapeal/ext/ADOdb/adodb.inc.php(1017): ADOConnection->_Execute('insert into `yp...', false)
#3 /var/www/yapeal/class/YapealQueryBuilder.php(508): ADOConnection->Execute('insert into `yp...')
#4 /var/www/yapeal/class/api/AApiRequest.php(205): YapealQueryBuilder->store()
#5 /var/www/yapeal/class/api/AApiRequest.php(130): AApiRequest->parserAPI()
#6 /var/www/yapeal/class/SectionChar.php(157): AApiRequest->apiStore()
#7 /var/www/yapeal/yapeal.php(164): SectionChar->pullXML()
#8 {main}
--------- END TRACE ----------

File: /var/www/yapeal/class/api/AApiRequest.php(215)


and the KillLog also "down"

P.S. i resetet the Database , the same errors Ugh
Dragonaire
Here there be Dragons
#166 - 2011-12-14 17:34:36 UTC  |  Edited by: Dragonaire
charContactList error about inWatchList sounds like CCP made a change to make it optional without telling anyone or its a new bug in their code with the same effect Blink There is nothing in the blog when the API was added that says it can be optional and it really doesn't make sense for it to be so that needs to be followed up on with CCP. The blog that talks about the new API is here: http://www.eveonline.com/devblog.asp?a=blog&bid=757 I'll follow up with them on it but I'd like it if you'd also do a bug report on it so they get an example of the XML file that has the error.

The error about duplicate entry can only happen if somehow in your in game contact list you have the same character/corporation listed twice some how. If it isn't show something twice then there is a bug either in the API or the CCP database. I've had another report about duplicate entries in a different API which I know is a bug in their database so this could be the same thing happening here too. I'd follow up with CCP with a bug report on this too and let me know what they say as on the last one they initially responded they couldn't test it and the player would have to check it Shocked He followed up with them saying they had to fix it with some more info but as far as I know he has not heard back from them yet P

Edit: I've bug reported the inWatchList problem in bug ID 122907. If you could refer to it in you report it would be helpful.

Also make sure you have updated Yapeal for the problems with KillLog as it was just updated for the new 'singleton' field that was added to the rows in the XML and you'll need to run install/createMySQLTables.php again to update the database.

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

Spike Keikira
Noob's with Rockets
#167 - 2011-12-15 05:55:25 UTC
Ok i have send a BugReport and the incredible answer "With the next Downtime the error should be gone." Ok i wait Blink

And the Killlog dosen´t work anymore since the Update on 14.12 yapeal version is 11.345.2207 Database is up to Date.
Seems like CCP has changed something. Bovore the Update the killlog works fine. Ugh
Controller Vrelk
The Scope
Gallente Federation
#168 - 2011-12-15 07:00:15 UTC
There seems to be an issue with error logging.
Quote:
2011-12-15 06:49:29.394
INFO: Undefined variable: result
File: /home/selbyj/eve.mgassist.net/ratter/yapeal/class/YapealErrorHandler.php(109)

Quote:
2011-12-15 06:49:29.395
WARN: array_map(): Argument #2 should be an array
File: /home/selbyj/eve.mgassist.net/ratter/yapeal/class/YapealErrorHandler.php(112)


I first noticed this error when it was giving me the following error
Quote:
ERROR: No sections were found in utilSections check database.

I added a bit of extra logging to find out that it actually meant that it couldn't find the table. The problem occurred when I transferred the database from my windows dev server, which had converted all the table names to lowercase and is case-insensitive to my linux webserver which is case-sensitive.
Szelene
Federal Navy Academy
Gallente Federation
#169 - 2011-12-15 07:57:29 UTC
Hi everybody,

Anybody knows that, in which file store the eve the settings (esc menu) information? I didnt found that. Is it in a ini file? And where is store this settings in the eve? Thats would be very important. Thx!

Dragonaire
Here there be Dragons
#170 - 2011-12-15 09:02:19 UTC
Szelene - Might actually get an ask if you did your own thread instead of using one that is about something else.

Spike Keikira - Give it a day the day after patches often the APIs do some strange things but if KillLogs still isn't working sometime after DT let me know and I'll look into it some more.

Controller Vrelk - That's one issue between Windows and Linux that Windows doesn't always track the case correctly Sad The easiest way to fix it is to do a MySQL dump on the Windows machine and edit the table names before using it on the Linux one P Yes it sucks trying to edit all 80+ table names. If you don't really need to transfer your data its much easier to just create the tables on Linux. Also there is a setting in MySQL's settings to have if use upper and lowercase on any platform it's just that they (MySQL) decided to default it differently on the two platforms Roll even though Windows does normally keep the case just ignores it in most cases. You might try changing that settings so you have less issues in the future.

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

Szelene
Federal Navy Academy
Gallente Federation
#171 - 2011-12-15 09:56:53 UTC
Dragonaire wrote:
Szelene - Might actually get an ask if you did your own thread instead of using one that is about something else.


I dont wanted creat a new topic for this little question, and i thought that, maybe in a "technical topic" somebody could help.
Dragonaire
Here there be Dragons
#172 - 2011-12-15 17:21:15 UTC
Szelene - Since it's a thread about an EVE API library and your question isn't in even the right forum since it's not about it or even third party development then your chance are about zero here. You might try doing an actual search with something you heard about called Google or there's even s few search engine just for the Eve forums that work very well and it's just a guess but I'm sure someone else has asked your question before and you can find it if you look without even having to post. You'd probably even have a better chance having your question answered in one of the general threads then going out of your way to find one that has nothing to do with the Eve client but the API instead which is on the Eve website.

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

Satis Iqulenax
Free Imperial Vikings
#173 - 2011-12-17 06:22:32 UTC
Controller Vrelk wrote:
There seems to be an issue with error logging.
Quote:
2011-12-15 06:49:29.394
INFO: Undefined variable: result
File: /home/selbyj/eve.mgassist.net/ratter/yapeal/class/YapealErrorHandler.php(109)

Quote:
2011-12-15 06:49:29.395
WARN: array_map(): Argument #2 should be an array
File: /home/selbyj/eve.mgassist.net/ratter/yapeal/class/YapealErrorHandler.php(112)


I first noticed this error when it was giving me the following error
Quote:
ERROR: No sections were found in utilSections check database.

I added a bit of extra logging to find out that it actually meant that it couldn't find the table. The problem occurred when I transferred the database from my windows dev server, which had converted all the table names to lowercase and is case-insensitive to my linux webserver which is case-sensitive.


just an extra info for you for the setup of MySQL on windows is to find the my.ini file ("For WampServer it's my.ini") for the MySQL server and add the line:
Quote:
lower_case_table_names = 2

You can find more info on what the lower_case_table_names values do on this link:
http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html

Committer of Yapeal for Eve API. Developer of XMLSchema. A database schema tool for PHP

Spike Keikira
Noob's with Rockets
#174 - 2011-12-17 08:36:40 UTC  |  Edited by: Spike Keikira
So 2 Days later the killlog still dosen´t work.

The error log is empty exept an Warning:
Quote:

WARN: Caching invalid API XML for char/ContactList
File: /var/www/yapeal/class/YapealApiCache.php(196)

and the ContactList also emty.
Satis Iqulenax
Free Imperial Vikings
#175 - 2011-12-17 16:31:35 UTC
Spike Keikira wrote:
So 2 Days later the killlog still dosen´t work.

The error log is empty exept an Warning:
Quote:

WARN: Caching invalid API XML for char/ContactList
File: /var/www/yapeal/class/YapealApiCache.php(196)

and the ContactList also emty.


I spoke with Dragonaire last night about the warning since you are not the only one getting that warning and I think he was going to work on it this weekend, plus the killlog I think.

Right now I have been helping Dragonaire adding some more API to the list and can say that the Factional Warfare Stats have been done for char, corp and eve section. they are not pushed to google code or SourceForge yet since Dragonaire need to check them out first.
The Factional Warfare Top 100 Stats have been done as well but it still needs some tweaks since the table names is very long in the database.

That's my update so far :)

Fly safe

Committer of Yapeal for Eve API. Developer of XMLSchema. A database schema tool for PHP

Dragonaire
Here there be Dragons
#176 - 2011-12-17 17:29:11 UTC
Spike Keikira - First make sure you have the latest version of Yapeal since there have been a lot of changes to it lately. Next make sure you also ran install/createMySQLTables.php to update your DB. Next check that the chars/corps that are having problem haven't had their KillLog APIs deactivated. Finally if you are sure all of that is good clear the cache by deleting the KillLog xml files in cache/{char,corp}/ and the DB cache in utilXmlCache also in that order with any crontab/scheduled task stopped. Then try running Yapeal manually from the command line and see if you notice any more details in some error message that might help figure out what the problem is.

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

Spike Keikira
Noob's with Rockets
#177 - 2011-12-17 19:38:19 UTC
Ok, the Killlog works when i change in te yapeal.ini

; Where you want xml cache output to go. (required)
; One of "none", "file", "database", or "both"
cache_output="file"

to file wenn i do it to database (utilXmlCache emty) it dosen't work

And a question is it Pland to integrade the /char/ContractItems.xml ?



Dragonaire
Here there be Dragons
#178 - 2011-12-17 20:11:34 UTC
If it won't cache to the database you should look at the cache/ADOdb/util.sql file and maybe try it manually to figure out what is wrong with your utilXmlCache table but glad you're making progress Smile

There was someone working on the contract APIs but he has took a break from Eve it seems so someone is going to have to pick it up and finish it Sad If someone is interested in finishing it let me know else it might be a little while before I have a chance to look into it. I believe there was some technical snag he was running into at the time because of something CCP had or hadn't done but I think they have ironed it out 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
#179 - 2011-12-17 23:02:44 UTC
Ok I've been trying to catchup on a couple API changes that have been made over the last week or so and finally got the one for char/ContactList done. There have also been another change to KillLog plus some other improvements. Everyone really needs to update their database with install/createMySQLTable.php like it says to do in INSTALL.md when updating Yapeal it will save you a lot problems. It doesn't hurt to run it on every update since if there's no changes needed it doesn't really end up doing anything to the database.

In other news it looks like the issues with walking APIs not working have been fixed and a major source of slow down in Yapeal has also been killed in the process. Once again everyone should really update as it'll fix a major CPU usage spike that Yapeal had developed P

version 11.351.1448

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

Callean Drevus
Perkone
Caldari State
#180 - 2011-12-18 00:52:31 UTC  |  Edited by: Callean Drevus
The reason I'm reluctant to upgrade yapeal, is that every time I do, it blows up in my face. Today was the database upgrade script.

I'm running it from the command line, but it kept complaining about not being able to find the database password, which is logical, as there isn't any. It also seems to be trying to connect over a unix socket, which is never going to work, but I guess this has more to do with php than with yapeal, as it worked later.

Now I'm not to worried about this, so I took a look at the script and modified it so that password is not required anymore.

I run it again and am confronted with the following message:

---
Failed to execute schema for util
Failed to execute schema for util
There were problems during processing please check any error messages from above and correct.
---

I probably do not have to explain that this does not help at all P

What I would like to see is:

- What sections is the script updating at the moment?
- What queries is it going to execute?
- What is the result of the queries, and the result per section?

I've now added these things manually, but every time I update yapeal they are overwritten again. Hopefully adding yapeal as a repository instead of a folder will allow me to push some of these changes back to the community.

EDIT: That said, while I'm bitching about Yapeal a lot, I'm very happy you made it, since even if it's mostly just a black box for me, once it's working, it's working perfectly Blink.

Developer/Creator of EVE Marketeer