Probleme with backend (administration)

Author Message

Fou Jino

Monday 11 April 2011 2:49:23 am

Hi everyone,

So, I have a strange problem with my ez publish ... The backend site (administration) it's not accessible, I received the message : Fatal error: eZ Publish did not finish its requestThe execution of eZ Publish was abruptly ended. Contact website owner with current url and what you did, and owner will be able to debug the issue further.

And when I see in the logs files, I have that :

[ Apr 11 2011 09:32:34 ] [10.2.8.22] eZPHPCreator::restore:Variable 'TemplateInfo' is not present in cache 'var/cache/template/tree/6af2ec5b9700e863ae9121491339c99e-alphabetical.php'

[ Apr 11 2011 09:32:34 ] [10.2.8.22] eZPHPCreator::restore:Variable 'TemplateRoot' is not present in cache 'var/cache/template/tree/6af2ec5b9700e863ae9121491339c99e-alphabetical.php'

[ Apr 11 2011 09:32:34 ] [10.2.8.22] eZPHPCreator::restore:Variable 'eZTemplateTreeCacheCodeDate' is not present in cache 'var/cache/template/tree/6af2ec5b9700e863ae9121491339c99e-alphabetical.php'

Can you help me please ? Thanks in advance !

Foujino ~ http://www.foujino-blog.be

Marko Žmak

Monday 11 April 2011 4:52:22 am

Some thing to check/try:

  • do the files mentioned in the log exist?
  • do they have apropriate reading permissions?
  • try removing the var/cache folder manually

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Fou Jino

Monday 11 April 2011 11:55:07 pm

Hi Marko,

  • The files mentionned exist, but the content it's empty
  • I hve reading permission and I ca remove the var/cache manually

I also observe, when I want to access in admin zone, before the login, it's very slow, after the login page, all crashed

Foujino ~ http://www.foujino-blog.be

Fou Jino

Wednesday 13 April 2011 1:03:00 am

Hey,

Apparently its a problem linked with this file : var/cache/template/tree/6af2ec5b9700e863ae9121491339c99e-alphabetical.php

This file is present but the content it's empty

And always, when I want to access my administration siteaccess, I have no error in logs files but in my browser I already have the message : Fatal error eZ Publish did not finish its request The execution of eZ Publish was abruptly ended. Contact website owner with current url and what you did, and owner will be able to debug the issue further.

It's very stranger, I have no idea for why :s How I can regenerate the content of this file ?

Anybody ?

Foujino ~ http://www.foujino-blog.be

Jean-Luc Nguyen

Wednesday 13 April 2011 8:54:44 am

Hi,

Did you resolved your cache error?

http://www.acidre.com

Fou Jino

Wednesday 13 April 2011 10:02:23 am

Hi Jean-Luc,

Unfortunately no, I don't understand why the cache file 6af2ec5b9700e863ae9121491339c99e-alphabetical.php is empty

Do you have an idea ?

Foujino ~ http://www.foujino-blog.be

Jean-Luc Nguyen

Thursday 14 April 2011 2:21:12 am

"

Hi Jean-Luc,

Unfortunately no, I don't understand why the cache file 6af2ec5b9700e863ae9121491339c99e-alphabetical.php is empty

Do you have an idea ?

"

Hi,

We got the same issue on production. I don't know if it is the same configuration for you, but cache files were shared. The sysadmin separated caches from the NFS system. Each front server has its own cache.

Don't if it will help you. This was after upgrading 4.3 to 4.4.

http://www.acidre.com

Fou Jino

Friday 15 April 2011 2:37:45 am

I have the same configuration, ez publish clustering with nfs share folder

My ez publish worked perfectly with php 5,3,1 but when server passed to php 5,3,6, from this time, it's not work

I don't know if the problem is due to this upgrade of PHP

My ez publish is the 4,3,0

Foujino ~ http://www.foujino-blog.be

Fou Jino

Wednesday 20 April 2011 1:06:30 am

Jean-Luc,

Did you find a solution for this problem ?

Foujino ~ http://www.foujino-blog.be

Jean-Luc Nguyen

Sunday 24 April 2011 3:36:31 pm

Hello,

Actually, my problem was not identical. The cache file was not empty. My solution was to, as said, to separate caches from the NFS system. Each front server has its own cache now.

http://www.acidre.com

Gaetano Giunta

Tuesday 26 April 2011 2:48:01 am

As a side note, having caches on every frontend server is not the recommended setup at all (for multiple frontend setups). You might clear cache on node A and have the stale cache file still available on node B.

For the cache-on-nfs configuration, it is recommended to use a high-end nfs server (netapp, emc2, etc) if you can, not just a meager linux server. AND (very important) enable file-locking over nfs to make sure cache consistency is properly handled. IIRC, also caching of file metadata by nfs should also be disabled...

Principal Consultant International Business
Member of the Community Project Board

Fou Jino

Tuesday 26 April 2011 6:21:16 am

Hi,

Jean-Luc, I didn't understand you first time, sorry for my english :s

So, for me, I use a local cache for each instance with clustering principally for the uploaded files.

Today I resolved my problem. I cleared all cache and then I compiled all of the templates and since this procedure, all of my website works correctly.

Thanks all !

Foujino ~ http://www.foujino-blog.be

Marko Žmak

