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.

eZ debug

Timing: Jan 18 2025 02:10:14
Script start
Timing: Jan 18 2025 02:10:14
Module start 'layout'
Timing: Jan 18 2025 02:10:14
Module start 'content'
Timing: Jan 18 2025 02:10:15
Module end 'content'
Timing: Jan 18 2025 02:10:15
Script end

Main resources:

Total runtime0.7484 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 587.7891152.6094
Module start 'layout' 0.00510.0024 740.398439.4141
Module start 'content' 0.00750.7395 779.8125609.0078
Module end 'content' 0.74700.0014 1,388.820316.2031
Script end 0.7484  1,405.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4132160.0002
Check MTime0.00140.1814160.0001
Mysql Total
Database connection0.00070.094510.0007
Mysqli_queries0.687191.8061650.0106
Looping result0.00060.0748630.0000
Template Total0.724796.820.3624
Template load0.00170.232420.0009
Template processing0.723096.598120.3615
Template load and register function0.00010.018410.0001
states
state_id_array0.00100.136210.0010
state_identifier_array0.00080.104420.0004
Override
Cache load0.00150.1991450.0000
Sytem overhead
Fetch class attribute can translate value0.00060.075530.0002
Fetch class attribute name0.00110.142770.0002
XML
Image XML parsing0.00140.181730.0005
class_abstraction
Instantiating content class attribute0.00000.004770.0000
General
dbfile0.00100.1287250.0000
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs