Symfony 2.4: An error occurred while loading the web debug toolbar (404: not found)

I just downloaded a new copy of Symfony 2.4.1 on Debian 7.3.

The URL / Symfony / web / config.php opens correctly, but when I go to Configure, I get:

The requested URL /Symfony/web/app_dev.php/_configurator/ was not found on this server. 

If I have a workaround and open the / Symfony / web / app _dev.php page is displayed, but a pop-up message appears:

 An error occurred while loading the web debug toolbar (404: Not Found) Do you want to open the profiler? 

If I accept, I get:

 The requested URL /Symfony/web/app_dev.php/_profiler/54a8bf was not found on this server. 

In other matters (for example, Symfony 2: 404 Not Found Error trying to open / app _dev.php ), people are advised to bother with the .htaccess file. I even tried to remove it, but it did not affect.

The Apache log file shows:

 File does not exist: /var/www/Symfony/web/app_dev.php/_wdt/54a8bf, referer: http://wwwtest.di.unipi.it/Symfony/web/app_dev.php File does not exist: /var/www/Symfony/web/app_dev.php/_profiler/54a8bf 

Thus, it seems that routing to any internal URL is out of order, despite the fact that the correct routing seems to be in place:

 > app/console router:debug [router] Current routes Name Method Scheme Host Path _wdt ANY ANY ANY /_wdt/{token} _profiler_home ANY ANY ANY /_profiler/ _configurator_home ANY ANY ANY /_configurator/ ... 
+6
source share
4 answers

I changed memory_limit in /etc/php5/fpm/php.ini to 512Mb and the debug toolbar started working.

Found solution for me here

+2
source

The solution for me was to update the app_dev.php file so that it looked like a file in the Symfony2 repository

Pay attention to the used Debug class. This was not used in older versions of symfony. I updated this file and a javascript warning appears.

 <?php use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Debug\Debug; // If you don't want to setup permissions the proper way, just uncomment the following PHP line // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information //umask(0000); // This check prevents access to debug front controllers that are deployed by accident to production servers. // Feel free to remove this, extend it, or make something more sophisticated. /* if (isset($_SERVER['HTTP_CLIENT_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1')) ) { header('HTTP/1.0 403 Forbidden'); exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); } */ $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; Debug::enable(); require_once __DIR__.'/../app/AppKernel.php'; $kernel = new AppKernel('dev', true); $kernel->loadClassCache(); $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send(); $kernel->terminate($request, $response); 
+1
source

Is there the following in web / app_dev.php? The line below fixed this for me.

 $kernel->terminate($request, $response); 
0
source

The Apache DirectoryIndex app.php does the tricks for me. I put it in apache vhost conf with AllowOverride None to prevent overriding with .htacces .

I hope for this help.

0
source

All Articles