Include php code in site.ini.append.php

Author Message

Angelika Freihoff

Friday 11 March 2011 3:54:58 am

Hello,

is it possible to integrate php code in a configuration file like site.ini.append.php with include_once( "../../globaluser/user1/site-ini-common-part.php" );

I am using a eZ publish Installation with many different user site accesses. In site.ini I have many common code and only a view differenzen for each site access. For instance google site verification.

For this installation it is not possible to put the common user stuff in override because I will get problems with the admin interface.

So I tried the php include statement, but it looks like it is compleatly ignored. Some ideas?

Thank you very much

Angelika

André R.

Friday 11 March 2011 4:51:24 am

you can not use includes, file_get_contents is used to read file as is to not allow any code to run by design.
You can however use ActiveAccessExtensions to specify a settings extension for these siteaccesses, but be aware that this was buggy prior to 4.4.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 01:11:35
Script start
Timing: Jan 18 2025 01:11:35
Module start 'layout'
Timing: Jan 18 2025 01:11:35
Module start 'content'
Timing: Jan 18 2025 01:11:35
Module end 'content'
Timing: Jan 18 2025 01:11:35
Script end

Main resources:

Total runtime0.8383 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.0313152.6406
Module start 'layout' 0.00550.0034 740.671939.4844
Module start 'content' 0.00890.8278 780.1563523.6484
Module end 'content' 0.83670.0015 1,303.80478.1406
Script end 0.8382  1,311.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3877160.0002
Check MTime0.00130.1541160.0001
Mysql Total
Database connection0.00070.086710.0007
Mysqli_queries0.792294.5021540.0147
Looping result0.00060.0727520.0000
Template Total0.803895.920.4019
Template load0.00210.247420.0010
Template processing0.801795.637920.4009
Template load and register function0.00020.020310.0002
states
state_id_array0.00140.171210.0014
state_identifier_array0.00100.120720.0005
Override
Cache load0.00160.1934140.0001
Sytem overhead
Fetch class attribute can translate value0.00110.126220.0005
Fetch class attribute name0.00280.333430.0009
XML
Image XML parsing0.00150.182120.0008
class_abstraction
Instantiating content class attribute0.00000.001430.0000
General
dbfile0.00170.2076170.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs