eZ Community » Forums » Install & configuration » EZP5: Unexpected error, the message...
expandshrink

EZP5: Unexpected error, the message was : The Expires HTTP header is not parseable (-1)

EZP5: Unexpected error, the message was : The Expires HTTP header is not parseable (-1)

Thursday 31 January 2013 5:17:42 am - 2 replies

Hi there,

I installed succesfully eZCommunity Project 2012.12 in my development server (example: ezp5.dev.com - ezp5.dev ip: 192.168.1.105), Everything is ok, and works great,  but when i go to the admin_site, or also when i acces to any ez module (eg: ezinfo/about) using a proxy, i get an error:

"An unexpected error has occurred. Please contact the webmaster". Also, in my ez error_log i see:

Unexpected error, the message was : The Expires HTTP header is not parseable (-1). in ezp5-rootsite/www/ezpublish/cache/prod/classes.php on line 2521.

So, the line 2521 is 

 throw new \RuntimeException(sprintf('The %s HTTP header is not parseable (%s).', $key, $value)); which is inside the method getDate:

 <em>public function getDate($key, \DateTime $default = null)    </em><span style="font-size: 1.1em;"><em>{        if (null === $value = $this->get($key)) </em></span><span style="font-size: 1.1em;"><em>{            return $default;       </em></span><span style="font-size: 1.1em;"><em>}</em></span><span style="font-size: 1.1em;"><em>        if (false === $date = \DateTime::createFromFormat(DATE_RFC2822, $value))</em></span><span style="font-size: 1.1em;"><em>{          <strong>  throw new \RuntimeException(sprintf('The %s HTTP header is not parseable (%s).', $key, $value));      </strong></em></span><span style="font-size: 1.1em;"><em> }</em></span><span style="font-size: 1.1em;"><em>        return $date;    }</em></span>

If i comment that line, using return $default; instead, the site works with/without proxy, but,... how could i do a clean fix of that issue?(next time i delete prod cache i'll delete that), or maybe it's just an issue of my server configuration? also i read this is a common problem with symfony: https://github.com/symfony/symfony/issues/6469

Any help would be appreciated, thanks in advance.

Server info: PHP 5.4.11 , apache 2.4.3

Modified on Thursday 31 January 2013 5:20:00 am by Diego Amaya

Thursday 31 January 2013 5:39:55 am

I made the same change in vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/HeaderBag.php (line 239)

  if (false === $date = \DateTime::createFromFormat(DATE_RFC2822, $value)) {            //throw new \RuntimeException(sprintf('The %s HTTP header is not parseable (%s).', $key, $value));            return $default;        }

...And, this solves the issue even when the cache is deleted, also, i would appreciate any other idea.

Thanks in advance.

Monday 15 July 2013 11:35:47 am

I had the same problem, thanks for this hack. But it would be better, to solve this issue correct.

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from