Symfony produces a white page

I Have tried to integrate a symfony project on my server but it produces a blank page does not produce any errors even if i on the error display in php. After i include configuration file in index.php nothing works, even the die in the first line of project configuration file does not print when i try this.

My index.php file is

error_reporting(E_ALL);

    ini_set('display_errors', "1");

    require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');

    $configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', false);
    sfContext::createInstance($configuration)->dispatch();

i am including the project configuration file also here please check that also

require_once dirname(__FILE__).'/../lib/symfony/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
      {
        // ...

        $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;
      }
}

i have included the symfony folder inside the lib folder of the project.

It does not produce any error even i tried it in development mode also please not that i have provide full permission to all files including cache and log folder.


设置缓存和日志文件夹的权限

chmod 777 cache/ log/ -R
php symfony cc

It also happened to me once, I created a route /media and this route given a white page.

After a quite long while, I realized that /media was also an existing asset directory. The asset dir had the priority.

链接地址: http://www.djcxy.com/p/71010.html

上一篇: Marionette.js与Chaplin.js相比

下一篇: Symfony生成一个白页