Blacklist implementation question

Author Message

Betsy Gamrat

Sunday 24 April 2011 3:36:04 pm

I have a small snippet of code that I use to deny access to a site based on the IP address.

I'd like to integrate it into the eZ architecture properly, rather than just including it as the first line of index.php, and I'd like to use a .ini file to allow the access control to be tuned a bit.

Suggestions? Ideas?

Thank you in advance.

Heath

Sunday 24 April 2011 11:26:57 pm

Hello Betsy,

Could you place your code in the file config.php (v4.x+)?

Update: This has the added benefit of being used across all index php files and cli scripts.

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Betsy Gamrat

Monday 25 April 2011 2:47:20 am

Thanks!

I will to try use the autoload mechanism, which should allow me to create a simple extension.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:15:26
Script start
Timing: Jan 18 2025 02:15:26
Module start 'layout'
Timing: Jan 18 2025 02:15:26
Module start 'content'
Timing: Jan 18 2025 02:15:26
Module end 'content'
Timing: Jan 18 2025 02:15:26
Script end

Main resources:

Total runtime0.0191 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 589.8125152.6250
Module start 'layout' 0.00740.0027 742.437539.4531
Module start 'content' 0.01020.0055 781.890689.2266
Module end 'content' 0.01570.0034 871.117234.2891
Script end 0.0190  905.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002915.0334140.0002
Check MTime0.00126.3512140.0001
Mysql Total
Database connection0.00084.371810.0008
Mysqli_queries0.003920.393630.0013
Looping result0.00000.095110.0000
Template Total0.002513.210.0025
Template load0.00115.641810.0011
Template processing0.00147.519810.0014
Override
Cache load0.00084.119010.0008
General
dbfile0.00031.421480.0000
String conversion0.00000.037540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs