Welcome! Log In Create A New Profile

Advanced

Tips for debugging fcgi

Marcos Neves
May 27, 2010 11:08PM
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 Neves
+55 44 9918-8488

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Tips for debugging fcgi

Marcos Neves May 27, 2010 11:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 213
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready