autoload issue

Author Message

Robert Reeve

Wednesday 05 January 2011 12:50:31 pm

Hi everyone

I have set up a new instance of eZ Publish 4.3.0 on a vhost. Settings up siteaccess etc. worked fine. Now i wanted to work with a custom PHP class but i ran into a fatal error:

Fatal error: Class 'eZSplash' not found in /data/site-abc/extension/splash/modules/mymodule/myview.php on line 10
Fatal error: eZ Publish did not finish its request

The execution of eZ Publish was abruptly ended, debug information can be found in the log files normally placed in var/log/*

So i checked my error.log but there is nothing in there.

Then i tried to generate my autoload array by typing

php bin/php/ezpgenerateautoload.php with the following result:

Scanning for PHP-files.

Scan complete. Found 299 PHP files.

Searching for classes (tokenizing).

after this i tried to call my module again, with the same fatal error.

Then i tried to regenerate my autoload array via backoffice (setup/extensions -> Regenerate autoload arrays for extensions) which resulted in:

Fatal error: eZ Publish did not finish its request

The execution of eZ Publish was abruptly ended, debug information can be found in the log files normally placed in var/log/*

and again, there is nothing in my logs.

The error seems to happend here in kernel/setup/extensions.php:

$autoload = new eZAutoloadArrays();

After trying and googling for a few hours I gave up and decided to ask you guys for help! ;)

Any ideas?

Thanks,

Robert

Andrew Duck

Wednesday 05 January 2011 3:11:27 pm

When you regenerate the autoloads via the command line your class eZSplash should have been added to var/autoload/ezp_extension.php

Check that file to make sure that it is actually present in there.

In regard to the fatal error when trying to regenerate from the web interface, check your apache error logs rather than the ez publish logs and you should find what php error caused that fatal error. Let us know what it is.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Robert Reeve

Thursday 06 January 2011 12:21:36 am

Good morning Andrew

Thanks for your reply!
My class has not been added to var/autoload/ezp_extension.php and i just checked my apache error logs. There's nothing interesting in there..

Steven E. Bailey

Thursday 06 January 2011 1:02:34 am

Try php bin/php/ezpgenerateautoload.php -e to generate the autoloads for the extensions. Then check to see that your class has been added to var/autoload/ezp_extension.php - if not check the file permissions of the php file with that class definition and make sure it is readable by the user running the ezgenerateautoload.php script. Also make sure that var/autoload/ezp_extension.php is writeable by that user.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Robert Reeve

Thursday 06 January 2011 1:38:08 am

Hi Steve

Permissions are fine.. I've downloaded some other extensions with classes, they don't appear in var/autoload/ezp_extension.php either.

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