summaryrefslogtreecommitdiff
path: root/sapi/cgi/cgi_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/cgi/cgi_main.c')
-rw-r--r--sapi/cgi/cgi_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index c8dfec0f95..4c78fcafec 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -884,7 +884,6 @@ static int sapi_cgi_activate(TSRMLS_D)
} else {
doc_root = getenv("DOCUMENT_ROOT");
}
-
/* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */
if (doc_root) {
doc_root_len = strlen(doc_root);
@@ -1956,7 +1955,11 @@ consult the installation file that came with this distribution, or visit \n\
}
if (bindpath) {
- fcgi_fd = fcgi_listen(bindpath, 128);
+ int backlog = 128;
+ if (getenv("PHP_FCGI_BACKLOG")) {
+ backlog = atoi(getenv("PHP_FCGI_BACKLOG"));
+ }
+ fcgi_fd = fcgi_listen(bindpath, backlog);
if (fcgi_fd < 0) {
fprintf(stderr, "Couldn't create FastCGI listen socket on port %s\n", bindpath);
#ifdef ZTS