Why After first load symfony stop working? - symfony

I'm new to symfony
and when installation finish the welcome page work correctly but when i'm refreshing the page the load doesnt finish!
EDIT :
For my server configuration i juste use the "php bin\console sever:run" commande to launch my project.
And I add the content of dev log file :
[2019-02-14 00:09:05] php.DEBUG: Warning: fsockopen(): unable to connect to 127.0.0.1:8000 (Une tentative de connexion a échoué car le parti connecté n’a pas répondu convenablement au-delà d’une certaine durée ou une connexion établie a échoué car l’hôte de connexion n’a pas répondu. ) {"exception":"[object] (Symfony\Component\Debug\Exception\SilencedErrorContext: {\"severity\":2,\"file\":\"C:\\Mes Sites Web\\awema\\awema\\vendor\\symfony\\web-server-bundle\\WebServerConfig.php\",\"line\":139,\"trace\":[{\"file\":\"C:\\Mes Sites Web\\awema\\awema\\vendor\\symfony\\web-server-bundle\\WebServerConfig.php\",\"line\":54,\"function\":\"findBestPort\",\"class\":\"Symfony\\Bundle\\WebServerBundle\\WebServerConfig\",\"type\":\"->\"}],\"count\":1})"} []
[2019-02-14 00:09:17] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /"" at C:\Mes Sites Web\awema\awema\vendor\symfony\http-kernel\EventListener\RouterListener.php line 139 {"exception":"[object] (Symfony\Component\HttpKernel\Exception\NotFoundHttpException(code: 0): No route found for \"GET /\" at C:\Mes Sites Web\awema\awema\vendor\symfony\http-kernel\EventListener\RouterListener.php:139, Symfony\Component\Routing\Exception\NoConfigurationException(code: 0): at C:\Mes Sites Web\awema\awema\vendor\symfony\routing\Matcher\Dumper\PhpMatcherTrait.php:172)"} []
[2019-02-14 00:09:18] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"6b922e"},"request_uri":"http://127.0.0.1:8000/_wdt/6b922e","method":"GET"} []

I experienced the exact same issue (Windows, Symfony 4.4.2, php 7.1.3)
I was using the WebserverBundle which gives a notice :
WebserverBundle is deprecated since Symfony 4.4. The new Symfony local
server has more features, you can use it instead
If you run for instance
symfony server:start
This will propose the installation of the new symfony local server, which solved this infinite loop problem for me.

Related

MissingMethodException: Void System.Data.Entity.Infrastructure.LocalDbConnectionFactory..ctor() after upgrading EF6

I upgraded EF6 from 6.2.0 to 6.3.0 and now I'm getting this error on the server (not in Visual Studio):
Méthode introuvable : 'Void System.Data.Entity.Infrastructure.LocalDbConnectionFactory..ctor()'.
Description : Une exception non gérée s'est produite au moment de l'exécution de la requête Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.
Détails de l'exception: System.MissingMethodException: Méthode introuvable : 'Void System.Data.Entity.Infrastructure.LocalDbConnectionFactory..ctor()'.
I even tried to publish the old version of the website (using EF 6.2.0) and I'm still getting the same error.
The server is Windows Server 2012 with asp.net framework 4.8. The website is made with WebForms.
I tried restarting IIS and the server itself, without success.
I was able to fix the problem by publishing with the option to "delete existing files".
I guess it was different versions of the EntityFramework DLL that were conflicting on the server.
For anyone who has same problem during development, not deploying:
Probably, your project reads EntityFramework.dll from different place than your project bin folder. You can check this in Modules window (for open it start debugging and choose Debug -> Windows -> Modules). Now, just find there an entry for EntityFramework.dll and check out the path value. In my case it pointed out an old version from GAC_MSIL directory. After deletion these trash from GAC and re-running my project, file EntityFrmaework.dll was loaded from my project folder and the error was gone.

Problem while installing keystone for openstack (stein)

we are a group of french students in networks, and we need to get openstack working for a school project. We are curently facing an issue while installing keystone. After following the official openstack guide, when trying the service, we get the following error:
[root#localhost ~]# openstack project create --domain default --description "Service Project" service
Failed to discover available identity versions when contacting http://controller:5000/v3. Attempting to parse version from URL.
Unable to establish connection to http://controller:5000/v3/auth/tokens: HTTPConnectionPool(host='controller', port=5000): Max retries exceeded with url: /v3/auth/tokens (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f60f19af9d0>: Failed to establish a new connection: [Errno -2] Nom ou service inconnu',))
tail /var/log/keystone/keystone.log
2019-10-03 14:24:35.943 4778 WARNING keystone.access_rules_config.backends.json [-] No config file found for access rules, application credential access rules will be unavailable.: IOError: [Errno 2] No such file or directory: '/etc/keystone/access_rules.json'
We are installing the stein version
Does anyone know how to solve the problem? We can include some others log if needed. We are two who tried and get the same error.
Thanks for any help! :)
Well, the error is self explanatory.
You are missing a config file which governs access to openstack endpoints.
You can use copy it from unittest cases and put in /etc/keystone folder.
For your convenience here is url to file:
https://fossies.org/linux/misc/openstack/keystone-15.0.0.tar.gz/keystone-15.0.0/keystone/tests/unit/config_files/access_rules.json?m=t

