Filter by country

Version 1.0.22 released - Filter by country

Version 1.0.22 released

by MarkDHamill » Mon May 06, 2024 1:41 am

This version should fix the issue with multiple HTTP 403 errors. Let me know if it doesn't.

Change log:

https://github.com/MarkDHamill/filterby ... edf5e87765

GitHub archive:

https://github.com/MarkDHamill/filterby ... ree/1.0.22

Thanks to all those who helped in the analysis and testing.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4927
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: Version 1.0.22 released

by panhead » Mon May 06, 2024 7:36 am

I think it works, but no statistics are shown.
panhead
Registered User
Posts: 965
Joined: Sat Dec 20, 2003 8:17 pm

Re: Version 1.0.22 released

by MarkDHamill » Mon May 06, 2024 12:30 pm

You may need to enable statistics on the settings page.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4927
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: Version 1.0.22 released

by panhead » Mon May 06, 2024 12:41 pm

I have. I get this message:
stats.jpg
panhead
Registered User
Posts: 965
Joined: Sat Dec 20, 2003 8:17 pm

Re: Version 1.0.22 released

by focp » Mon May 06, 2024 1:10 pm

using this new version, 1.0.22, i'm getting the same message regarding no statistics,
plus ip's from countries on the blocked list are able to view the forum too,
i've double checked all settings but nothing amiss as far as i can see,

but at least the hundreds of errors created when using 1.0.19 have gone :)
focp
Registered User
Posts: 52
Joined: Mon Feb 15, 2016 10:59 am

Re: Version 1.0.22 released

by MarkDHamill » Mon May 06, 2024 1:32 pm

If statistics are enabled you should start seeing blocked country statistics when you run reports if there are any to collect.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4927
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: Version 1.0.22 released

by panhead » Mon May 06, 2024 1:39 pm

That is correct and how it worked. But after the upgrade this morning there are no entries in the statistics overview. After 6 hours it's unlikely that there are no statistics.
panhead
Registered User
Posts: 965
Joined: Sat Dec 20, 2003 8:17 pm

Re: Version 1.0.22 released

by lexus » Wed May 08, 2024 7:32 pm

Hello,

The extension can be used with any phpbb 3.3.x release?

Thank you
lexus
Registered User
Posts: 20
Joined: Mon May 29, 2017 9:27 pm

Re: Version 1.0.22 released

by MarkDHamill » Wed May 08, 2024 7:39 pm

In theory, yes, however it hasn't been tested with all phpBB 3.3 releases. Generally, to the extent it is tested, it is with the latest release.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4927
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: Version 1.0.22 released

by focp » Thu May 09, 2024 11:21 am

MarkDHamill wrote:In theory, yes, however it hasn't been tested with all phpBB 3.3 releases. Generally, to the extent it is tested, it is with the latest release.
when you say its tested with the latest phpbb version, does that mean its working ok with 3.3.11 ok ?
with ip's from the blocked list being blocked and that the statistics are displayed ok, as i'm still getting no statistics displayed and ip's from blocked countries, like china for example, are able to view the forum without restrictions.

i'm gettin the same results using 3.3.11 with php 7.4.33 and also with php 8.2.12
focp
Registered User
Posts: 52
Joined: Mon Feb 15, 2016 10:59 am

Re: Version 1.0.22 released

by MarkDHamill » Thu May 09, 2024 2:22 pm

I get that there is likely an issue with statistics. I'll try to find a fix for it today.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4927
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: Version 1.0.22 released

by MarkDHamill » Thu May 09, 2024 4:40 pm

It appears that the new MaxMind license key is exactly 40 characters, at least mine is when I got a new license key. So to solve the statistics not reporting issue change lines 103-110 in event/main_listener.php to:

Code: Select all

		// If the license key has not been entered or is not valid, the MaxMind database integration won't work. The
		// database may not have been downloaded yet. So in this event, the extension is not yet configured properly, in
		// which case we want to exit this function, allowing all traffic until this is true. Also, the new key size appears
		// to be exactly 40 characters.
		if ($this->config['phpbbservices_filterbycountry_license_key_valid'] == 0 || strlen(trim($this->config['phpbbservices_filterbycountry_license_key'])) < 40)
		{
			return;
		}
If you still have issues, you may be using the old key and need to get a new one. You can get a new one on maxmind.com.

Thanks for reporting the issue.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4927
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: Version 1.0.22 released

by panhead » Thu May 09, 2024 5:15 pm

statistics are working again. Thank you!
panhead
Registered User
Posts: 965
Joined: Sat Dec 20, 2003 8:17 pm

Re: Version 1.0.22 released

by focp » Sat May 11, 2024 8:20 am

everything back in full working order now :)
many thanks for your time and efforts in solving the problem :)
focp
Registered User
Posts: 52
Joined: Mon Feb 15, 2016 10:59 am

Re: Version 1.0.22 released

by Schabirosky » Sat Jun 08, 2024 6:19 am

Have found an Solution
Schabirosky
Registered User
Posts: 8
Joined: Sat Jan 20, 2018 9:09 am