X-Cart GeoIP Admin Access Documentation

Thank you for choosing MagneticOne!


This manual should help you install the software on your site within a few minutes. If you experience any problems, please consult the documentation at http://support.magneticone.com/. And, please don't hesitate to contact us - we're always glad to help.

Installation Instructions

1. Execute SQL instructions from file `xcart_geoip_redirect.sql` included into this release (you can use such tool as phpMyAdmin to do this)

2. Copy all files in BINARY (not ASCII) mode from 'public_html' folder of this distribution overwriting all your existing files in X-Cart installation. Follow this link to get more information about BINARY transfer mode.

3. Copy all files from 'skin' folder of this distribution overwriting all your existing files in your active skin (this may be directory skin1/ inside your X-Cart installation).

4. Open file auth.php of your X-Cart installation and find line:


   Exactly after this line insert text below

//GeoIP modules

    if (!empty($active_modules['GeoIp_Redirect']))

        include $xcart_dir."/modules/GeoIP/check_access.php";

5.  Open file admin/configuration.php of your X-Cart installation and find lines:

if ($option == "User_Profiles") {

    include "./user_profiles.php";


    Exactly after these lines insert text provided below

elseif ($option == "GeoIp_Redirect") {

    include "./geoip_redirect.php";


6. Open file admin/main/configuration.tpl of your active skin directory and find lines:

{elseif $option eq "Search_products"}

    {include file="admin/main/search_products_form.tpl"}

    Exactly after these lines insert

{elseif $option eq "GeoIp_Redirect"}

    {include file="admin/main/geoip_redirect.tpl"}

7.  Install latest GeoIp Country database.

    7.1. download latest version of GeoIp Country Binary Format from http://www.maxmind.com/app/geoip_country.

    7.2. extract files from archive

    7.3. put file GeoIP.dat into modules/GeoIP of your X-Cart installation

8. Now you can activate your licence and set list of countries which are allowed to access yuor store in Admin section: "General Settings" -> "Modules Options" -> "GeoIp_Redirect"

9. To activate module go to Admin section, then "Modules" and set checkbox near "GeoIp Redirect"

10. You should receive the unique license key in order notification email. It's also available in My Account section of MagneticOne Store. Please paste your unique license key in License Key field on module settings page of your Store Administration Panel.

Important! Common installation issue are the following:

1. In case you receive the following error "Fatal error: Unable to read xxx bytes in xxxxxx.php on line 0" after the the installation was completed", it means that the files were uploaded using wrong transfer mode. Please, make sure to re-upload the files from package in correct mode. Also here you can check more details about this error. Also here you can check more details about this error.

2. In case you get this error Fatal error: Incompatible file format: The encoded file has format major ID x, whereas the Loader expects x in xxxxxxxxx.php on line x

This error indicates that you are trying to install ZendOptimizer encoded module version on PHP 5.3 or newer.

The thing is that PHP 5.3 or newer doesn’t support ZendOptimizer anymore. It was changed to ZendGuard that can not decode MangeticOne modules properly. So when you are trying to install module version for ZendOptimizer on PHP 5.3 or newer you get this error.


If you see any technical problems during installation we recommend to use Shopping Cart Diagnostic Utility (m1info.php), your product installation package already includes it. This utility will help you to solve most initial configuration problems (hosting configuration, php/mysql configuration, webserver configuration, shopping cart configuration). 

Upgrade Instructions

1. Please get the latest version of software from MagneticOne Store. You can find the download link in order details in your Account section.

2. Re-upload files from package to your store. Overwrite existing files if necessary.

3. Please check the upgrade.txt file in installation archive for additional upgrade instructions (if any).

Un-installation Instructions

1. Restore files from backup. If you didn’t make a backup, please follow the installation instructions in reverse order.

2. Delete all files that were copied from installation package

3. If you have any other MagneticOne modules installed – please DO NOT delete “include/m1_common_functions.php”

Related Resources

  1. Knowledgebase/FAQ
  2. Public Forum
  3. Request a feature/Report a bug



Thank you for reading this far. We wish you success in your e-business.


MagneticOne Team