Transferred the symfony project to the hosting. That that was in web threw in public_html. The rest just threw in the root. Here comes the prod environment http://task1.esy.es/ and gives an error 500. Configured dev to see what is happening. Something is displayed http://task1.esy.es/app_dev.php , but it does not load css and js - it also gives 500 error to them. Maybe due to the fact that the folder is not web, but public_html is called. I changed the web to public_html for the sake of experiment in a local project, and he also could not upload, only issued 404 errors, not 500. So maybe because the hosting folder is public_html and not the web, so it does not load them. Somehow something can be corrected in the configs to make it work? Or maybe it is something else - logs can be what they say.
Here are the logs in dev
[2016-08-07 00:50:49] request.INFO: Matched route "{route}". {"route":"record_index","route_parameters":{"_controller":"AppBundle\\Controller\\RecordController::indexAction","_route":"record_index"},"request_uri":"http://task1.esy.es/app_dev.php/","method":"GET"} [] [2016-08-07 00:50:49] security.INFO: Populated the TokenStorage with an anonymous Token. [] [] [2016-08-07 00:50:49] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2, t0.surname AS surname_3, t0.patronymic AS patronymic_4, t0.d_ob AS d_ob_5, t0.phone AS phone_6, t0.id_town AS id_town_7, t0.id_street AS id_street_8 FROM records t0 [] [] [2016-08-07 00:50:49] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2 FROM town t0 WHERE t0.id = ? [5] [] [2016-08-07 00:50:49] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2, t0.id_town AS id_town_3 FROM street t0 WHERE t0.id = ? [9] [] [2016-08-07 00:50:49] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2 FROM town t0 WHERE t0.id = ? [3] [] [2016-08-07 00:50:49] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2, t0.id_town AS id_town_3 FROM street t0 WHERE t0.id = ? [6] [] [2016-08-07 00:50:49] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2 FROM town t0 WHERE t0.id = ? [1] [] [2016-08-07 00:50:49] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2, t0.id_town AS id_town_3 FROM street t0 WHERE t0.id = ? [3] [] [2016-08-07 00:51:00] request.INFO: Matched route "{route}". {"route":"_wdt","route_parameters":{"_controller":"web_profiler.controller.profiler:toolbarAction","token":"49a528","_route":"_wdt"},"request_uri":"http://task1.esy.es/app_dev.php/_wdt/49a528","method":"GET"} []
Logs in prod
[2016-08-07 01:43:24] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Config\Exception\FileLoaderLoadException: "Bundle "WebProfilerBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your AppKernel.php file? in @WebProfilerBundle/Resources/config/routing/wdt.xml (which is being imported from "/home/u710835356/app/config/routing.yml"). Make sure the "WebProfilerBundle" bundle is correctly registered and loaded in the application kernel class. If the bundle is registered, make sure the bundle path "@WebProfilerBundle/Resources/config/routing/wdt.xml" is not empty." at /home/u710835356/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/FileLoader.php line 118 {"exception":"[object] (Symfony\\Component\\Config\\Exception\\FileLoaderLoadException(code: 0): Bundle \"WebProfilerBundle\" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your AppKernel.php file? in @WebProfilerBundle/Resources/config/routing/wdt.xml (which is being imported from \"/home/u710835356/app/config/routing.yml\"). Make sure the \"WebProfilerBundle\" bundle is correctly registered and loaded in the application kernel class. If the bundle is registered, make sure the bundle path \"@WebProfilerBundle/Resources/config/routing/wdt.xml\" is not empty. at /home/u710835356/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/FileLoader.php:118, InvalidArgumentException(code: 0): Bundle \"WebProfilerBundle\" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your AppKernel.php file? at /home/u710835356/var/bootstrap.php.cache:2348)"} []
Logs in prod helped to understand what was happening in AppKernel.php connected new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
only for dev and test environments, I connected it above for any environment and now I have access to http://task1.esy.es/ although css and js do not load yet. 404 gives out. And such logs
[2016-08-07 06:13:32] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /bundles/app/js/jquery.min.js" (from "http://task1.esy.es/new")" at /home/u710835356/var/cache/prod/classes.php line 2774 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /bundles/app/js/jquery.min.js\" (from \"http://task1.esy.es/new\") at /home/u710835356/var/cache/prod/classes.php:2774, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): at /home/u710835356/var/cache/prod/appProdUrlMatcher.php:302)"} [] [2016-08-07 06:13:33] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /bundles/app/css/tablestyle.css" (from "http://task1.esy.es/new")" at /home/u710835356/var/cache/prod/classes.php line 2774 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /bundles/app/css/tablestyle.css\" (from \"http://task1.esy.es/new\") at /home/u710835356/var/cache/prod/classes.php:2774, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): at /home/u710835356/var/cache/prod/appProdUrlMatcher.php:302)"} []
asset('bundles/app/js/jquery.min.js')
then it does not work, if throughasset('jquery.min.js')
, then it works on dev, but on prod it gives 304 - but also works. It turns out you can load it up, but it would be desirable for the normal one - Vladimir Goncharuk