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.
require
. A syntax error will not show on the screen ifdisplay_errors
is disabled in php.ini. – DaveRandomtest.php
with a simple echo orphp_info
. If it doesn't work it's definitely Apache's config error, not an Sf problem. Have you checked the Apache error logs? – Michal Trojanowski