The URL gives an internal server error in production, but works in development?

I'm relatively new to symfony2 and doctrine2, and am puzzled by something ...

When accessing a specific page in the dev environment, I get the contents of the page as expected, but when I try to open the same page using the prod environment, all I see is "Internal Server Error".

Other pages in prod work fine, by the way ...

Looking at the php error log, I see

PHP Warning: require ([path] / app / cache / prod / doctrine / orm / Proxies / _CG_SitesMyBundleEntity [myEntity] .php): stream could not be opened: there is no such file or directory in [path] \ vendor \ doctrine \ orm \ lib \ Doctrine \ ORM \ Proxy \ ProxyFactory.php on line 92

Looking at the appropriate directory, the specified proxy file does not really exist, but others.

I tried to completely clear the cache directories to no avail, the same applies to regenerating objects.

Perhaps relevant: I recently updated tot symfony 2.2 and its version of the companion doctrine.

Can someone point me in the right direction why this particular proxy is not created automatically (when there are others) and what can I do to solve this problem?

[edit]
Despite the fact that the reflection error when starting php app/console cache:warmup --env=prod not associated with an entity for which there was no proxy file, resolving the reflection error also eliminated the "internal server error"

+4
source share
1 answer

Uncomment auto_generate_proxy_classes: %kernel.debug% in config.yml.

-1
source

All Articles