How to configure ezComponents installed via PEAL

How to configure ezComponents installed via PEAL

Saturday 09 May 2009 9:59:42 am - 2 replies

Author Message

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.

You must be logged in to post messages in this topic!

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