LeaguePHP / LeagueWrap

League of Legend API wrapper
MIT License
20 stars 7 forks source link

Loading summoner by pseudo #8

Closed Phobie53 closed 7 years ago

Phobie53 commented 7 years ago
Fatal error: Uncaught RuntimeException: Error creating resource: 
[message] 
fopen(https://euw.api.pvp.net/api/lol/euw/v1.4/summoner/by-name/DcD%20Phobie?api_key=XXXX-XXXX-XXXX): 
[file] vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php 
[line] 282 in vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php:222 
Stack trace: 
#0 vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php(285): GuzzleHttp\Handler\StreamHandler->createResource(Object(Closure)) 
#1 vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php(52): GuzzleHttp\Handler\StreamHandler->createStream(Object(GuzzleHttp\Psr7\Request), Array) 
#2 vendor\guzzlehttp\guzzle in vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 51

When I try to call : $player = $summoner->info($pseudo); // Get the information about this user.

dnlbauer commented 7 years ago

This is an exception in guzzle so you might check their issue list for solutions. Ive never seen this before but maybe you are missing some php extensions in your windows installation? Are other api endpoints/regions run normal or do you get the same exception for everything?

Enzo Chevallier notifications@github.com schrieb am Sa., 26. Nov. 2016, 17:40:

Fatal error: Uncaught RuntimeException: Error creating resource: [message] fopen( https://euw.api.pvp.net/api/lol/euw/v1.4/summoner/by-name/DcD%20Phobie?api_key=XXXX-XXXX-XXXX): [file] C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\OptimalChampionSelect\vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php [line] 282 in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\OptimalChampionSelect\vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php:222 Stack trace: #0 C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\OptimalChampionSelect\vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php(285): GuzzleHttp\Handler\StreamHandler->createResource(Object(Closure)) #1 C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\OptimalChampionSelect\vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php(52): GuzzleHttp\Handler\StreamHandler->createStream(Object(GuzzleHttp\Psr7\Request), Array) #2 C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\OptimalChampionSelect\vendor\guzzlehttp\guzzle in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\OptimalChampionSelect\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 51

When I try to call : $player = $summoner->info($pseudo); // Get the information about this user.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LeaguePHP/LeagueWrap/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AEeQ8tP6p4Bus3r7KUaLOsiqPOz-D-Onks5rCGDwgaJpZM4K872N .

m1so commented 7 years ago

I'm closing the issue since the problem is on user's side with Guzzle.

Phobie53 commented 7 years ago

All your function return me this error, are you sure this lib is not broken ? Or maybe can you downgrade to a lower version of Guzzle ?

dnlbauer commented 7 years ago

The lib is not broken. I'm pretty sure it's something with your setup. Please note that leaguewrap is developed and tested under Unix and for deployment on Unix like systems.

Setting php up under Windows can be a cumberstone and supporting this is out of scope of this issue tracker.

Enzo Chevallier notifications@github.com schrieb am Mo., 28. Nov. 2016, 11:32:

All your function return me this error, are you sure this lib is not broken ? Or maybe can you downgrade to a lower version of Guzzle ?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/LeaguePHP/LeagueWrap/issues/8#issuecomment-263237049, or mute the thread https://github.com/notifications/unsubscribe-auth/AEeQ8mVF9GGUB59SAyy0XdKCRjZWUyepks5rCq3NgaJpZM4K872N .

dnlbauer commented 7 years ago

To give u a hint check if all your extensions are working. Leaguewrap needs curl and memcached to be working with default parameters.

Daniel Bauer danijoo@headlezz.net schrieb am Mo., 28. Nov. 2016, 11:47:

The lib is not broken. I'm pretty sure it's something with your setup. Please note that leaguewrap is developed and tested under Unix and for deployment on Unix like systems.

Setting php up under Windows can be a cumberstone and supporting this is out of scope of this issue tracker.

Enzo Chevallier notifications@github.com schrieb am Mo., 28. Nov. 2016, 11:32:

All your function return me this error, are you sure this lib is not broken ? Or maybe can you downgrade to a lower version of Guzzle ?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/LeaguePHP/LeagueWrap/issues/8#issuecomment-263237049, or mute the thread https://github.com/notifications/unsubscribe-auth/AEeQ8mVF9GGUB59SAyy0XdKCRjZWUyepks5rCq3NgaJpZM4K872N .

Phobie53 commented 7 years ago

Changed EasyPHP version, and it's not a Guzzle error here : Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\projects\OptimalChampionSelect\vendor\league-php\leaguewrap\src\LeagueWrap\Api\AbstractApi.php on line 503

m1so commented 7 years ago

I have no idea what "EasyPHP" is but by looking at their site you can see This version doesn't support PHP 5.5.x, 5.6.x, 7.x written in red letters, which is why you get that error.

LeagueWrap only supports PHP version from 5.5.x upwards.

luisbatista commented 7 years ago

@Phobie53 you can get a "EasyPHP" like package from XAMPP project: https://www.apachefriends.org/ Have pack with PHP v5.5.x, 5.6.x and 7.0.x

I use the XAMPP with PHP v5.6 and no error's found using LeaguePHP, only need to adapt the cache (to memcache and create a c:\tmp folder) and work's fine.

Best regards, LB