WordPress.org

Forums

Limit Login Countries
[resolved] Fatal Error (5 posts)

  1. rwilki
    Member
    Posted 1 year ago #

    I had this working on previous server, but not I can't activate.

    Warning: require_once(__DIR__/includes/LLC_Options_Page.class.php) [function.require-once]: failed to open stream: No such file or directory in /home/country/public_html/wp-content/plugins/limit-login-countries/limit-login-countries.php on line 50

    Anything I can do?

    http://wordpress.org/plugins/limit-login-countries/

  2. Dirk Weise
    Member
    Plugin Author

    Posted 1 year ago #

    The reason for this failure is the pretty old PHP version on your server. The magic constant __DIR__ was introduced in PHP 5.3.0 so that seems to be the minimum PHP version requirement for this plugin atm.
    Try changing line 50 of /home/country/public_html/wp-content/plugins/limit-login-countries/limit-login-countries.php: replace __DIR__ with dirname(__FILE__). Please report what PHP version you are using and whether the plugin is working after that change. Thank you!

    Dirk

  3. Dirk Weise
    Member
    Plugin Author

    Posted 1 year ago #

    I did some research. PHP 5.2 reached its end of life (aka no more security patches) on 6 Jan 2011 [1] but WordPress still supports PHP 5.2.4 [2]. It seems I should support version 5.2.4, but I see no real need for it. You use this plugin if you care about security and probably it's not too difficult to break into a server running PHP 5.2 or even less.

    [1] http://php.net/eol.php
    [2] http://wordpress.org/about/requirements/

  4. rwilki
    Member
    Posted 1 year ago #

    Thanks for your help. Unfortunately, it gave me a synatax type error.

    unexpected T_FUNCTION on page 194 of Options_Page.class.php
    My version of php is 5.2x so I guess I'll need to have that updated. I just hope it doesn't cause problems with my site.

    Thanks again,
    Bob

  5. Dirk Weise
    Member
    Plugin Author

    Posted 1 year ago #

    ok, that's another newer feature I'm using: Closures. They became available in PHP 5.3, too.

    I really suggest to update. If you absolutely can't, post it here and I'll try to find some time to make my plugin compatible.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic