-
-
Save EdwardIII/be42ad2ff73b0ff02416 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\ClassLoader\ApcClassLoader; | |
use Symfony\Component\Debug\Debug; | |
use Symfony\Component\HttpFoundation\Request; | |
$loader = require_once __DIR__.'/../app/bootstrap.php.cache'; | |
// Use APC for autoloading to improve performance. | |
// Change 'sf2' to a unique prefix in order to prevent cache key conflicts | |
// with other applications also using APC. | |
/* | |
$apcLoader = new ApcClassLoader('sf2', $loader); | |
$loader->unregister(); | |
$apcLoader->register(true); | |
*/ | |
// Allow switching between env and debug using env vars | |
// In apache, switch by setting this in the site's | |
// vhost: | |
// SetEnv SYMFONY_ENV dev | |
// SetEnv SYMFONY_DEBUG 1 | |
// Can be dev, test or prod | |
$env = getenv('SYMFONY_ENV') ?: 'prod'; | |
$debug = getenv('SYMFONY_DEBUG') === '1'; | |
if ($debug) { | |
Debug::enable(); | |
} | |
require_once __DIR__.'/../app/AppKernel.php'; | |
//require_once __DIR__.'/../app/AppCache.php'; | |
try { | |
$kernel = new AppKernel($env, $debug); | |
$kernel->loadClassCache(); | |
//$kernel = new AppCache($kernel); | |
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter | |
//Request::enableHttpMethodParameterOverride(); | |
$request = Request::createFromGlobals(); | |
$response = $kernel->handle($request); | |
$response->send(); | |
$kernel->terminate($request, $response); | |
}catch(Exception $e){ | |
# Still just seeing: | |
# [Fri Oct 10 16:08:11 2014] [error] [client 10.13.14.1] PHP Fatal error: Uncaught exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed' in [no active file]:0\nStack trace:\n#0 [internal function]: session_write_close()\n#1 {main}\n thrown in [no active file] on line 0, referer: <snip> | |
trigger_error($e->getTraceAsString); | |
throw $e; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment