Missing stack trace using Symfony2 Nginx and PHP-FPM

I recently switched from Apache / fastCgi to a Nginx / FPM configuration. So far, everything is working fine, with the exception of the Symfony2 Stack trace.

When I use Nginx, I get normal error output. When I use Apache, I get StackTrace decorated output for Symfony2. My developers are starting to kick my ass due to the lack of StackTrace. I looked through all the configuration files that I could imagine (php.ini, vhost config, fpm config), and it seems that the error does not occur. Probably some of you could give me a hint.

Nginx-Vhost Configuration:

server { listen 80; root /var/www/mirco/htdocs/public/sp2/web; server_name api.sp2.mirco.esg.com; error_log /var/www/mirco/logs/error-sp_api.log; access_log /var/www/mirco/logs/access-sp_api.log; # strip api.php/ prefix if it is present rewrite ^/api\.php/?(.*)$ /$1 permanent; # remove trailing slashes rewrite ^/(.*)/$ /$1 permanent; location / { index api.php; try_files $uri @rewriteapp; } location @rewriteapp { rewrite ^(.*)$ /api.php/$1 last; } location ~ ^/(t|api|api_dev)\.php(/|$) { fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_pass unix:/var/run/php-fpm.mirco.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SYMFONY_ENV api_mirco; include fastcgi_params; } } 

Nginx-Main Configuration

  user www-data; worker_processes 4; pid /var/run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 300; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; rewrite_log on; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; ## # nginx-naxsi config ## # Uncomment it if you installed nginx-naxsi ## #include /etc/nginx/naxsi_core.rules; ## # nginx-passenger config ## # Uncomment it if you installed nginx-passenger ## #passenger_root /usr; #passenger_ruby /usr/bin/ruby; perl_modules perl/lib; perl_set $uri_lowercase 'sub { my $r = shift; my $uri = $r->uri; $uri = lc($uri); return $uri; }'; ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; } 
+4
source share
1 answer

Check it out: http://wiki.nginx.org/Symfony

and potentially try to change this:

 ini_set('display_errors', 'On'); 

better to change it in php.ini

0
source