Wednesday 27 April 2011 6:57:53 am

OK, just a note about this one...

I just had the same problem today on one site. The site was just the blank page and I got the same error. The cache file was also empty.

After diggin up a little bit I found that the server's timezone was misconfigured (both system and PHP). I corrected it and the site started working.

I can't be 100% sure that this was the problem, but for now it's working.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Fou Jino

Wednesday 27 April 2011 7:24:25 am

Hi Marko,

Yes it's possible, because I has the same problem, the server's timezone wasn't correct

But I use a phpconfig file in my ez publish root directory to correct this timezone problem

Foujino ~ http://www.foujino-blog.be

Marko Žmak

Tuesday 03 May 2011 4:23:27 am

Ok, it seems like the incorrect system time was not causing this issue, the problem now came back although the time on the server is set correctly.

But it seems like I managed to nail it down to the piece of template code that is causing the issue - it's seems like it's a specific combination of nested curly and round brackets... very odd, seems like a template parser bug in eZ.

I'm investigating it further and will post the result here when I'm done.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Fou Jino

Tuesday 03 May 2011 4:38:32 am

Ok Marko,

We await the outcome of your research:)

Thanks in advance !

Foujino ~ http://www.foujino-blog.be

Marko Žmak

Tuesday 03 May 2011 2:01:25 pm

Ok, it seems like the problem (at least in my case) is when you have a certain combination of nested {foreach} or {if} together with nested hash() or array(). For example, if you have a template that has this code inside:

{foreach $array1 as $key1 => $array2}
        {foreach $array2 as $key2 => $array3}
                {foreach $array3 as $value}
                        {if eq(1,0)}
                                {set $bighash=$bighash|append( hash( 'a', hash( 'b', hash( 1, 2 ) ) ) )}
                        {/if}
                {/foreach}
        {/foreach}
{/foreach}

then the cache for this template is not generated upon loading the page, the page is left blank and you get the message in the error log:

'eZTemplateTreeCacheCodeDate' is not present in cache

After futher inspection I found out that this happens when you have 4 or more nested blocks of curly brackets, and inside that 4 or more nested parts with round brackets. If you exclude just one of the curly or round brackets part, then everything works OK.

Here are some various examples of the code that produces this error:

{* foreach and hash *}
{foreach $array1 as $key1 => $array2}
        {foreach $array2 as $key2 => $array3}
                {foreach $array3 as $value}
                        {if eq(1,0)}
                                {set $bighash=$bighash|append( hash( 'a', hash( 'b', hash( 1, 2 ) ) ) )}
                        {/if}
                {/foreach}
        {/foreach}
{/foreach}

{* if and array *}
{if eq(1,0)}
        {if eq(1,0)}
                {if eq(1,0)}
                        {if eq(1,0)}
                                {set $bighash=array( array( array( array(1) ) ) )}
                        {/if}
                {/if}
        {/if}
{/if}

{* if and hash *}
{if eq(1,0)}
        {if eq(1,0)}
                {if eq(1,0)}
                        {if eq(1,0)}
                                {set $bighash=$bighash|append( hash( 'a', hash( 'b', hash(1, 2) ) ) )}
                        {/if}
                {/if}
        {/if}
{/if}

And here are some examples of a similar code that doesn't produce the error:

{* we exclude one curly bracket level *}
{if eq(1,0)}
        {if eq(1,0)}
                {if eq(1,0)}
                        {set $bighash=$bighash|append( hash( 'a', hash( 'b', hash(1, 2) ) ) )}
                {/if}
        {/if}
{/if}

{* we exclude one round bracket level *}
{if eq(1,0)}
        {if eq(1,0)}
                {if eq(1,0)}
                        {if eq(1,0)}
                                {set $bighash=array( array( array( 1 ) ) )}
                        {/if}
                {/if}
        {/if}
{/if}

This happens on eZP 4.1.1, I didn't test it on other versions.

Could someone try it and confirm this behaviour? If possible both on 4.1.1 and some newer eZP versions.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Wednesday 04 May 2011 2:31:24 am

OK, here's an update...

After upgrading PHP from 5.2.14 to 5.3.6 it seems that the problem is gone.

Based on the experience with this problem I wouldn't be 100% sure that this is the final solution, but it works for now...

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Fou Jino

Wednesday 04 May 2011 4:09:30 am

For me, this problem was appaer after that my environment was updated to PHP 5.3.6

And (for me) only way to resolve this problem it was to re-compiled all of my tempaltes

Foujino ~ http://www.foujino-blog.be

Marko Žmak

Thursday 05 May 2011 8:00:24 am

"

For me, this problem was appaer after that my environment was updated to PHP 5.3.6

"

Uh, this gets stranger and stranger...

"

And (for me) only way to resolve this problem it was to re-compiled all of my tempaltes

"

That means that if you for some reason want to clear the cache for only one template you will need to recompile them all manually.

Btw, do you happen to have in your template a piece of code with nested brackets like I described?

"

For me, this problem was appaer after that my environment was updated to PHP 5.3.6

And (for me) only way to resolve this problem it was to re-compiled all of my tempaltes

"
"

For me, this problem was appaer after that my environment was updated to PHP 5.3.6

And (for me) only way to resolve this problem it was to re-compiled all of my tempaltes

"

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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