Title: PHP Error Since 2.2.1
Last modified: August 30, 2016

---

# PHP Error Since 2.2.1

 *  Resolved [Julian](https://wordpress.org/support/users/julianpasco/)
 * (@julianpasco)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/)
 * Hi there,
 * Recently started using IGB on our websites, great plugin!! 🙂
 * Since the last update, version 2.2.1 we are unable to login admin and receive
   the following error message on the admin page:
 * Previous version 2.2.0.1 did not have any problems.
 *     ```
       Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/paradise/public_html/wp-content/ip-geo-api/index.php/class-index.php.php) is not within the allowed path(s): (/home/paradise:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/paradise/public_html/wp-content/plugins/ip-geo-block/classes/class-ip-geo-block-apis.php on line 745
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/paradise/public_html/wp-content/plugins/ip-geo-block/classes/class-ip-geo-block-apis.php:745) in /home/paradise/public_html/wp-includes/pluggable.php on line 1207
       ```
   
 * Will you please let me know what the issue could be?
 * Thanks!
 * [https://wordpress.org/plugins/ip-geo-block/](https://wordpress.org/plugins/ip-geo-block/)

Viewing 15 replies - 1 through 15 (of 15 total)

 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793092)
 * Hi Julian,
 * Sorry for your trouble. I think your accessible path is restricted. Temporarily,
   please try to remove the directory “`/home/paradise/public_html/wp-content/ip-
   geo-api/`“. And please let me know the result.
 * Note: To deactivate this plugin then activate again will cause this issue again.
 * I will fix this issue ASAP.
 * Thanks for reporting.
 * cf.: [http://stackoverflow.com/questions/1846882/open-basedir-restriction-in-effect-file-is-not-within-the-allowed-paths](http://stackoverflow.com/questions/1846882/open-basedir-restriction-in-effect-file-is-not-within-the-allowed-paths)
 *  Thread Starter [Julian](https://wordpress.org/support/users/julianpasco/)
 * (@julianpasco)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793093)
 * Hi there,
 * When I disable the plugin I’m able to login and don’t receive any error messages.
 * I’ve been able to revert to previous 2.2.0.1 version, don’t have any error messages,
   and everything works fine.
 * Thank you very much.
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793097)
 * Hi Julian,
 * > When I disable the plugin I’m able to login and don’t receive any error messages.
   
   > I’ve been able to revert to previous 2.2.0.1 version, don’t have any error 
   messages, and everything works fine.
 * Yes, I know about it.
 * From 2.2.1, the geolocation database is placed outside this plugin (e.g. “`wp-
   content/ip-geo-api`“) to prevent unnecessary downloading geolocation database
   at every upgrading.
 * But if this plugin can’t find it in “`wp-content/ip-geo-api`“, a back‐up inside
   this plugin will be used.
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793104)
 * Hi Julian,
 * Could you try [https://github.com/tokkonopapa/WordPress-IP-Geo-Block/archive/2.2.1a.zip](https://github.com/tokkonopapa/WordPress-IP-Geo-Block/archive/2.2.1a.zip)?
 * Please download it, unzip it, then upload “`ip-geo-block`” to your “`wp-content/
   plugins`” instead of 2.2.0.1.
 * Thanks for your cooperation.
 *  Thread Starter [Julian](https://wordpress.org/support/users/julianpasco/)
 * (@julianpasco)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793139)
 * Hi there,
 * Just tried the new version 2.2.1a, please see below:
 * Looks like just the error path have changed: “ip-geo-api//index.php/class-index.
   php.php”
 *     ```
       Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/paradise/public_html/wp-content/ip-geo-api//index.php/class-index.php.php) is not within the allowed path(s): (/home/paradise:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/paradise/public_html/wp-content/plugins/ip-geo-block/classes/class-ip-geo-block-apis.php on line 745
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/paradise/public_html/wp-content/plugins/ip-geo-block/classes/class-ip-geo-block-apis.php:745) in /home/paradise/public_html/wp-includes/pluggable.php on line 1207
       ```
   
 * Thanks,
    J
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793142)
 * Hi Julian,
 * Thanks for testing. Unfortunately, I failed to fix the issue.
 * Then I propose another method. Please put the following code into `functions.
   php` in your theme.
 *     ```
       if ( defined( 'IP_GEO_BLOCK_API_DIR' ) ) {
           add_filter( 'ip-geo-block-api-dir', 'my_api_dir' );
           function my_api_dir( $dir ) {
               return IP_GEO_BLOCK_PATH . IP_GEO_BLOCK_API_DIR;
           }
       }
       ```
   
 * The above code makes 2.2.1 as 2.2.0.1. I think it will solve this issue. Then
   you can install 2.2.1 (not 2.2.1a).
 * Thanks for your reporting!!
 *  Thread Starter [Julian](https://wordpress.org/support/users/julianpasco/)
 * (@julianpasco)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793144)
 * Hi there, still the same..
 * Just setup a temp installation for you on the following link:
 * [http://197.242.78.3/~ipgeo/](http://197.242.78.3/~ipgeo/)
    admin ****
 * If you can send me a email then i can send you ftp login details.
 * Thanks,
    J
 *  Thread Starter [Julian](https://wordpress.org/support/users/julianpasco/)
 * (@julianpasco)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793149)
 * Login details sent, thank you!
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793161)
 * This sure comes up a lot. Going off topic for a minute:
 * [@tokkonopapa](https://wordpress.org/support/users/tokkonopapa/) and [@julianpasco](https://wordpress.org/support/users/julianpasco/)
   I’m am 100% sure you both mean well but please never ask for or offer login or
   FTP credentials on these forums.
 * Now for the why: The internet is a wonderful place full of very nice people and
   a few very bad ones. I’m sure everyone here is very nice however, by giving some
   ones keys to your house you are trusting they wont steal anything. Likewise the
   person who takes the keys is now responsible for the house FOREVER.
 * If something was to go wrong, then the author may well legally become liable 
   for damages, which they would not normally have been as their software is provided
   without warranty.
 * Please do not do this again.
 *  Thread Starter [Julian](https://wordpress.org/support/users/julianpasco/)
 * (@julianpasco)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793164)
 * @ Jan Dembowski. The FTP account was a demo server setup for testing purposes.
   Thanks!
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793166)
 * Dear all,
 * Thank you for giving me a head up!
 * [@julian](https://wordpress.org/support/users/julian/), I’ve fixed this issue.
   Please download [2.2.1b](https://github.com/tokkonopapa/WordPress-IP-Geo-Block/archive/2.2.1b.zip)
   and use “`ip-geo-block`” until I will release the next version.
 * Thanks guys.
 * Note: if non existing (PHP) file is specified to `file_exists()`, then “`open_basedir
   restriction in effect.`” seems to happen. Why? I don’t know!!
 *  Thread Starter [Julian](https://wordpress.org/support/users/julianpasco/)
 * (@julianpasco)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793169)
 * Awesome, issue fixed with version 2.2.1b!! 🙂
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793368)
 * Fixed this issue in 2.2.2.1 that is just same as 2.2.1b.
 *  [mauckc](https://wordpress.org/support/users/mauckc/)
 * (@mauckc)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793375)
 * So if this problem keeps you from logging into admin then how do you deactivate
   the plugin?
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793378)
 * Dear mauckc,
 * Sorry for late reply. I’m afraid you are now in trouble.
 * Please delete `ip-geo-block` directly in your plugin’s directory (using FTP or
   something) to regain your admin authentication process. Then you will be able
   to re-install the latest version of this plugin on your plugin’s dashboard.
 * [This release note](http://www.ipgeoblock.com/changelog/release-2.1.3.html) can
   also help you.
 * I hope your success!

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘PHP Error Since 2.2.1’ is closed to new replies.

 * ![](https://ps.w.org/ip-geo-block/assets/icon-128x128.png?rev=1148568)
 * [IP Geo Block](https://wordpress.org/plugins/ip-geo-block/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ip-geo-block/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ip-geo-block/)
 * [Active Topics](https://wordpress.org/support/plugin/ip-geo-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ip-geo-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ip-geo-block/reviews/)

 * 15 replies
 * 4 participants
 * Last reply from: [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/php-error-since-221/#post-6793378)
 * Status: resolved