antonioribeiro / firewall

Firewall package for Laravel applications
BSD 3-Clause "New" or "Revised" License
1.4k stars 164 forks source link

GeoIP is not found #36

Closed imarkdesigns closed 8 years ago

imarkdesigns commented 8 years ago

Hello,

Whenever i tried to configure the code, it was ended to this portion:

{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Class 'PragmaRX\Support\GeoIp' not found","file":"\/home\/sitename\/vendor\/pragmarx\/firewall\/src\/Vendor\/Laravel\/ServiceProvider.php","line":151}}

Any idea sir?

imarkdesigns commented 8 years ago

Even this: If i am running php artisan firewall:blacklist country:ph to test if my country will block...

Command "firewall:blacklist" is not defined.
Did you mean one of these?
firewall:tables
firewall:list  
antonioribeiro commented 8 years ago

Should be fixed now.

Also, you have to remember to enable, on config\firewall.php:

enable_country_search

and

use_database

Those are disabled by default to improve speed.

imarkdesigns commented 8 years ago

Btw, i found that one of your file under "Support" is missing when i run the GeoIP... the main file "GeoIp.php". Luckily i have my old copy at my local (desktop). Not sure but for sure it is weird that it is missing in terminal ssh installation via VPS.

Thanks also for the quick update. appreciate it!

antonioribeiro commented 8 years ago

You have to make sure your VPS is downloading the last versions of

pragmarx/support pragmarx/tracker

So you have to make sure it is installing:

This screenshot was taken from an installation on a 4.2.

Unfortunately Composer sometimes misses some packages updates...

antonioribeiro commented 8 years ago

Found the bug. Directory was not renamed in GitHub!!!

old was: src/geoip new is: src/GeoIp

GitHub kept it as src/geoip.

Will fix it, sorry, guys.

antonioribeiro commented 8 years ago

Done, please check.

Sorry again.

rajanrawal commented 8 years ago

Go to vendor\pragmarx\firewall\src\Vendor\Laravel\ServiceProvider.php Near by line no 8 or so, Change use PragmaRX\Support\GeoIp; to use PragmaRX\Support\GeoIp\GeoIp;

Then

Go to vendor\pragmarx\firewall\src\Firewall.php Near by line no 32 or so, Change use PragmaRX\Support\GeoIp; to use PragmaRX\Support\GeoIp\GeoIp;

Should work fine then