Page 9 of 10 FirstFirst ... 78910 LastLast
Results 81 to 90 of 97
  1. #81
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    308
    Plugin Contributions
    6

    Default Re: Access Blocker Support Thread

    I have now resolved this issue with AB not working in production. It was a database problem.

    My notes from the time show that I extracted all Messages keywords, sorted them. then pasted them back into the admin interface. I had done the same with blocked IP addresses and Blocked Email addresses. Some time after this AB stopped working.

    I cleared all of the fields through the interface but it still didn't work.
    A copy of the non-working production database did not work in test.

    After turning off AB in the Admin interface and turning off logging I deleted the relevant database fields for AB (NOT RECOMMENDED WITHOUT BACKUPS).
    On restarting the Admin console, AB was installed afresh. Appropriate keywords etc were added via the interface and AB was turned on.

    It is now working and the log file can be read by "blocked_accesses.php"
    NOTE: This work was performed and tested in a test environment before applying it to a production database that was taken offline.
    OldNGrey
    ZC158a PHP 8.2.15
    MySQL 10.6.16-MariaDB

  2. #82
    Join Date
    Dec 2007
    Location
    South, UK
    Posts
    66
    Plugin Contributions
    0

    Default Re: Access Blocker Support Thread

    Hello, I've installed this plugin but I'm getting a blank/broken index page, log states -

    PHP Parse error: syntax error, unexpected '?' in ***** /includes/classes/observers/auto.access_blocker.php on line 40

    I make line 40 -

    if ($this->isIpWhitelisted($_SERVER['REMOTE_ADDR'] ?? '.') === true) {

    I guess that is not really an error and perhaps I need to ask for something to be updated on my server? PHP?

    Could you list the requirements? Apologies if I've missed this elsewhere. The plugin looks very useful, I hope I can get it working!

    Cheers

  3. #83
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,356
    Plugin Contributions
    94

    Default Re: Access Blocker Support Thread

    Yes, that null-coalesce operator (??) requires PHP 7.4 or later. You can make an edit to your copy by changing that line 40 to the following if you're running an earlier version of PHP:
    Code:
    //if ($this->isIpWhitelisted($_SERVER['REMOTE_ADDR'] ?? '.') === true) {
    if ($this->isIpWhitelisted((isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] ? '.')) === true) {

  4. #84
    Join Date
    Dec 2007
    Location
    South, UK
    Posts
    66
    Plugin Contributions
    0

    Default Re: Access Blocker Support Thread

    Thanks :) ....that then gives me this error in the log:

    PHP Parse error: syntax error, unexpected ')' in *** /includes/classes/observers/auto.access_blocker.php on line 41

    Maybe it's best if I look into upgrading PHP on the server?

    I'm not sure if that's possible or if it might break other areas of the site?! But I can ask my host....

    Cheers

  5. #85
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,356
    Plugin Contributions
    94

    Default Re: Access Blocker Support Thread

    My bad. I know better than to post code before my first cup of coffee. That last ? should be a :

    //if ($this->isIpWhitelisted($_SERVER['REMOTE_ADDR'] ?? '.') === true) {
    if ($this->isIpWhitelisted((isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '.')) === true) {

  6. #86
    Join Date
    Dec 2007
    Location
    South, UK
    Posts
    66
    Plugin Contributions
    0

    Default Re: Access Blocker Support Thread

    Thank you! ...now error is unexpected '?' on line 249 which is:

    $organization = $_SESSION['ipData']->company->name ?? '';

    and there is another double ?? on the line below. Sorry I can't work out what to replace that with! (I'm out of practise and not very knowledgable with PHP).

  7. #87
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,356
    Plugin Contributions
    94

    Default Re: Access Blocker Support Thread

    Quote Originally Posted by teaj View Post
    Thank you! ...now error is unexpected '?' on line 249 which is:

    $organization = $_SESSION['ipData']->company->name ?? '';

    and there is another double ?? on the line below. Sorry I can't work out what to replace that with! (I'm out of practise and not very knowledgable with PHP).
    Code:
    $organization = (isset($_SESSION['ipData']->company->name)) ? $_SESSION['ipData']->company->name : '';
    That's why that null-coalesce is so great; makes the code much more readable!

  8. #88
    Join Date
    Dec 2007
    Location
    South, UK
    Posts
    66
    Plugin Contributions
    0

    Default Re: Access Blocker Support Thread

    Great, it all seems to be working now. I look forward to stopping the spammers! Thanks for your help.

  9. #89
    Join Date
    Sep 2004
    Location
    Iowa
    Posts
    89
    Plugin Contributions
    0

    Default Re: Access Blocker Support Thread

    Running ZC 2.1.0

    Installed Access Blocker. Struggled to get email verification to work. Ended up using a different email address which then worked. (strange) Anyway, now I'm going over the settings in ZenCart Admin and noticed. (see attached) Basically it wants a user id number from the URL at AbuseIPDB which no longer displays a user ID in the URL. So this seems to be outdated and needs correction or deletion. Or the instructions updated to be useful in finding this information for the field.
    Attached Images Attached Images  

  10. #90
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,356
    Plugin Contributions
    94

    Default Re: Access Blocker Support Thread

    Quote Originally Posted by lynbor View Post
    Running ZC 2.1.0

    Installed Access Blocker. Struggled to get email verification to work. Ended up using a different email address which then worked. (strange) Anyway, now I'm going over the settings in ZenCart Admin and noticed. (see attached) Basically it wants a user id number from the URL at AbuseIPDB which no longer displays a user ID in the URL. So this seems to be outdated and needs correction or deletion. Or the instructions updated to be useful in finding this information for the field.
    There's no such setting for Access Blocker; perhaps you were looking for the AbuseIPDB plugin (https://www.zen-cart.com/downloads.p...file&id=2371)?

 

 
Page 9 of 10 FirstFirst ... 78910 LastLast

Similar Threads

  1. EasyPopulate 4.0 Support Thread
    By chadderuski in forum Addon Admin Tools
    Replies: 3662
    Last Post: 30 Apr 2025, 04:14 AM
  2. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 20
    Last Post: 23 Apr 2025, 08:49 AM
  3. v151 Category Specific Access Restriction (CSAR) - [Support Thread]
    By frank18 in forum All Other Contributions/Addons
    Replies: 187
    Last Post: 12 Sep 2021, 09:41 PM
  4. BackUp ZC [Support Thread]
    By skipwater in forum All Other Contributions/Addons
    Replies: 285
    Last Post: 23 Dec 2020, 10:40 AM
  5. PurpleShades Support Thread
    By kobra in forum Addon Templates
    Replies: 122
    Last Post: 18 May 2011, 07:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR