Search code examples
phpsymfonydeploymentproduction

symfony prod still dev


I'm new at Symfony 2.8 and I can't seem to get my dev in production mode.

Allthough I ran the following commands:

to create the assets

php app/console assetic:dump --env=prod --no-debug

to clear the cache

php app/console --env=prod cache:clear

to warm up the cache

php app/console cache:warmup --env=prod --no-debug

If I'm right (which I'm probably not because it's not working) that should be it.

I've even tried setting $kernel = new AppKernel('prod', false); to $kernel = new AppKernel('prod', true); in app.php. But that didn't help either.

This production app runs on Ubuntu 14.04 with apache2 and php 5.5

Any help on this matter would be great.


Solution

  • Im guessing you must have this deployed on a server, rather than your local machine. app_dev.php won't run on a production server, by design. You can modify it, by adding your own IP address though, and then it will run.

    Anyway, I've had this problem too. You're not actually in debug mode. It's just that something must have gone wrong in Symfony's build process because their stable versions are being suffixed by -DEV.

    Check out the fileSymfony/Component/HttpKernel/Kernel.php in the vendors directory. Look for const VERSION. It's value is probably like x.x.x-DEV.