This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Error occurred while loading the web debug toolbar!

Discuss installing Symfony 2 here

Error occurred while loading the web debug toolbar!

by amidamaru » Wed Apr 29, 2015 3:55 am

Hi all,
I'm a linux and symfony newbie. I encounter a problem.
I try to create new project from official document guide http://symfony.com/doc/current/quick_tour/the_big_picture.html and try to configure a traditional web server - nginx.
I setup a virtual host file called "symdemo.local" like this:
Code: Select all
server {
    server_name symdemo.com www.symdemo.local;
    root /var/www/html/symdemo.local/web;

    location / {
        # try to serve file directly, fallback to app.php
        try_files $uri /app.php$is_args$args;
    }
    # DEV
    # This rule should only be placed on your development environment
    # In production, don't include this and don't deploy app_dev.php or config.php
    location ~ ^/(app_dev|config)\.php(/|$) {
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
    # PROD
    location ~ ^/app\.php(/|S) {
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS off;
        include fastcgi_params;
        # Prevents URIs that include the front controller. This will 404:
        # http://domain.tld/app.php/some-path
        # Remove the internal directive to allow URIs like this
        internal;
    }

    error_log /var/log/nginx/symdemo.local/symdemo_error.log;
    access_log /var/log/nginx/symdemo.local/symdemo_access.log;
}

So I don't know why when I access to page http://localhost/symdemo.local/web/app_dev.php, it works with alert error "An error occurred while loading the web debug toolbar (404: Not Found)".
And I get error.log:
Code: Select all
[error] 1204#0: *6 open() "/var/www/html/symdemo.local/web/app_dev.php/_wdt/6a3fae" failed (20: Not a directory), client: 127.0.0.1, server: localhost, request: "GET /symdemo.local/web/app_dev.php/_wdt/6a3fae HTTP/1.1", host: "localhost", referrer: "http://localhost/symdemo.local/web/app_dev.php"


I don't know to fix this problem, sorry because I'm a linux newbie. I tried to google search and meet so much questions like this. But I still don't get a correct answer. :(

And another problem is when I access to page by virtual host way like this http://symdemo.local, it's not working and returned 403 forrbidden page.
I put symdemo.local into /etc/hosts file, but nothing occurs.

I'm so sad because 2 ways returned errors and I still don't find anyone which can show me a solution.

Please help me if you can! Thank all.
amidamaru
Junior Member
 
Posts: 1
Joined: Wed Apr 29, 2015 3:17 am