How to configure ezComponents installed via PEAL

Author Message

Fátima Chapri

Saturday 09 May 2009 9:59:42 am

Hi,

I've installed ezComponents but It's not well installed as I can't configure my extensions on the admin interface.

The ezc were installed via PEAR installer and it is located at the following directory on my computer:
C:\wamp\bin\php\php5.2.9\PEAR\ezc

My ezPublish site is located at C:\wamp\www\mySite.

I've followed the installation guide at http://www.ezcomponents.org/docs/install and also a forum post http://ez.no/br/developer/forum/extensions/installing_new_extensions_not_available.

I'm sorry for my silly question as everything seams to be on a clear understanding language, but I just didn't get it yet.

So,

1. Is the ezc folder located in the correct place?

2. Do I have to create a config.php to adjust the include path to have the eZ Components classes available via PHP? And would this this be the correct code for this file?

<?php
set_include_path( "wamp/bin/php/php5.2.9/PEAR/ezc/" . PATH_SEPARATOR . get_include_path());
?>

3. In which PHP script do i have to add the scripts that are referred in the utoload environment setup section at the installation guide?

Gaetano Giunta

Saturday 09 May 2009 3:02:14 pm

<i>Is the ezc folder located in the correct place?</i>

The ezc folder can be anywhere you want, as long as php knows where to find it when it needs to load some ezc classes.

<i>Do I have to create a config.php to adjust the include path to have the eZ Components classes available via PHP?</i>

You have basically 3 options to tell ezp where the ezc class files are:

a - in php.ini alter the include_path setting so that c:/wamp/bin/php/php5.2.9/PEAR/ is part of it. As per the ezc instructions, you need to have the top-level pear directory in the include path by default, not the ezc subdir

b - as you have done, create a config.php in the top level dir of ezp, and alter the php include path in there. Note that you miss the c: part in your path, and possibly have to remove /ezc at the end

c - in the same config.php file, set instead the constant EZC_BASE_PATH to the location where the ezc file 'base.php' is found

Method c + reducing the include_path to '.' will give you a slight increase in performance, as php will look in less directories when searching for include files.

<i>In which PHP script do i have to add the scripts that are referred in the autoload environment setup section at the installation guide?</i>
No need for that, as ezp takes care of setting up properly autoload chains, as soon as it can find out where the ezc are

Principal Consultant International Business
Member of the Community Project Board

Fátima Chapri

Sunday 10 May 2009 2:04:08 pm

Hi Gaetano,

Thank you for your answer.

I applied method b, ie, i created a config.php and set the include path with the following code:

<?php
set_include_path( "c:wamp/bin/php/php5.2.9/PEAR" . PATH_SEPARATOR . get_include_path());
?>

Everything work fine now.

I would like to use apply method c, but I don't know how to set the constant EZC_BASE_PATH and reduce the include_path to '.'
Can you please give me an example of the script code I would have to write.

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 15:14:23
Script start
Timing: Jan 18 2025 15:14:23
Module start 'layout'
Timing: Jan 18 2025 15:14:23
Module start 'content'
Timing: Jan 18 2025 15:14:24
Module end 'content'
Timing: Jan 18 2025 15:14:24
Script end

Main resources:

Total runtime0.7801 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.1641152.6563
Module start 'layout' 0.00610.0034 740.820339.5078
Module start 'content' 0.00950.7692 780.3281545.3672
Module end 'content' 0.77860.0015 1,325.695312.1094
Script end 0.7801  1,337.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4326160.0002
Check MTime0.00140.1799160.0001
Mysql Total
Database connection0.00070.089010.0007
Mysqli_queries0.724892.9015570.0127
Looping result0.00070.0897550.0000
Template Total0.744195.420.3720
Template load0.00240.303220.0012
Template processing0.741795.070120.3708
Template load and register function0.00020.027510.0002
states
state_id_array0.00290.372010.0029
state_identifier_array0.00180.224720.0009
Override
Cache load0.00190.2493350.0001
Sytem overhead
Fetch class attribute can translate value0.00050.059220.0002
Fetch class attribute name0.00100.122340.0002
XML
Image XML parsing0.00060.081920.0003
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00080.1073160.0001
String conversion0.00000.001240.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs