This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Developer » Fatal error: Class 'eZFile' not found
expandshrink

Fatal error: Class 'eZFile' not found

Fatal error: Class 'eZFile' not found

Friday 06 June 2008 3:07:30 pm - 14 replies

Hi,

Since I moved to version 4, I regularly have this type of error (see below some exemple of full error message I get) , but have no way to reproduce it...

It can happen when I try to edit an object, or when I try to submit my changes (after editing) or even when I try to discard the changes. I can reopen the same object later and everything is fine...
Generally if I retry to redo the same action (reedit the same object) - I got the same error. If I edit another object and come back to the object I had problem with, then everything is fine and I can edit without problem... suspicious.gif Emoticon

The error always refers to a php file from one of my extensions...

I tried to regenerate the autoload arrays ... but the problem is still there...

I saw that this type of problem was reported during the alpha test and was closed, but the problem apparently still exists...

Do you have any idea of how to tackle this problem?

Thank you,
Hakim

-----------------------------------------
Fatal error: Class 'eZFile' not found in /var/www/epnoe-v4/ezp/extension/xeditor/ezxmltext/handlers/input/xeditorxmlinput.php 
on line 121
Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.
Fatal error: Class declarations may not be nested in /var/www/epnoe-v4/ezp/kernel/common/ezkerneloperator.php on line 40

Line 121 is: "$parser =& new SafeHTML();"
------------------------------------------
Fatal error: Class 'eZFile' not found in /var/www/epnoe-v4/ezp/extension/xeditor/ezxmltext/handlers/input/xeditorxmlinput.php 
on line 121
Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.
Fatal error: Class declarations may not be nested in /var/www/epnoe-v4/ezp/lib/eztemplate/classes/eztemplate.php on line 233
------------------------------------------
Fatal error: Class 'eZFile' not found in /var/www/epnoe-v4/ezp/extension/xeditor/ezxmltext/handlers/input/xeditorxmlinput.php 
on line 121
Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.
Fatal error: Class declarations may not be nested in /var/www/epnoe-v4/ezp/kernel/classes/ezpreferences.php on line 48
------------------------------------------
Fatal error: Class 'eZFile' not found in 
/var/www/epnoe-v4/ezp/extension/easyadmin/eventtypes/event/setsection/setsectiontype.php on line 39
Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.

Line 39 is: is the closing bracket "}" (!!!) for the declaration of the class "class setSectionType extends eZWorkflowEventType"
------------------------------------------
Fatal error: Class 'eZFile' not found in 
/var/www/epnoe-v4/ezp/extension/enhancedselection/datatypes/ezenhancedselection/ezenhancedselectiontype.php on line 718
Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.

Line 718 is: is the closing bracket "}" (!!!) for the declaration of the class "class eZEnhancedSelectionType extends eZDataType"
---------------------------------------------

My Config is:

<b>EZ</b>
Version: 4.0.0 (4.0.0)
SVN revision: 19785
Extensions: xeditor , cookieuser , enhancedobjectrelation , enhancedselection , ezxajax , getobjects , illightbox2 , ObjectCreator , owner , studentInInstitute , xajax_epnoe , xmlwash

<b>PHP</b>
Version: 5.2.0-8+etch11
Extensions: zip, xmlwriter, libxml, dom, xmlreader, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, apache2handler, imagick, curl, gd, ldap, mhash, mysql, mysqli, PDO, pdo_mysql
Miscellaneous: Safe mode is off.
Basedir restriction is off.
Global variable registration is off.
File uploading is enabled.
Maximum size of post data (text and files) is 8M.
Script memory limit is 128M.
Maximum execution time is 60 seconds.

<b>PHP Accelerator</b>
A known and active PHP Accelerator could not be found.

<b>Web server (software)</b>
Name: Apache
Version: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11
Modules: core, mod_log_config, mod_logio, prefork, http_core, mod_so, mod_actions, mod_alias, mod_auth_basic, mod_authn_file, mod_authnz_ldap, mod_authz_default, mod_authz_groupfile, mod_authz_host, mod_authz_user, mod_autoindex, mod_cgi, mod_dir, mod_env, util_ldap, mod_mime, mod_negotiation, mod_php5, mod_proxy, mod_proxy_http, mod_rewrite, mod_setenvif, mod_status

<b>Database</b>
Type: mysql
Character set: utf-8 (Internal)

Modified on Friday 06 June 2008 3:47:01 pm by Hakim Bouras

Friday 06 June 2008 3:13:46 pm

What a coincidence... I was just about to write about this as we're struggling with it right now! Same thing, same impossibility to reproduce, and seems related to one of extensions with an abstract datatype class. This also happens only at one location with Debian-based server, when moved elsewhere it doesn't happen...

One thing. In our case, this eZFile error mentions the very last line of a class that implements the abstract class:

class ClassName extends OurAbstractDatatype {
...
} <---- This line is mentioned in the error message...
?>

Maybe that would be a hint of some sort...

Modified on Friday 06 June 2008 3:16:43 pm by Piotr Karaƛ

Friday 06 June 2008 3:44:15 pm

In fact I am having this problem since many weeks (and was somehow hoping that this will be "magically" corrected with some of the EZ updates - but unfortunately...)

For two of my extensions, I have also the error on the closing bracket of the declaration of the class. For the other it is a "normal" php line... I indicated in my initial post the content of the line with the error.

I have no idea of how going any further...

Cheers,
Hakim

Monday 09 June 2008 11:38:21 am

After further testing, the problem seems to be related to the server configuration (in this case Debian) which is causing the following strange behaviour: from time to time, the server is catching a STRICT php error as a fatal error. In order to fix the problem, I have updated the code of my extensions in order to get rid of all the STRICT errors and until now, I did not get any more these fatal errors.

About the error on the closing brackets '}', it is about the definition of the class which does not match the parent class. You have to go to each of the methods declarations and update them to match the parent declarations (which are slightly different in v4 - from what they were in v3).

Hope this might help.

Hakim

Monday 09 June 2008 12:08:55 pm

Hello Hakim,

This might be something, because our extension had some strict notices as well. However, it miraculously got better after the weekend... this is weird...

Tuesday 10 June 2008 8:48:01 am

Hi Piotrek,

By any chance, do you know if they were any kind of maintenance on your Debian server (update code or config of PHP, Apache...)?

Hakim

Tuesday 10 June 2008 12:37:37 pm

I'll try to find out, but this might be difficult as we've had the VPS upgraded in the "very" meantime... lots of things might have happened...

Wednesday 20 August 2008 7:12:00 am

I also had a "Class 'eZFile' not found in" error a month ago or so.
If I don't remember incorrectly the problem was that I was missing a } in the end of a file in one of my custom extension:

I had code like

<?php
class vtest
{
	function foobar()
	{

	}

// no } at the end here
?>

In the first post in this thread I see you got a "Fatal error: Class declarations may not be nested in". This could indicate that you have the same problem.

Modified on Wednesday 20 August 2008 7:12:26 am by Vidar Langseid

Wednesday 20 August 2008 8:04:06 am

Vidar,

The question remains: why would this behavior vary in time? blunk.gif Emoticon
Doesn't actually PHP throw a fatal error in case of the last } missing? Never experimented with that...

Cheers,
Piotrek

Wednesday 20 August 2008 8:22:37 am

Hi Piotrek.
Sorry, I don't have all the answers. I just wanted to inform you about my problem and my solution as it sounded related to your problem.
It is weird if it only happens from time-to-time, indeed.

However, I would recommend to everybody which experience this problem to double check that they have no such syntax errors as I mentioned above in their files.

If it only happens from time-to-time, maybe some generated code in some cache file lacks a ending "}" ?

Wednesday 20 August 2008 8:26:07 am

If it only happens from time-to-time, maybe some generated code in some cache file lacks a ending "}" ?

Actually, that could be something, never thought of it, thanks! If it ever occurs again (becuase it has stopped...) it'll try to backup and script-analyse the cache.

Wednesday 17 June 2009 1:13:39 pm

Just experienced this myself, and it does seems like a cache file is causing the problem. Clearing the cache will make the problem go away (for a while anyways).

Modified on Wednesday 17 June 2009 1:16:14 pm by Ole Morten Halvorsen

Thursday 27 August 2009 9:05:15 am

Thought I should add that I too experienced this. Last night everything was working fine - this morning I get the "Fatal error: Class 'eZFile' not found" message.
And this was on my development computer which has most caching turned off, and did not upgrade PHP between last night and this morning.

It :did: report a PHP Strict warning though - regarding assigning by reference with new, being deprecated. The line generating the warning:
$n7p =& new n7Portal();

changed all of these occurences and guess what - the Fatal error went away blunk.gif Emoticon

And for the confusing part - I tried changing one of the assignments back to =&, and it still worked. Even tried to clear cache - still works.

indication of a bug somewhere?

Thursday 27 August 2009 11:03:06 am

I have also experienced class not found messages during the last weeks (with eZPage and eZPageZone). Once the problem occur, I have to restart apache in order to make the problem go away.
I kinda suspect it to be an APC problem but just clearing the APC cache ( using apc_clear_cache() ) doesn't help. Apache has to be restarted

Saturday 17 October 2009 10:52:16 am

Similar problem. Fairly random but often when opening a content class for editing.


Fatal error: Class 'eZFile' not found in /home/ez_consumer/extension/gmaplocation/datatypes/ezgmaplocation/ezgmaplocationtype.php on line 214
Fatal error: eZ Publish did not finish its request

The execution of eZ Publish was abruptly ended, the debug output is present below.

.......

Strict: PHP 	Oct 17 2009 09:39:24

Declaration of eZGmapLocationType::objectAttributeContent() should be compatible with that of eZDataType::objectAttributeContent() in /home/ez_consumer/extension/gmaplocation/datatypes/ezgmaplocation/ezgmaplocationtype.php on line 214


expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from