简体   繁体   中英

Add a bundle on a Symfony 3.2 website online

my Symfony website works very well. But I want to add a bundle. I installed it on dev mode and it works correctly. When I install it on the server adding it in AppKernel.php, composer.json, composer.lock and in the vendor directory, updating composer vendor, the website responds with an error 500. I removed the cache. Can you help me? Thanks a lot!!

There are some elements not intended for production use, and that's the reason why they are used in dev only. Also, in dev you see any errors in the browser, but in prod, you get a 500 error, so you have to take a look at var/logs/prod.log. Also, you have to clear the cache with --env=prod.

You didn't specify the bundle that gives the problem. Take a look at its documentation for if there are any drawbacks in production use.

Thank you for your advices. I've finally found the answer on my own. First, I ran the website URL adding /app_dev.php : the error was more precise. The bundle class was not found. I realized that my composer files in vendor/composer were not updated with the new bundle name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM