0
votes

I am in the proces of creating a web application in symfony2. I have done all the development locally(OSX), but now I want to show a first version in a presentation where I can not use my own laptop.

I am deploying to an ubuntu 10 server. I also tested it on another small ubuntu 11 vps, but got the same problems.

I double checked with this tutorial whether php is set up correctly for symfony on my ubuntu server:

http://www.joelverhagen.com/blog/2011/05/how-to-configure-symfony-2-0-on-ubuntu-server-2011-4/

For deployment I followed these steps:

Moving app to production mode in Symfony 2

However the first step ( php app/console cache:clear --env=prod --no-debug ) gives me following error (this error also occurs when running this command locally):

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

Clearing the cache for the prod environment with debug false

[ReflectionException]                                         
Class Packed\Bundle\UserBundle\Entity\Rapport does not exist  

cache:clear [--no-warmup] [--no-optional-warmers]

Which is a bit weird since Packed\Bundle\UserBundle\Entity\Rapport does not exist, Packed\Bundle\ScoreModelBundle\Entity\Rapport however does.

since the app doe not need to go into production for some time this is not very urgent, what is very urgent is to get it running in development mode, so I tried using it through app_dev.php.

If I remove the localhost-check in app_dev.php everything works as expected but the i8n is not working... I can not switch to other locales as was possible locally: xxx.com/app_dev.php/en And it does not use the messages.nl.yml, messages.en.yml, ... and other files.

Any idea what might be causing this?

I checked the symfony and apache log but nothing weird there. Any other logs I should check?

Thanks!

Joris

1
Be aware that ubuntu has a case sensitive filesystem, and that Mac OS has a case INsensitive fs by default ... Make sure your files/directories have the same name as the classes/directories.AdrienBrault
Ok this did the trick, thanks! the translation issue in dev is fixed now, changed folder name from Translations to translations. However I still get the reflection exception when trying to clear cache in production ...joskes

1 Answers

0
votes

Try to rebuild your bootstrap file. If you're using APC-cache restart it from cli. If it doesn't help.

Easiest way to do it is run composer and do the update.

To check the translations (the templates should be cached on the server) check the config.yml translator service must be enabled there. You may have it enabled in config_dev.yml but not in the config_prod.yml