Akeneo - Cannot access specific parts of the backend (http 500)

I am having some trouble to test akeneo (PIM based on symfony) features, as some parts of akeneo backend return the following error:
Sorry, page was not loaded correctly
It specifically occurs if I click under enrich, or settings.
I checked under app/logs, here is what I found:
[2016-11-05 13:57:36] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("There are no activated locales") in "/var/www/html/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/EnrichBundle/Resources/views/Attribute/index.html.twig" at line 68." at /var/www/html/pim-community-standard/app/cache/prod/classes.php line 5700 {"exception":"[object] (Twig_Error_Runtime(code: 0): An exception has been thrown during the rendering of a template (\"There are no activated locales\") in \"/var/www/html/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/EnrichBundle/Resources/views/Attribute/index.html.twig\" at line 68. at /var/www/html/pim-community-standard/app/cache/prod/classes.php:5700, LogicException(code: 0): There are no activated locales at /var/www/html/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UserBundle/Context/UserContext.php:110)"} []
I searched almost everything I could find in forums, but I'm still stuck with this issue.
Another error is also logged (depending on where I click):
[2016-11-05 13:58:55] request.CRITICAL: Uncaught PHP Exception LogicException: "There are no activated locales" at /var/www/html/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UserBundle/Context/UserContext.php line 110 {"exception":"[object] (LogicException(code: 0): There are no activated locales at /var/www/html/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UserBundle/Context/UserContext.php:110)"} []
These are the two errors that I was able to find in logs.
I double checked the install & all requirements (ubuntu 1.14). Everything seems fine.
Would you have an idea?
Thanks in advance!
Try to go "My Account - Additional" and select 2 locales, English and Spanish for example. Then go to console and delete the folder
pim-community-standard/app/cache/
When starting again Akeneo, view all akeneo_pim logs, or make a
tail -f /logs*
in the logsfolder.

Symfony "Unknown knp_menu_render function" on production

When transfering to production server I've got this error.
[2016-04-27 18:45:23] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2016-04-27 18:45:24] request.CRITICAL: Uncaught PHP Exception Twig_Error_Syntax: "Unknown "knp_menu_render" function in "dailyShop/index.html.twig" at line 210." at /home/ashkov/www/ruproms.ru/vendor/twig/twig/lib/Twig/ExpressionParser.php line 573 {"exception":"[object] (Twig_Error_Syntax(code: 0): Unknown \"knp_menu_render\" function in \"dailyShop/index.html.twig\" at line 210. at /home/ashkov/www/ruproms.ru/vendor/twig/twig/lib/Twig/ExpressionParser.php:573)"} []
In the development enviroment everything is ok.
composer update was made several times.
new Knp\Bundle\MenuBundle\KnpMenuBundle(), on its place in app/AppKernel.php
This solved the problem:
php bin/console cache:clear -e prod

Difference between messages : 'server returning 404' AND 'No route found for GET /routeName

windows 8. symfony 2.7 installed with default settings on d:\htdocs\sym\again\blog\
With apache, running the URL: http://localhost/sym/again/blog/web/hello , returns the following error:
Oops! An Error Occurred
The server returned a "404 Not Found".
Something is broken. Please let us know what you were doing when this error...
INFO: The above error is different from regular apache 404 'object not found' message. for http://localhost/NonExistingPage
With the built in PHP server php app/console server:run,
running the URL http://localhost:8000/NonExistingRoute returns
No route found for "GET /NonExistingRoute" 404 Not Found - NotFoundHttpException 1 linked Exception: ResourceNotFoundException »
while running the URL http://localhost:8000/hello, returns the actual page.
Question: What is the different between the errors ? My understanding:
the regular apache error is simply when a file is requested that is not found by apache
The 'Oops! An Error Occurred The server returned a "404 Not Found". Something is broken' is what is confusing me, I don't understand why/how it is different from the route not found errors.
the route not found means that it reached symfony but did not find any route matching /NonExistingRoute in the routes file.
Another Strange thing:
if routing.yml is changed to:
offtopic_books_homepage:
path: /sym/again/blog/web/hello
defaults: { _controller: OfftopicBooksBundle:Default:index }
then
http://localhost:8000/sym/again/blog/web/hello - returns the expected page. (with app/console running)
Whereas
http://localhost/sym/again/blog/web/hello - gives the following error:
Oops! An Error Occurred
The server returned a "404 Not Found".
Why ?
In this case please reset cache for prod env:
php app/console c:c -e prod
Note:
Please use dev env and app_dev.php for development, not production environment.

Resources