]> granicus.if.org Git - php/commitdiff
- Fixed bug #55533 (The -d parameter doesn't work)
authorJérôme Loyet <fat@php.net>
Sun, 9 Oct 2011 14:36:11 +0000 (14:36 +0000)
committerJérôme Loyet <fat@php.net>
Sun, 9 Oct 2011 14:36:11 +0000 (14:36 +0000)
NEWS
sapi/fpm/fpm/fpm_main.c

diff --git a/NEWS b/NEWS
index 6439ab99d7242a98f31fa84ccf4dedd076de36cc..6f298d3b618b8b9231f780345d961437d4157bdd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -75,6 +75,7 @@ PHP                                                                        NEWS
   . Fixed bug #53872 (internal corruption of phar). (Hannes)
 
 - PHP-FPM SAPI:
+  . Fixed bug #55533 (The -d parameter doesn't work). (fat)
   . Implemented FR #52569 (Add the "ondemand" process-manager
     to allow zero children). (fat)
   . Fixed bug #55486 (status show BIG processes number). (fat)
index f432cbd15db7f4cf125874b481f9a8a619a9298f..a0249405acd703cfbb623fa3e33b2ebf0124b6b1 100644 (file)
@@ -1528,6 +1528,7 @@ int main(int argc, char *argv[])
        char *fpm_prefix = NULL;
        char *fpm_pid = NULL;
        int test_conf = 0;
+       int php_information = 0;
 
        fcgi_init();
 
@@ -1638,20 +1639,8 @@ int main(int argc, char *argv[])
                                goto out;
 
                        case 'i': /* php info & quit */
-                               cgi_sapi_module.phpinfo_as_text = 1;
-                               cgi_sapi_module.startup(&cgi_sapi_module);
-                               if (php_request_startup(TSRMLS_C) == FAILURE) {
-                                       SG(server_context) = NULL;
-                                       php_module_shutdown(TSRMLS_C);
-                                       return FAILURE;
-                               }
-                               SG(headers_sent) = 1;
-                               SG(request_info).no_headers = 1;
-                               php_print_info(0xFFFFFFFF TSRMLS_CC);
-                               php_request_shutdown((void *) 0);
-                               fcgi_shutdown();
-                               exit_status = 0;
-                               goto out;
+                               php_information = 1;
+                               break;
 
                        default:
                        case 'h':
@@ -1688,6 +1677,23 @@ int main(int argc, char *argv[])
                }
        }
 
+       if (php_information) {
+               cgi_sapi_module.phpinfo_as_text = 1;
+               cgi_sapi_module.startup(&cgi_sapi_module);
+               if (php_request_startup(TSRMLS_C) == FAILURE) {
+                       SG(server_context) = NULL;
+                       php_module_shutdown(TSRMLS_C);
+                       return FAILURE;
+               }
+               SG(headers_sent) = 1;
+               SG(request_info).no_headers = 1;
+               php_print_info(0xFFFFFFFF TSRMLS_CC);
+               php_request_shutdown((void *) 0);
+               fcgi_shutdown();
+               exit_status = 0;
+               goto out;
+       }
+
        /* No other args are permitted here as there is not interactive mode */
        if (argc != php_optind) {
                cgi_sapi_module.startup(&cgi_sapi_module);