mfischer
(Matthias Fischer)
24 December 2020 00:50
1
Hi,
After upgrading to Core 153, ‘country.cgi’ shows only a blank list of ‘Country Codes and Flags’:
And each time /var/log/httpd/error_log
tells me:
Usage: Location::database_countries(db) at /srv/web/ipfire/cgi-bin/country.cgi line 56.
Can anyone confirm?
Best,
Matthias
2 Likes
rotzjoere
(Rotz Jöre)
24 December 2020 01:00
2
Hi Matthias,
i can confirm the blank list and the error in the httpd log.
Greetings
jon
(Jon)
24 December 2020 01:43
3
+1. confirmed.
I am curious, what WebGUI page gets you to country.cgi
? EDIT : found it!
FYI - history repeats!
https://forum.ipfire.org/viewtopic.php?f=50&t=12913&p=84402&hilit=country.cgi#p84892
roberto
(Roberto Peña)
24 December 2020 06:38
4
Same here.
Usage: Location::database_countries(db) at /srv/web/ipfire/cgi-bin/country.cgi line 56.
Bye.
pmueller
(Peter Müller)
24 December 2020 08:13
5
Hi all,
for the records: I can confirm this as well and will take care of it…
EDIT #1: This issue is tracked as bug #12560 .
EDIT #2: There is a patch available solving this issue for me. It would be great if anybody could confirm.
Thanks, and best regards,
Peter Müller
5 Likes
Hi @pmueller ,
Confirmed I have the same problem, applied the patch and can confirm that the problem is solved.
mfischer
(Matthias Fischer)
24 December 2020 10:19
7
@pmueller
Confirmed. Your patch solves it. Thanks!
[But why did this take so long…!? ]
Serious: I didn’t expect that someone would fix this bug so fast. Respect!
@jon : its tricky to find, but…
Regardless of everything else, I wish everyone a peaceful merry chrismas.
Take care!
Best,
Matthias
1 Like
eggman
(Bill Eggers)
24 December 2020 15:34
8
For the less informed, can you help me apply the patch through an ssh connection?
mfischer
(Matthias Fischer)
24 December 2020 15:51
9
Hi,
@eggman
This is relatively simple:
Open IPFire-GUI - Choose SYSTEM / SSH access
Choose Stop SSH demon in 15 minutes
Start PuTTY or similar SSH-program.
Connect to your IPFire-PC: root + YOUR_PASSWORD
cd to /srv/web/ipfire/cgi-bin
Choose an editor - e.g., nano (available as addon)
Start (e.g.) nano country.cgi
Change line 56 from my @countries = &Location::database_countries();
to my @countries = &Location::Functions::get_locations();
Save and exit (for nano: CTRL-X, Yes, ENTER)
Done.
HTH,
Matthias
1 Like
eggman
(Bill Eggers)
24 December 2020 16:11
10
Disco. I was trying to use the patch function. This was a simpler way. Thanks for the assist!
bonnietwin
(Adolf Belka)
25 December 2020 11:04
12
Hi @eggman ,
Just for future use, especially if the diff has more lines with changes, here is the patch command to use.
patch -b /srv/web/ipfire/cgi-bin/country.cgi -i /tmp/country.cgi-fix-location-function-call.diff
The -b tells patch to make a backup of the file before patching it.
The next part is the original file location. This can be missed out and patch will use the information from the patch file but in this case the patch had the build location in it. So specifying the original file location solves that. This only works if there is only one file to be patched in the diff file.
the -i path/file specifier is where you have placed the diff file. I used scp to copy it into the /tmp directory on my IPFire.
1 Like
eggman
(Bill Eggers)
25 December 2020 13:49
13
Much appreciated. That makes sense. This community is always so supportive. I am thankful to have joined.
1 Like
uselpa
(Patrick Useldinger)
25 December 2020 17:13
14
Hello, I applied the patch and country.cgi is working as intended; however, my rules which involve country filtering still fail.
Is this related?
Removing the country restriction on the firewall rule reinstates the services as intended,
hellfire
(Hellfire)
26 December 2020 07:52
15
Sorry for my ignorance, but which menu item will lead me to this faulty webpage?
I’ve entered it manually but so far I could not spot a menu path that uses the URL: https://192.168.0.1:444/cgi-bin/country.cgi
It works of course after applying the path path, did it manually, though, but I’m stil lcurious to find the menu
1 Like
hellfire
(Hellfire)
26 December 2020 07:55
16
Forget it, found the soultion in another thread: I’ve to click on the flag Icon in firewall logs by country…
Hi,
I can confirm this issue as well.
Cheers!
This worked for me. Many thanks
roberto
(Roberto Peña)
27 December 2020 14:25
19
Its works well now. Thanks.Matthias.
mfischer
(Matthias Fischer)
27 December 2020 15:10
20
Hi,
thanks, Roberto - but the main credits go to Peter - he wrote the patch .
1 Like