From 835c0b022c0e9731503a881f180eb266036a0c38 Mon Sep 17 00:00:00 2001 From: George Wang Date: Wed, 30 Jul 2008 00:07:29 +0000 Subject: make it compatible with PHP 6.0 using new php output API --- sapi/litespeed/lsapi_main.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'sapi') diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index 289a6ffb70..7f3cd7ef9b 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -431,7 +431,11 @@ static void cli_usage( TSRMLS_D ) php_output_startup(); php_output_activate(TSRMLS_C); php_printf( usage ); - php_end_ob_buffers(1 TSRMLS_CC); +#ifdef PHP_OUTPUT_NEWAPI + php_output_end_all(TSRMLS_C); +#else + php_end_ob_buffers(1 TSRMLS_CC); +#endif } static int parse_opt( int argc, char * argv[], int *climode, @@ -529,7 +533,11 @@ static int cli_main( int argc, char * argv[] ) case 'i': if (php_request_startup(TSRMLS_C) != FAILURE) { php_print_info(0xFFFFFFFF TSRMLS_CC); - php_end_ob_buffers(1 TSRMLS_CC); +#ifdef PHP_OUTPUT_NEWAPI + php_output_end_all(TSRMLS_C); +#else + php_end_ob_buffers(1 TSRMLS_CC); +#endif php_request_shutdown( NULL ); } ret = 1; @@ -541,7 +549,11 @@ static int cli_main( int argc, char * argv[] ) #else php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2004 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #endif - php_end_ob_buffers(1 TSRMLS_CC); +#ifdef PHP_OUTPUT_NEWAPI + php_output_end_all(TSRMLS_C); +#else + php_end_ob_buffers(1 TSRMLS_CC); +#endif php_request_shutdown( NULL ); } ret = 1; -- cgit v1.2.1