Forums / Developer / autoload issue

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.

eZ debug

Timing: Jan 18 2025 00:04:49
Script start
Timing: Jan 18 2025 00:04:49
Module start 'content'
Timing: Jan 18 2025 00:04:50
Module end 'content'
Timing: Jan 18 2025 00:04:50
Script end

Main resources:

Total runtime0.9726 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0084 587.5859180.8594
Module start 'content' 0.00840.8017 768.4453614.0703
Module end 'content' 0.81010.1624 1,382.5156337.3984
Script end 0.9725  1,719.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00500.5168210.0002
Check MTime0.00210.2141210.0001
Mysql Total
Database connection0.00140.148710.0014
Mysqli_queries0.870189.45872020.0043
Looping result0.00280.28682000.0000
Template Total0.942896.920.4714
Template load0.00230.241120.0012
Template processing0.940496.688220.4702
Template load and register function0.00030.029010.0003
states
state_id_array0.00100.098610.0010
state_identifier_array0.00150.156020.0008
Override
Cache load0.00190.1929450.0000
Sytem overhead
Fetch class attribute can translate value0.00190.191840.0005
Fetch class attribute name0.00380.386770.0005
XML
Image XML parsing0.00270.277940.0007
class_abstraction
Instantiating content class attribute0.00000.002070.0000
General
dbfile0.00670.6880360.0002
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs