Configuring eZComponents to add new extensions in 4.0

Author Message

Richard Lundberg

Thursday 27 December 2007 2:26:48 am

Hi,

I am running eZpublish 4.0 and want to add a new extension. I keep getting the following error

<b>Fatal error: Class 'ezcFile' not found in /var/www/vhosts/andypmountainguide.com/httpdocs/lib/ezutils/classes/ezautoloadgenerator.php on line 283
Fatal error: eZ Publish did not finish its request</b>

Looking through the forum it seems I need to install eZComponents.

So I have followed the installation guide, and used PEAR to install. PEAR has installed the components to

/usr/share/php/ezc/

so I have added this to the php.ini

include_path = .:/usr/share/php:/usr/share/php/ezc

I still get the same error message when trying to install a new extension.

I also set up a php test file in my home directory to test if eZComponents are installed correctly. This is the code that is required to be added to php scripts according to the eZComponent install documentation

<?php
set_include_path( "/usr/share/php/ezc/Base" . ini_get( "include_path" )  );
require_once '/usr/share/php/ezc/Base/base.php';


function __autoload( $className )

{
   ezcBase::autoload( $className );
}
?>

When I run this I get the following errors

<b>Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/usr/share/php/ezc/Base/base.php) is not within the allowed path(s): (/var/www/vhosts/andypmountainguide.com/httpdocs:/tmp) in /var/www/vhosts/andypmountainguide.com/httpdocs/comptest.php on line 13

Warning: require_once(/usr/share/php/ezc/Base/base.php) [function.require-once]: failed to open stream: Operation not permitted in /var/www/vhosts/andypmountainguide.com/httpdocs/comptest.php on line 13

Fatal error: require_once() [function.require]: Failed opening required '/usr/share/php/ezc/Base/base.php' (include_path='/usr/share/php/ezc/Base.:/usr/share/php:/usr/share/php/ezc:/usr/share/php/ezc/Base') in /var/www/vhosts/andypmountainguide.com/httpdocs/comptest.php on line 13
</b>

Do I need to set open_basedir to the eZComponent directory?

Any help would be appreciated.

Thanks....

www.peakm3.com

Piotrek Karaƛ

Thursday 27 December 2007 3:34:11 am

I'm not sure if your problem is about certain PHP functionality being just limited or not available at all (blocked). Hope someone more experienced covers that soon.

Meanwhile, I've never so far had any problems when bundling eZC with eZPublish using the simplest way, I've already covered it here:
http://ryba.ez-publish.net/index.php/ez_components/ez_publish_using_ez_components_in_shared_hosting_environment

Hope this helps, at least temporarily before you make your PEAR installation work.

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Kristof Coomans

Thursday 27 December 2007 7:07:30 am

eZ Publish has some issues when open_basedir is enabled (http://issues.ez.no/IssueList.php?Search=open_basedir&SearchIn=1, http://issues.ez.no/11927), so I advice you to turn it off. Good luck!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Richard Lundberg

Wednesday 02 January 2008 1:45:20 am

Thanks for the speedy replies.

Kristoff,

I checked the server php.ini and open_basedir is not enabled. I did a

<?
phpinfo();
?>

check withing the specific domain of the site and the openbase_dir local value is set. (master has no value)
I do not have a local php.ini within this webspace, or a .htaccess do you have any idea where it may be set from?

Piotrek.

Thanks for this, I may well go down this root if I can't get it resolved otherwise. I am using a VPS so would prefer one installation, but time may dictacte your workaround.

www.peakm3.com

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