Forums / Install & configuration / How to configure ezComponents installed via PEAL

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.