问题描述:

Before deploying my symfony 2.1 version into my prod serveur, I wanted to test the behaviour of the prod env.

So I have done a php app/console cache:clear --env=prod --no-debug, after a php app/console assets:install web and now when I'm calling the app controller I have this error.

Google for this case is not my friend :-(

0 /Applications/MAMP/htdocs/myapp/web/app.php(13): Symfony\Component\ClassLoader\ApcClassLoader->__construct('sf2', Object(Composer\Autoload\ClassLoader))

1 {main}

Here my app.php file

use Symfony\Component\ClassLoader\ApcClassLoader; use

Symfony\Component\HttpFoundation\Request;

$loader = require_once DIR.'/../app/bootstrap.php.cache';

// Use APC for autoloading to improve performance // Change 'sf2' by

the prefix you want in order to prevent key conflict with another

application /* $loader = new ApcClassLoader('sf2', $loader);

$loader->register(true);

*/

require_once DIR.'/../app/AppKernel.php';

//require_once DIR.'/../app/AppCache.php';

$kernel = new AppKernel('prod', false);

$kernel->loadClassCache();

//$kernel = new AppCache($kernel);

$request = Request::createFromGlobals();

$response = $kernel->handle($request);

$response->send();

$kernel->terminate($request, $response);

Any help would be very cool

Thanks

Sam

网友答案:

It's failing on ApcClassLoader do you have APC installed? try restart apache.

We can't really see if those APC lines are commented out of not in your app.php, lines return are all messy.

相关阅读:
Top