Debugging fastcgi parameters

Igor Sysoev is at rambler-co.ru
Fri Mar 14 19:25:46 MSK 2008


On Fri, Mar 14, 2008 at 10:16:39AM -0400, Ian M. Evans wrote:

> As a quick side thread to "Problems with fastcgi php migration":
> 
> Is there a way to see the content of all the fastcgi_params getting 
> passed to the fastcgi server? The standard debug log doesn't give it and 
> I'm wondering if that info might help.

The attached patch does it.


-- 
Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
Index: src/http/modules/ngx_http_fastcgi_module.c
===================================================================
--- src/http/modules/ngx_http_fastcgi_module.c	(revision 1261)
+++ src/http/modules/ngx_http_fastcgi_module.c	(working copy)
@@ -639,6 +639,11 @@
                 code((ngx_http_script_engine_t *) &e);
             }
             e.ip += sizeof(uintptr_t);
+
+            ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+                           "fastcgi param: \"%*s: %*s\"",
+                           key_len, e.pos - (key_len + val_len),
+                           val_len, e.pos - val_len);
         }
 
         b->last = e.pos;


More information about the nginx mailing list