summaryrefslogtreecommitdiff
path: root/sapi/cgi
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2000-05-22 22:49:18 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2000-05-22 22:49:18 +0000
commit22bfb799a70bf5c671a0b2b7bd96e1cece814602 (patch)
tree299c4fd6f5470830bf6c7310b1d5c5f6d12a81b5 /sapi/cgi
parent8a3edf2cab84dacf4d87a4c01876bd78c4d81b71 (diff)
downloadphp-git-22bfb799a70bf5c671a0b2b7bd96e1cece814602.tar.gz
-i, -v, -h and -? execution pathes didn't flush the output buffer
on exit, resultiong in no output at all when "output-buffering=On" ( BUG id#3420 )
Diffstat (limited to 'sapi/cgi')
-rw-r--r--sapi/cgi/cgi_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 21549e2a1c..1be7665563 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -446,9 +446,11 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
php_ini_path = strdup(ap_php_optarg); /* intentional leak */
break;
case '?':
+ no_headers = 1;
php_output_startup();
SG(headers_sent) = 1;
php_cgi_usage(argv[0]);
+ php_end_ob_buffering(1);
exit(1);
break;
}
@@ -487,6 +489,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
no_headers = 1;
break;
case 'v':
+ no_headers = 1;
if (!cgi_started) {
if (php_request_startup(CLS_C ELS_CC PLS_CC SLS_CC)==FAILURE) {
php_module_shutdown();
@@ -497,6 +500,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
SG(headers_sent) = 1;
}
php_printf("%s\n", PHP_VERSION);
+ php_end_ob_buffering(1);
exit(1);
break;
case 'i':
@@ -531,10 +535,12 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
CG(extended_info) = 1;
break;
case 'h':
- case '?':
+ case '?':
+ no_headers = 1;
php_output_startup();
SG(headers_sent) = 1;
php_cgi_usage(argv[0]);
+ php_end_ob_buffering(1);
exit(1);
break;
case 'd':