views:

1133

answers:

4

Hi there,

I'm having an issue with the visualization of my site on Google Chrome and Safari (both using Webkit rendering engine), the site is built upon Symfony framework, version 1.1 (unmaintained version). When navigating to the site, this shows an error 500 when loading a page, I read somewhere that it might be related to Symfony caching but I don't know how to solve it and turning off caching is not a solution.

Thankyou in advance.

A: 

You can see the actual problem by browsing via "dev" controller. It's called by default: yourAppName_dev.php

So if you have a "frontend" app, it's: http://domain.tld/frontend_dev.php

Yes, most of the cases for error 500 is the cache. You can clear the cache by navigating to your project root directory and type:

symfony cc

or

./symfony cc

or

php symfony cc

which depends of you environment and setup.

Also you can delete the content of the cache directory located in your project root manually.


Hope this helps.

+1  A: 

See this: http://forum.symfony-project.org/index.php/m/75225/

To fix, change your config/ProjectConfiguration.class.php to include the following:

  public function setup()
  {
    // keep current code here and then add...

    $this->dispatcher->connect('request.filter_parameters', array($this, 'filterRequestParameters'));
  }

  public function filterRequestParameters(sfEvent $event, $parameters)
  {
    $request = $event->getSubject();
    if (preg_match('|Safari/([0-9\.]+)|', $request->getHttpHeader('User-Agent')))
    {
      $request->setRequestFormat('html');
    }

    return $parameters;
  }
Cryo
+1  A: 

This ticket fixes the problem, so you can patch your sfWebRequest class code.

Honza Trtik
A: 

Just as an archive, as I spent a while trying to figure this out as a Symfony noob. I was getting a 500 error on frontend.php but everything looked fine on frontend_dev.php. This just after working with my database connection settings in databases.yml.

Dincho's clear cache suggestion above fixed it for me very quickly. Worth a first shot.

Anubis