Zen Cart Logo
Forums / Addon Admin Tools / IP Blocker for v1.5.x

IP Blocker for v1.5.x

Views: 34,649

Results 41 to 60 of 125
3 Mar 2014, 9:01 PM
#41
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

IP Blocker for v1.5.x

OK, change /MY_ADMIN/ip_blocker.php (around line 70) to read:

} else {
  $ip_list = $db->Execute('SELECT * FROM ' . TABLE_IP_BLOCKER . ' WHERE ib_id=1');
  $enabled = (int)$ip_list->fields['ib_power'];
  $lockout_count = $ip_list->fields['ib_lockout_count'];
  $pwd = $ip_list->fields['ib_password'];
  $blocklist = ip_blocker_array_to_list (unserialize ($ip_list->fields['ib_blocklist']));
  $blocklist = (is_array ($blocklist)) ? implode ("\r\n", $blocklist) : '';
  $passlist = ip_blocker_array_to_list (unserialize ($ip_list->fields['ib_passlist']));
  $passlist = (is_array ($passlist) ? implode ("\r\n", $passlist) : '';
  
}

That should correct the issue. I'll get a v2.1.1 staged on github.

3 Mar 2014, 9:01 PM
#42
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: IP Blocker for v1.5.x

lat9:

Arggh. :censored: That because the previous version didn't encode an empty string properly (I'm guessing that your previous "Allowed IP Address" list was blank). Patch forthcoming ...

In a word...yep :smile:

3 Mar 2014, 9:18 PM
#43
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: IP Blocker for v1.5.x

lat9:

OK, change /MY_ADMIN/ip_blocker.php (around line 70) to read:

} else {
$ip_list = $db->Execute('SELECT * FROM ' . TABLE_IP_BLOCKER . ' WHERE ib_id=1');
$enabled = (int)$ip_list->fields['ib_power'];
$lockout_count = $ip_list->fields['ib_lockout_count'];
$pwd = $ip_list->fields['ib_password'];
$blocklist = ip_blocker_array_to_list (unserialize ($ip_list->fields['ib_blocklist']));
$blocklist = (is_array ($blocklist)) ? implode ("\r\n", $blocklist) : '';
$passlist = ip_blocker_array_to_list (unserialize ($ip_list->fields['ib_passlist']));
$passlist = (is_array ($passlist) ? implode ("\r\n", $passlist) : '';

}

> That should correct the issue.  I'll get a v2.1.1 staged on github.

Unexpected ';' on line 72
3 Mar 2014, 9:22 PM
#44
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: IP Blocker for v1.5.x

It's just not my day:

} else {
  $ip_list = $db->Execute('SELECT * FROM ' . TABLE_IP_BLOCKER . ' WHERE ib_id=1');
  $enabled = (int)$ip_list->fields['ib_power'];
  $lockout_count = $ip_list->fields['ib_lockout_count'];
  $pwd = $ip_list->fields['ib_password'];
  $blocklist = ip_blocker_array_to_list (unserialize ($ip_list->fields['ib_blocklist']));
  $blocklist = (is_array ($blocklist)) ? implode ("\r\n", $blocklist) : '';
  $passlist = ip_blocker_array_to_list (unserialize ($ip_list->fields['ib_passlist']));
  $passlist = (is_array ($passlist)) ? implode ("\r\n", $passlist) : '';
  
}
4 Mar 2014, 12:05 AM
#45
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: IP Blocker for v1.5.x

lat9:

It's just not my day:

} else {
$ip_list = $db->Execute('SELECT * FROM ' . TABLE_IP_BLOCKER . ' WHERE ib_id=1');
$enabled = (int)$ip_list->fields['ib_power'];
$lockout_count = $ip_list->fields['ib_lockout_count'];
$pwd = $ip_list->fields['ib_password'];
$blocklist = ip_blocker_array_to_list (unserialize ($ip_list->fields['ib_blocklist']));
$blocklist = (is_array ($blocklist)) ? implode ("\r\n", $blocklist) : '';
$passlist = ip_blocker_array_to_list (unserialize ($ip_list->fields['ib_passlist']));
$passlist = (is_array ($passlist)) ? implode ("\r\n", $passlist) : '';

}


That did it :hug:
4 Mar 2014, 1:06 PM
#46
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: IP Blocker for v1.5.x

Great, thanks for the update.

29 Mar 2014, 2:01 PM
#47
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: IP Blocker for v1.5.x

I've installed the latest IP Blocker, 2.1.0. I'm having trouble with using the wildcards to block ranges. I can use 192.168.1.* OK but I get an invalid IP message when I use 192.168.* . There are several IP blocks that are logging hits but nothing else ie. 209.19.xxx.xxx. I could really use the wildcards...

Thanks!

29 Mar 2014, 4:57 PM
#48
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: IP Blocker for v1.5.x

chain_man:

