I am getting this error message when try to open
/app_dev.php
An error occurred while loading the web debug toolbar (404: Not Found).
Do you want to open the profiler?
When I click ok, I am getting then the error:
app_dev.php/_profiler/5053258a822e1
and
404 Not found
I am using nginx
Thank you very much for your help.
EDIT: Here is the error log:
[error] 18369#0: *9 open() "/var/www/Symfony/web/app_dev.php/_wdt/5056f875afc98" failed (20: Not a directory), client: 127.0.0.1, server: symfony, request: "GET /app_dev.php/_wdt/5056f875afc98 HTTP/1.1", host: "symfony", referrer: "http://symfony/app_dev.php"
[error] 18369#0: *9 open() "/var/www/Symfony/web/404" failed (2: No such file or directory), client: 127.0.0.1, server: symfony, request: "GET /app_dev.php/_wdt/5056f875afc98 HTTP/1.1", host: "symfony", referrer: "http://symfony/app_dev.php"
EDIT 2:
When i try to access app_dev.php the page opens but without the toolbar and when I try with app_dev.php/ I am getting the
**Oops! An Error Occurred
The server returned a "404 Not Found".
Something is broken. Please e-mail us at [email] and let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused. **
error.
I have found the solution (more or less). I took another existing Symfony project and everything works fine now. I realy don't know why the Symfony standard release is not working in my case... If somebady needs the empty symfony project, I can upload the archive.
EDIT: here is the template of the working Symfony 2.0 : http://www.megafileupload.com/en/file/372986/Symfony-tpl-zip.html
I had the same error, but I found out that the message was output when I typed
app_dev.php/
but not when requestingapp_dev.php
(Notice the trailing slash/
).I think it has to do with the Router, but Its just an educated guess
To display web debug toolbar in developer mode in Symfony2 page should have valid HTML.
I know this isn't exactly what you asked but might help future people who search for this issue, like @yvoyer suggested, my issue was the trailing slash too, my server used nginx and fpm, and in nginx // does not euqal /, so i had to do a bit of fixes on my virtual host conf and it worked fine after that. I'll just paste the conf for whoever needs it, or suggests a better one.
please try paying attention to your .htaccess, I had this problem too and I fixed mine.
My error was related to Nginx configuration (using symfony 3.1), and I just edited the recommended config for Nginx from Symfony:
http://symfony.com/doc/current/setup/web_server_configuration.html
So, maybe it was because of symlinks, I don't know.
I copied a small part to Nginx Default config and edited to match all .php:
I would recommend sticking to Symfony recommendation for a production server.