I have a problem with Symfony 2. trying the example from the book. I have written a controller but when i go to the URL specified in the route i get an error. The server can't find the page. When i run app_dev.php i get an error that the file boostrap.php.cache is missing.
searched on the internet but found nothing relevant so far. I don't know if the front-controller is already written or if that is something that still has to be done by me.
I can't get the application to run.
Found the solution. I followed the guidelines installing sf2 in netbeans. Instead of running the application as a local website i used the build-in server option wich gave me access to the cli commands. There i could use the command run server and all of my problems were gone.
Related
Recently I started to use PHPUnit on my project and so far everything works perfectly, I can launch my tests just fine.
But following a potential mishandling on my part when I launch my tests here is the message that appears, preventing me from playing them:
Cannot open file "/tests/bootstrap.php".
FYI, I have not touched a file with this name, I have never heard of it before.
Has anyone ever encountered not opening the file /tests/bootstrap.php? Do you have any idea where it comes from?
Problem solved !
I don't have any special setup, just point it to config/bootstrap.php to let symfony load the standard test environment.
I've got a strange problem going on with Symfony. Today I made brand new project using composer create-project symfony/website-skeleton gall command and right after installation, before doing anything in code I go to the website and the only thing that is said on webprofiler toolbar is "An error occurred while loading the web debug toolbar." I don't even get to see what kind of error is this.
The server I'm running is PHP v. 7.2.3, program is Xampp for Windows.
I thought maybe this default starting page is bugged, so I made some test controller and the error is exactly the same. Have you encountered such problem with latest symfony?
I would never figure it out myself, but adding index.php to browser address resolved the issue.
Much better solution is to use command
composer require symfony/apache-pack
As the .htaccess file is not included in the website-skeleton by default :)
Thanks for pointing me in the right direction guys!
I want to use Symfony 4.x for a new project, I have installed composer and used it to create a new project. My php version is 7.0.10 & I have wamp as well.
In this tutorial (https://symfony.com/doc/master/setup.html), it says after you run the server "Open your browser and navigate to http://localhost:8000/". When I do so, I get a No route found for "GET /" error.
the pictures bellow display what I get as an error more precisely :
as well as
I have installed everything following the guide on their official page. I have seen this problem being discussed on github (https://github.com/symfony/symfony-docs/issues/9178) but I don't understand their "quick fix" nor what they're talking about.
I want to know how to get my project running without that problem.
Thanks for any help
It’s strange but It’s totally normal and the error proved that Symfony is well installed
It’s not a « compile » or « configuration » error it’s just a logical error that means you don’t have route defined at
url / so keep learning and define a route (see doc and you see the result)
Im working on a existing project, which uses symfony to provide web services. I'm new to Symfony technology but I have good experience in Laravel, the project has an issue in JwtAuthenticator.
Symfony\Component\Debug\Exception\ClassNotFoundException
Attempted to load class "JwtAuthenticator" from namespace
Thing is this issue does not occur in windows OS, but while working in linux Ubuntu it occurs, so far what I found is that the cache data seems to trouble, also unable to delete them without changing the folder access permission to 777. But once if it is given full access permission and if the cache folder is emptied then application runs without error, but from the next request it again happens. So if removing files in cache is done then it works.
Here, JwtAuthenticator is used to provide authentication verification
Can anyone help me to solve this.
I built a console app with Symfony Console component. It supposed to be run for 5 hours. But after running 2 hours i have a proc_open(): unable to create pipe Too many open files error in Symfony\Component\Console\Application.php on line 985.
I tried gc_collect_cycles in my loop, but got the same error.
Is this a Symfony Console component bug or i should not run an app for this long (but i have to)?
I had this same error with a Symfony web-app, and restarting PHP resolved it.
I appreciate that you can't do that in the midst of your command's 5-hour run, but maybe doing it immediately beforehand will get PHP in a clean enough state to give you the full 5 hours?
(Also, this post is the only one I found about my problem, so I wanted to add this here in case others have the same issue as me!)
This issue is related to:
https://bugs.php.net/bug.php?id=47396
Apparently you're working on a lot of resources in your app. It's not a Symfony Console bug, it's a PHP bug.
You can use another programming language or modify your program in order to open less files.