I've installed the latest IP Blocker, 2.1.0. I'm having trouble with using the wildcards to block ranges. I can use 192.168.1.* OK but I get an invalid IP message when I use 192.168.* . There are several IP blocks that are logging hits but nothing else ie. 209.19.xxx.xxx. I could really use the wildcards...

Thanks!
IP Blocker currently supports wildcards only in the lowest octet.

29 Mar 2014, 9:47 PM
#49
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: IP Blocker for v1.5.x

Thanks. The readme should probably be changed then.

30 Mar 2014, 11:58 AM
#50
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: IP Blocker for v1.5.x

chain_man:

Thanks. The readme should probably be changed then.
Eek!:oops: Right you are.

10 Apr 2014, 9:35 PM
#51
tallytaylorche avatar

tallytaylorche

New Zenner

Join Date:
Apr 2014
Posts:
9
Plugin Contributions:
0

Re: IP Blocker for v1.5.x

Please help!

my zencart ver:1.5.0

After installation, my homepage turns into a white page and nothing shows up. Everything comes to normal after I uninstall it.

Tired to install older version of ip blocker, like v2.0, and still got the same result.

Anyone knows why? or any directions that I can follow to resolve the problem?

Thank you so much for any ideas and helps!

10 Apr 2014, 9:39 PM
#52
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: IP Blocker for v1.5.x

tallytaylorche:

Please help!

my zencart ver:1.5.0

After installation, my homepage turns into a white page and nothing shows up. Everything comes to normal after I uninstall it.

Anyone knows why? or any directions that I can follow to resolve the problem?

Thank you so much for and ideas and helps!

Have a look in your cache folder and post the most recent error file please.

10 Apr 2014, 10:01 PM
#53
tallytaylorche avatar

tallytaylorche

New Zenner

Join Date:
Apr 2014
Posts:
9
Plugin Contributions:
0

Re: IP Blocker for v1.5.x

Thank you picandnix!

here is the content from most recent error file:
[17-Mar-2013 19:07:19] PHP Warning: include_once(includes/languages/espanol.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /home/kingmony/public_html/includes/init_includes/init_templates.php on line 72
[17-Mar-2013 19:07:19] PHP Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening 'includes/languages/espanol.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kingmony/public_html/includes/init_includes/init_templates.php on line 72

I am surprised it was over one year ago :shocking:

Thank you again picandnix

11 Apr 2014, 6:18 AM
#54
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: IP Blocker for v1.5.x

I am surprised it was over one year ago

Yes me too, are you sure there are no more recent log files? Is your store an upgrade from a previous version of ZC or was it a clean install of 1.5.1?

11 Apr 2014, 1:16 PM
#55
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: IP Blocker for v1.5.x

I just installed the most recent version (v2.1.0) of IP Blocker on an unmodified Zen Cart v1.5.0 installation, with no issues on the store-side.

What ***other ***plugins do you have installed?

11 Apr 2014, 1:45 PM
#56
tallytaylorche avatar

tallytaylorche

New Zenner

Join Date:
Apr 2014
Posts:
9
Plugin Contributions:
0

Re: IP Blocker for v1.5.x

picandnix:

Yes me too, are you sure there are no more recent log files? Is your store an upgrade from a previous version of ZC or was it a clean install of 1.5.1?

First, Thank you picandnix and lat9!

Yes, I am sure that is the most recent log file. I upgraded my current ZC (ver 1.5.0) from ver. 1.3.9, it was not a clean installation.

I have "my live chat" installed, it is basically a tracing and online customers Q&A software, and I also have Mo Zen(from theme forest)as my site's appearance.

I got add this code installed as well.

11 Apr 2014, 5:23 PM
#57
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: IP Blocker for v1.5.x

In the root of your hosting account do you have a folder named log(s) and one named cache?

11 Apr 2014, 5:51 PM
#58
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: IP Blocker for v1.5.x

picandnix:

In the root of your hosting account do you have a folder named log(s) and one named cache?
Also, in the root of your Zen Cart installation is there a file named special_login.php? Have you configured the IP Blocker, or did you just copy the installation files?

11 Apr 2014, 7:25 PM
#59
tallytaylorche avatar

tallytaylorche

New Zenner

Join Date:
Apr 2014
Posts:
9
Plugin Contributions:
0

Re: IP Blocker for v1.5.x

lat9:

Also, in the root of your Zen Cart installation is there a file named special_login.php? Have you configured the IP Blocker, or did you just copy the installation files?

picandnix:

I can only find the catch folder in public html, and there is no folder named logs.

lat9:

I put special_login.php file in public html, is this correct? I didn't do anything to the file, I just simply copy files and put them in the correspond locations of my hosting account.

Thank you both.

11 Apr 2014, 8:05 PM
#60
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: IP Blocker for v1.5.x

Right, you simply copy the files into their respective folders/directories. What version of PHP is your store running on? You can find out by going to your admin's Tools->Store Manager.