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.
Previous page12
 

Pheal - simple to use full featured PHP5 API Library

Author
Peter Powers
Terrorists of Dimensions
HORSE-KILLERS
#21 - 2012-01-30 18:42:01 UTC
Sol Laxon wrote:
Also what I have in the cache looks like this:

public/public/map/Sovereignty/Request.xml

and the exact copy in a dated folder. No /map/Jumps as I would expect.

i just run that code on my own machine:


disasta@j3737:/tmp$ ls -la testcache/public/public/map/Jumps/Request.xml
-rw-rw-rw- 1 disasta disasta 254079 Jan 30 19:40 testcache/public/public/map/Jumps/Request.xml

so it seems to work here.
have you checked your errorlog?

3rdPartyEve.net - your catalogue for 3rd party applications

Sol Laxon
Talu Shaya
Talu Shaya Empire
#22 - 2012-01-30 18:52:57 UTC  |  Edited by: Sol Laxon
Could it be something with the timing? So it isn't adding new cache files because sovereignty was cached too recently?

edit: There are no errors in the log.
Peter Powers
Terrorists of Dimensions
HORSE-KILLERS
#23 - 2012-01-30 19:18:58 UTC
Sol Laxon wrote:
Could it be something with the timing? So it isn't adding new cache files because sovereignty was cached too recently? .

no.

3rdPartyEve.net - your catalogue for 3rd party applications

Sol Laxon
Talu Shaya
Talu Shaya Empire
#24 - 2012-01-30 19:23:08 UTC
Sorry for all these questions Peter,

I have deleted the folders under cache, and now everything is being added properly.
The only thing is it now only has the dated folder, and not the second folder with the unchanging path to the result files.

so it has /cache/2012-01-30/public/public/map/Jumps/Request_20120130-191258.xml
and no longer has the: public/public/map/Jumps/Request.xml

Any ideas where I went wrong now?
Peter Powers
Terrorists of Dimensions
HORSE-KILLERS
#25 - 2012-01-30 19:28:49 UTC
Sol Laxon wrote:
Sorry for all these questions Peter,

I have deleted the folders under cache, and now everything is being added properly.
The only thing is it now only has the dated folder, and not the second folder with the unchanging path to the result files.

so it has /cache/2012-01-30/public/public/map/Jumps/Request_20120130-191258.xml
and no longer has the: public/public/map/Jumps/Request.xml

Any ideas where I went wrong now?

the "dated" folder, is the one that the archive adds.
im not sure if you even want that.

i havent used the archive stuff myself, but maybe you should have archive and cache write to different directories anyways.

3rdPartyEve.net - your catalogue for 3rd party applications

Sol Laxon
Talu Shaya
Talu Shaya Empire
#26 - 2012-01-31 01:03:14 UTC
Thank you, I think that did the trick.

And thank you very much for creating this piece of code :)

I am currently using the following code, after I get everything cached via a cron:

Quote:
//Getting the System ID, $sysname comes from the eve browser data.
$xml = simplexml_load_file("YOURPATH/Request.xml");
$pathx = "//row[@solarSystemName='".$sysname."']";
$result = $xml->xpath($pathx);
$sysid = $result[0]['solarSystemID'];

//Getting the Jumps
$xml = simplexml_load_file("YOURPATH/Jumps/Request.xml");
$pathx = "//row[@solarSystemID='".strval($sysid)."']";
$result = $xml->xpath($pathx);
$theJumps = $result[0]['shipJumps'];


Just in case this can help out someone finding this in a search. Someone else has recommended a restructure of this though, but it went over my head. Will be playing around with it till I can understand.
graves warship
State War Academy
Caldari State
#27 - 2012-02-10 10:49:58 UTC
currently on my forums i am using the phpbb3 authentication tool which you can find here further up the pages
but it gives me a pheal error

can you point me in th right direction as where to look?

Fatal error: Cannot access protected property PhealHTTPException::$code in /datasan/www/vhosts/xxxxxx/httpdocs/forums/includes/eveapi/functions_eveapi.php on line 261


thnx
Trenker
#28 - 2012-02-10 10:54:59 UTC
graves warship wrote:

Fatal error: Cannot access protected property PhealHTTPException::$code in /datasan/www/vhosts/xxxxxx/httpdocs/forums/includes/eveapi/functions_eveapi.php on line 261


Sounds like you are trying something like

echo $exception->code;

the code property is not public, as the error says, try

echo $exception->getCode();

instead.
graves warship
State War Academy
Caldari State
#29 - 2012-02-10 11:01:17 UTC
catch(PhealException $e)
{
$charArray["error"][$e->code] = $e->getMessage();
cronlog('EVE API error: ' . $e->code . ' -> ' . $e->getMessage(), $characterName);

is about what the code is around those lines
graves warship
State War Academy
Caldari State
#30 - 2012-02-10 11:04:30 UTC
could it be that eve has blocked our ip adress from the use of the api ?
Trenker
#31 - 2012-02-10 11:18:38 UTC
graves warship wrote:
catch(PhealException $e)
{
$charArray["error"][$e->code] = $e->getMessage();
cronlog('EVE API error: ' . $e->code . ' -> ' . $e->getMessage(), $characterName);

is about what the code is around those lines


Try

$charArray["error"][ $e->getCode() ] = $e->getMessage();
cronlog('EVE API error: ' . $e->getCode() . ' -> ' . $e->getMessage(), $characterName);

To find out why the exception is thrown
graves warship
State War Academy
Caldari State
#32 - 2012-02-10 11:28:38 UTC  |  Edited by: graves warship
Trenker wrote:
graves warship wrote:
catch(PhealException $e)
{
$charArray["error"][$e->code] = $e->getMessage();
cronlog('EVE API error: ' . $e->code . ' -> ' . $e->getMessage(), $characterName);

is about what the code is around those lines


Try

$charArray["error"][ $e->getCode() ] = $e->getMessage();
cronlog('EVE API error: ' . $e->getCode() . ' -> ' . $e->getMessage(), $characterName);

To find out why the exception is thrown


right did that and get the following
Not Found
Character and API settings do not match -> graves warship

i used the same api info from a xampp installation on my local pc and it goes without a hitch

i think the whole domain is blocked from api usage ill have a look if thats the case but it sure looks like it
Louis Vitton
Viziam
Amarr Empire
#33 - 2012-02-10 21:48:34 UTC
The only reason that you might get banned from the API server is because you spammed it with faulty requests and by spammed i mean 1000's of them.
graves warship
State War Academy
Caldari State
#34 - 2012-02-10 22:29:27 UTC  |  Edited by: graves warship
as i said on my local machine no problem api
on the host server however is another issue
Louis Vitton
Viziam
Amarr Empire
#35 - 2012-02-10 22:54:49 UTC
graves warship wrote:
as i said on my local machine no problem api
on the host server however is another issue


May i ask what are you running o nyour local machine?
Windows? and Host is using Linux?

Easy way to get the answer would be petition this as an api issue in game and then write the IP of your hosted website and CCP should have the ability to look up the blacklist and see if it is banned or not for you and possibly unban it.

Previous page12