Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 265
anoop Avatar asked Apr 19 '13 14:04

anoop


1 Answers

Set permission to cache and log folder

chmod 777 cache/ log/ -R
php symfony cc
like image 181
Azam Alvi Avatar answered Nov 20 '22 08:11

Azam Alvi