Share » Forums » Extensions » Problem creating extension fetch...

Problem creating extension fetch functions

Problem creating extension fetch functions

Sunday 09 March 2008 3:23:57 am - 8 replies

Author Message

Heath

Sunday 09 March 2008 11:07:28 am

Hello,

Are you certain that you have correctly reloaded your extension autoload cache.

While not auditing your code or message in exacting detail. The error message and description you have shared is strikingly familiar to us. I've seen it before when a template operator was not enabled properly for an individual siteaccess of a site.

This is different than standard cache and is often most accurately accomplished from the commandline.

I recently used this command to re-generate extension autoload cache.

Which I have found to be more effective than the admin gui for this feature as the admin tool is restricted per siteaccess and all available autoload information is not process the same as with the following shell command (It's ... complicated)

<b>Commands</b>

<i>bin/php/ezpgenerateautoloads.php -v -e
bin/php/ezcache.php --clear-all</i>

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Arno Lehmann

Sunday 09 March 2008 2:41:45 pm

Hi,

as it is, I'm certain I haven't done anything useful to the autoloader cache. I found no instructions to do so :-)

Unfortunately, running sudo -u root bin/php/ezpgenerateautoloads.php -v -e doesn't help here as it only results in

PHP Warning:  require(Base/src/base.php): failed to open stream: No such file or directory in /var/www/ez/bin/php/ezpgenerateautoloads.php on line 35
PHP Fatal error:  require(): Failed opening required 'Base/src/base.php' (include_path='.:/usr/share/pear') in /var/www/ez/bin/php/ezpgenerateautoloads.php on line 35

the ezPublish installation has exactly no path containing Base, so either this installation is severely broken or the ezpgenerateautoloads.php script needs some help.

Interestingly, when I try to regenerate the autoloader cache from the web fron-end, I get a ez Publish error again, and in the apache's error log, I see

[Sun Mar 09 21:38:04 2008] [error] [client 89.166.some.ip] PHP Fatal error:  Class 'ezcFile' not found in /var/www/ez/lib/ezutils/classes/ezautoloadgenerator.php on line 283, referer: http://ez.xx.com/ezwebin_site_admin/setup/extensions

To me, this looks like part of eZ Components is missing. I wonder how this could happen?

Arno

Heath

Sunday 09 March 2008 2:56:54 pm

Yes. My advice is accurate, thank you for providing aditional confirmation details.

You must first install eZ Components which is required with eZ Publish 4.0

http://ezcomponents.org/docs/install

eZ Components is especially required when you begin trying to enable / activate / autoload extensions beyond the default base installation.

eZ is quite smart in allowing eZ Publish 4.0 to work out of the box, leaving this aspect to the more brave users who customize to ensure they have properly provided for all the softwares requirements.

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Arno Lehmann

Sunday 09 March 2008 3:15:54 pm

Hm... thanks for the help so far.

Now I wonder - does anyone have experiences to share regarding installation of eZ Components besides an existing eZ Publish setup?

From looking into the tarball and comparing with the error message and code from bin/php/ezpgenerateautoloads.php, I should need eZ Components in the ezc directory below the eZ Publish base directory. Does that sound correct?

Arno

Heath

Sunday 09 March 2008 3:59:50 pm

You should consider switching your focus from eZ Publish for a solid moment and instead turning to reading the documentation link provided with detailed installation instructions.

Currently the installation of eZ Components is entirely separate from eZ Publish.

For a user such as yourself I would strongly recommend you use the 'pear' installation method. It is by far the simplest to use to complete the installation.

http://ezcomponents.org/docs/install#pear-installer

Once you install the eZ Components (pear packages) you will need to ensure that these are included within your php installation or apache virtual host's php include_path.

http://ezcomponents.org/docs/install#include-path

Often this is the default within a php installation meaning you only need to install the packages, clear eZ Publish Cache and Autoload Cache.

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Arno Lehmann

Monday 10 March 2008 2:40:28 am

Hello,

thanks for your advice - actually, I know about the possible ways to install eZ Components, but I am a bit reluctant to install a server-wide php thingie as I'm not sure how this might interfere with other applications running on that machine.

So I really only was interested in learning about experience with having eZ Components installed in an eZ Publish environment, and not site-wide.

I guess I'll dig through the system for a while and find if any other php applications might stumble over the pear-installed eZ Components library...

Anyway, what I'm wondering is that, to use locally created extensions, I need eZ Components. While this seems logical, I hadn't found this in the manuals or in the tutorials I read. The jacextension tutorial, for example, does not mention that eZ Components are needed. Well, the fact that documentation is hardly ever complete is nothing new to me ;-)

Arno

Felix Laate

Monday 10 March 2008 6:58:20 am

Hi there,

obviously you'll only need the components for extensions that depend on them as such. Allmost all existing contributed extensions don't.

The reason is off course that the components are PHP5 and eZ Publish only recently became compatible with that.

That being said, the components are a great basis for creating great extensions.

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Arno Lehmann

Monday 10 March 2008 1:23:40 pm

Hi,

ok, this is fixed.

I followed Heath's advice of installing eZ Components to be able to run the ezpgenerateautoloads.php which, after eZ Components was installed, ran ok and updated the autoload/ezp_extension.php file correctly.

Afterwards, my own module was running correctly, without the need to include its worker file(s).

I could have updated that file manually, as it's fairly simple structured.

What I wonder about is - still - why this step is not mentioned in the tutorials I read, but I know from experience that it's no easy task writing complete and yet readable documentation for complex stuff.

So let me state that my own extension does not need eZ Components (yet), but that having eZ Components installed makes maintaining an extended eZ Publish installation simpler.

Thanks for your help!

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

36 542 Users on board!

Forums menu