LeaguePHP / LeagueWrap

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

Windows, API->limit() generate an Error #6

Closed luisbatista closed 7 years ago

luisbatista commented 7 years ago

Hello,

I make my development on Windows, when use your warpper and set this: $api->limit(x,y); get a throw error: 'We could not load a valid limit interface.' (in LeagueWrap/Api.php => function limit() ). This message isn't very "enlightening".

The problem is that the LeagueWrap/Limit/FileLimit.php want to create a file in '/tmp' folder but this folder do not exists in Windows! And another problem, wrapper need to have this folder in the drive root, where a app/script do not have permission to create a folder.

My drive tree:

C:\ /xampp/htdocs/webapp/ <--- my .php scripts /xampp/htdocs/webapp/vendor/LeagueWrap/... <--- LoL wrapper /xampp/php/ <--- php .exe /xampp/apache/ <--- apache .exe /xampp/tmp/ <--- general /tmp folder, configured in php.ini

and I have to create this new folder to work correctly with your wrapper:

C:\ /tmp/

One option is to inform the user that the folder does not exist (for him to manually create this folder) and another option is to set the location where this folder can be created, perhaps the folder where the webapp is running!

I'm not a nix user and don't know if this problem can occurs in this nix SO.

What you think?

Best regards, LB

PS: Sorry my poor english!

dnlbauer commented 7 years ago

Problem is Windows has other paths than Unix and this library is written to work on Unix. You can write your own filellimit implementation to use a custom path that's available on Windows though.

luisbatista commented 7 years ago

Thanks danijoo.

Best regards, LB