summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorJérôme Loyet <fat@php.net>2011-10-09 14:36:11 +0000
committerJérôme Loyet <fat@php.net>2011-10-09 14:36:11 +0000
commitd24cd92a22131a613e8140020020da5458506013 (patch)
treecec9c7b2ac21cb5bcc1832443d59bde9efb14bb9 /sapi
parent7e4b9800f48dc43e4d65afb70fcca171a7ac0def (diff)
downloadphp-git-d24cd92a22131a613e8140020020da5458506013.tar.gz
- Fixed bug #55533 (The -d parameter doesn't work)
Diffstat (limited to 'sapi')
-rw-r--r--sapi/fpm/fpm/fpm_main.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 752a8c85d4..a9298e7573 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1521,6 +1521,7 @@ int main(int argc, char *argv[])
char *fpm_prefix = NULL;
char *fpm_pid = NULL;
int test_conf = 0;
+ int php_information = 0;
#ifdef HAVE_SIGNAL_H
#if defined(SIGPIPE) && defined(SIG_IGN)
@@ -1632,20 +1633,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':
@@ -1682,6 +1671,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 no interactive mode */
if (argc != php_optind) {
cgi_sapi_module.startup(&cgi_sapi_module);