summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
Diffstat (limited to 'sapi')
-rw-r--r--sapi/apache/mod_php5.c2
-rw-r--r--sapi/apache/php_apache.c2
-rw-r--r--sapi/apache2handler/php_functions.c2
-rw-r--r--sapi/apache_hooks/mod_php5.c2
-rw-r--r--sapi/apache_hooks/php_apache.c2
-rw-r--r--sapi/cgi/cgi_main.c13
-rw-r--r--sapi/cli/php_cli.c8
-rw-r--r--sapi/milter/php_milter.c12
-rw-r--r--sapi/nsapi/nsapi.c2
9 files changed, 20 insertions, 25 deletions
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c
index 25b5ef77cd..2b64270b99 100644
--- a/sapi/apache/mod_php5.c
+++ b/sapi/apache/mod_php5.c
@@ -329,7 +329,7 @@ static void php_apache_request_shutdown(void *dummy)
{
TSRMLS_FETCH();
- php_output_set_status(0 TSRMLS_CC);
+ php_output_set_status(PHP_OUTPUT_DISABLED TSRMLS_CC);
if (AP(in_request)) {
AP(in_request) = 0;
php_request_shutdown(dummy);
diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c
index 2eb9277354..57d6f3b2d6 100644
--- a/sapi/apache/php_apache.c
+++ b/sapi/apache/php_apache.c
@@ -368,7 +368,7 @@ PHP_FUNCTION(virtual)
RETURN_FALSE;
}
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_end_all(TSRMLS_C);
php_header(TSRMLS_C);
if (run_sub_req(rr)) {
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index 32f6b57182..3b275d3a81 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -91,7 +91,7 @@ PHP_FUNCTION(virtual)
}
/* Flush everything. */
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_end_all(TSRMLS_C);
php_header(TSRMLS_C);
/* Ensure that the ap_r* layer for the main request is flushed, to
diff --git a/sapi/apache_hooks/mod_php5.c b/sapi/apache_hooks/mod_php5.c
index aaedb69b80..8e7cd2f292 100644
--- a/sapi/apache_hooks/mod_php5.c
+++ b/sapi/apache_hooks/mod_php5.c
@@ -453,7 +453,7 @@ static void php_apache_request_shutdown(void *dummy)
{
TSRMLS_FETCH();
AP(current_hook) = AP_CLEANUP;
- php_output_set_status(0 TSRMLS_CC);
+ php_output_set_status(PHP_OUTPUT_DISABLED TSRMLS_CC);
SG(server_context) = NULL; /* The server context (request) is invalid by the time run_cleanups() is called */
if(SG(sapi_started)) {
php_request_shutdown(dummy);
diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c
index c0fd59ee07..bbbf415f05 100644
--- a/sapi/apache_hooks/php_apache.c
+++ b/sapi/apache_hooks/php_apache.c
@@ -1734,7 +1734,7 @@ PHP_FUNCTION(virtual)
RETURN_FALSE;
}
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_end_all(TSRMLS_C);
php_header(TSRMLS_C);
if (run_sub_req(rr)) {
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 8b71faa08b..81aafcb154 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -1812,11 +1812,9 @@ consult the installation file that came with this distribution, or visit \n\
case '?':
fcgi_shutdown();
no_headers = 1;
- php_output_startup();
- php_output_activate(TSRMLS_C);
SG(headers_sent) = 1;
php_cgi_usage(argv[0]);
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_end_all(TSRMLS_C);
exit_status = 0;
goto out;
}
@@ -1890,15 +1888,13 @@ consult the installation file that came with this distribution, or visit \n\
if (script_file) {
efree(script_file);
}
- php_output_startup();
- php_output_activate(TSRMLS_C);
SG(headers_sent) = 1;
php_printf("[PHP Modules]\n");
print_modules(TSRMLS_C);
php_printf("\n[Zend Modules]\n");
print_extensions(TSRMLS_C);
php_printf("\n");
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_end_all(TSRMLS_C);
exit_status = 0;
goto out;
@@ -2117,7 +2113,7 @@ consult the installation file that came with this distribution, or visit \n\
if (open_file_for_scanning(&file_handle TSRMLS_CC) == SUCCESS) {
zend_strip(TSRMLS_C);
zend_file_handle_dtor(&file_handle TSRMLS_CC);
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_teardown();
}
return SUCCESS;
break;
@@ -2132,7 +2128,7 @@ consult the installation file that came with this distribution, or visit \n\
goto fastcgi_request_done;
}
zend_file_handle_dtor(&file_handle TSRMLS_CC);
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_teardown();
}
return SUCCESS;
}
@@ -2143,6 +2139,7 @@ consult the installation file that came with this distribution, or visit \n\
open_file_for_scanning(&file_handle TSRMLS_CC);
zend_indent();
zend_file_handle_dtor(&file_handle TSRMLS_CC);
+ php_output_teardown();
return SUCCESS;
break;
#endif
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index bf272b4400..8856bf8e6c 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -822,7 +822,7 @@ int main(int argc, char *argv[])
}
request_started = 1;
php_cli_usage(argv[0]);
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_end_all(TSRMLS_C);
exit_status=0;
goto out;
@@ -832,7 +832,7 @@ int main(int argc, char *argv[])
}
request_started = 1;
php_print_info(0xFFFFFFFF TSRMLS_CC);
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_end_all(TSRMLS_C);
exit_status=0;
goto out;
@@ -846,7 +846,7 @@ int main(int argc, char *argv[])
php_printf("\n[Zend Modules]\n");
print_extensions(TSRMLS_C);
php_printf("\n");
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_end_all(TSRMLS_C);
exit_status=0;
goto out;
@@ -869,7 +869,7 @@ int main(int argc, char *argv[])
#endif
get_zend_version()
);
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_end_all(TSRMLS_C);
exit_status=0;
goto out;
diff --git a/sapi/milter/php_milter.c b/sapi/milter/php_milter.c
index 11724c425c..6451864557 100644
--- a/sapi/milter/php_milter.c
+++ b/sapi/milter/php_milter.c
@@ -1040,11 +1040,10 @@ int main(int argc, char *argv[])
while ((c=ap_php_getopt(argc, argv, OPTSTRING))!=-1) {
switch (c) {
case '?':
- php_output_startup();
- php_output_activate(TSRMLS_C);
+ php_output_tearup();
SG(headers_sent) = 1;
php_milter_usage(argv[0]);
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_teardown();
exit(1);
break;
}
@@ -1088,11 +1087,10 @@ int main(int argc, char *argv[])
case 'h': /* help & quit */
case '?':
- php_output_startup();
- php_output_activate(TSRMLS_C);
+ php_output_tearup();
SG(headers_sent) = 1;
php_milter_usage(argv[0]);
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_teardown();
exit(1);
break;
@@ -1112,7 +1110,7 @@ int main(int argc, char *argv[])
SG(headers_sent) = 1;
SG(request_info).no_headers = 1;
php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2010 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_teardown();
exit(1);
break;
diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c
index e2048fd98a..0b5f005e44 100644
--- a/sapi/nsapi/nsapi.c
+++ b/sapi/nsapi/nsapi.c
@@ -347,7 +347,7 @@ PHP_FUNCTION(nsapi_virtual)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include uri '%s' - Sub-requests do not work with zlib.output_compression", uri);
RETURN_FALSE;
} else {
- php_end_ob_buffers(1 TSRMLS_CC);
+ php_output_end_all(TSRMLS_C);
php_header(TSRMLS_C);
/* do the sub-request */