Support

Admin Tools

#10044 Admin Tools 2.1.10 breaks pages: geoip

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Friday, 30 September 2011 02:27 CDT

piggybank
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the forum before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 1.5.23
PHP version: 5.2.9
MySQL version: 5.0.92
Host: HostGator dedicated
Admin Tools version: 2.1.10


Description of my issue:

After upgrading from 2.1.5 to 2.1.10 pages generated by IXXO Cart shopping cart "broke". In the error log, I see: PHP Fatal error: Cannot redeclare geoip_load_shared_mem() in /home/XXXXX/public_html/components/com_ixxocart/geoip.inc on line 0

A Couple of notes about this:
- Site is using sh404SEF and I have it set to skip/disabled for IXXO Cart paths.
- I used to have a restriction to block China. In previous versions of Admin Tools, enabling this caused this same error. Currently, I have NO geo restrictions.
- uninstalling and going back to 2.1.5 seemed to resolve the issue.

nicholas
Akeeba Staff
Manager
The same problem would occur with every release of Admin Tools if your turned on GeoBlocking and, in fact, it is NOT a bug in Admin Tools, but a bug in your cart software. Let me explain it.

Admin Tools specifically checks if any other extension has already loaded the geoip functions before it runs. In this case, it won't try to load them again as this would cause a PHP Fatal Error.

Your cart does not do this check. It assumes that these functions are not loaded and loads them anyway, causing the aforementioned issue. Please contact its developer and ask for a fix. The fix is trivial: just wrap the include with an if-block which checks if the functions already exist. He's welcome to take a peek at plugins/system/admintools/pro.php to see how I do that.

In the meantime you have to disable the geoip feature of either Admin Tools or your cart.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

piggybank
Thanks Nicholas.

I will certainly follow up with IXXO Cart...your response makes sense.

What I am confused about is: in 2.1.5, I can clear all values in GeoIP and that works. However, in 2.1.10, simply clearing all values (unchecking all options) still "breaks" the page.

Is there another way to disable geoip in 2.1.10?

nicholas
Akeeba Staff
Manager
Since 2.1.6, security exception emails also include the country and continent of the attacker. In order for Admin Tools to do that, it loads the GeoIP functions during the plugin's initialisation. This means that you can not tell it to not load this library which conflicts with your cart software. The only workaround is to turn off Admin Tools until the cart software's author can provide a proper solution.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!