Forums / Developer / Way to determine if ini setting exists?

Way to determine if ini setting exists?

Author Message

zurgutt -

Monday 08 May 2006 10:52:03 am

Using ezini() to read unexisting ini value will work but trigers error in logs. Doesnt seem to be any way to check for existence of value cleanly?

Certified eZ developer looking for projects.
zurgutt at gg.ee

Paul Borgermans

Monday 08 May 2006 1:04:16 pm

Hi Zurgutt

I think the error message (in the logs) is good anyway. If it is about "custom" ini settings, I would prefer explicit declarations instead of assuming a condition (like false) if it is not there.

Or can you be more specific?

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

zurgutt -

Monday 08 May 2006 1:34:04 pm

I control some extra privileges on per-usergroup, per-objectclass basis, like:

[PermitEdit]
PermitEdit_13_66=true

to show some controls on class 66 to group 13. Not feasible to have a line for every permutation, list would be very long and change often.

Actually i can see now that this is stupid and inefficient way to store and get this data, I was very beginner when coded that part ;)

But anyhow just to confirm: there is no function to check if ini setting is set by design, it is assumed to be there? And correct way to solve similar situation would be to use array to store list of defined setting names separately?

Certified eZ developer looking for projects.
zurgutt at gg.ee

Paul Borgermans

Monday 08 May 2006 1:39:25 pm

Yes/No,

There is no operator/function to check existence of ini variables.

Anyway, I would go with arrays instead of "weird" property names.

See you in Skien?

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

zurgutt -

Tuesday 09 May 2006 2:30:17 am

Aye, I'll be there.

Will be driving my battlestation through sweden from stockholm.

Certified eZ developer looking for projects.
zurgutt at gg.ee

eZ debug

Timing: Jan 18 2025 19:12:49
Script start
Timing: Jan 18 2025 19:12:49
Module start 'content'
Timing: Jan 18 2025 19:12:50
Module end 'content'
Timing: Jan 18 2025 19:12:50
Script end

Main resources:

Total runtime1.4081 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 587.8125180.8281
Module start 'content' 0.00671.2290 768.6406570.4609
Module end 'content' 1.23570.1723 1,339.1016337.3984
Script end 1.4080  1,676.5000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00490.3448210.0002
Check MTime0.00170.1188210.0001
Mysql Total
Database connection0.00090.065710.0009
Mysqli_queries1.326894.22892000.0066
Looping result0.00210.15171980.0000
Template Total1.373897.620.6869
Template load0.00230.166720.0012
Template processing1.371497.396720.6857
Template load and register function0.00010.007510.0001
states
state_id_array0.00090.063810.0009
state_identifier_array0.00150.104020.0007
Override
Cache load0.00200.1422300.0001
Sytem overhead
Fetch class attribute can translate value0.00150.104330.0005
Fetch class attribute name0.00160.112570.0002
XML
Image XML parsing0.00160.112030.0005
class_abstraction
Instantiating content class attribute0.00000.0011100.0000
General
dbfile0.00460.3273350.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs