From: Derick Rethans Date: Fri, 30 May 2003 17:03:10 +0000 (+0000) Subject: - Added a "DEBUG" qualifier to 'php -v's version output, and made the CGI X-Git-Tag: BEFORE_FD_REAPPLY~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59b59d26516d93852f5193ba1211b216293010b7;p=php - Added a "DEBUG" qualifier to 'php -v's version output, and made the CGI version statement look the same as the CLI version. (Derick) --- diff --git a/NEWS b/NEWS index bda30b93a0..dc94fa23d8 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP 4 NEWS - Added new command line parameters -B, -F, -R and -E which allow to process stdin line by line (See 'php -h' or 'man php' for more). (Marcus) - Added DBA handler 'inifile' to support ini files. (Marcus) +- Added a "DEBUG" qualifier to 'php -v's version output, and made the CGI + version statement look the same as the CLI version. (Derick) - Fixed bug #23898 (Proper handling of NULLs in odbc_result, odbc_fetch_into and odbc_result_all). (Ilia) - Fixed bug #23897 (Fixed a check for mbfilter_ru.h). (aleks@m2media.ru, Ilia) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index c4eb1db805..2173952ff8 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1367,7 +1367,11 @@ consult the installation file that came with this distribution, or visit \n\ SG(headers_sent) = 1; SG(request_info).no_headers = 1; } - php_printf("PHP %s (%s), Copyright (c) 1997-2003 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +#if ZEND_DEBUG + php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2003 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); +#else + php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2003 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); +#endif php_end_ob_buffers(1 TSRMLS_CC); exit(1); break; diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index b7472024f5..22f90f825e 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -655,8 +655,12 @@ int main(int argc, char *argv[]) case 'v': /* show php version & quit */ if (php_request_startup(TSRMLS_C)==FAILURE) { goto err; - } + } +#if ZEND_DEBUG + php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2003 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); +#else php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2003 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); +#endif php_end_ob_buffers(1 TSRMLS_CC); exit_status=1; goto out;