Tips for debugging fcgi

I found a easy way to debugging fcgi.
easy_install flup
wget http://gist.github.com/416675.txt -O debug_fcgi.py
chmod +x debug_fcgi.py

run using debug_fcgi.py &

remender to stop any other server running on port 9000 or change the

port number on debug_fcgi.py.

sample nginx configuration

location ~ ^(.+\.php)(.*)$ {
  fastcgi_pass 127.0.0.1:9000;
  fastcgi_split_path_info ^(.+\.php)(.*)$;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  fastcgi_param PATH_INFO $fastcgi_path_info;
  fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  fastcgi_param SERVER_NAME $http_host;
  fastcgi_param SERVER_PORT $server_port;
  fastcgi_param SERVER_PROTOCOL $server_protocol;
  fastcgi_param REQUEST_METHOD $request_method;
}

now you can see all env variables and check if its all ok.

What are the required variables that PHP need to work? SCRIPT_FILENAME
only?

fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
works only when I set cgi.fix_pathinfo=1 on php.ini
Is it a good practice?

Marcos N.
+55 44 9918-8488