diff -cr php4-200109061035/main/main.c php4/main/main.c *** php4-200109061035/main/main.c Fri Aug 31 09:27:34 2001 --- php4/main/main.c Thu Sep 6 13:56:47 2001 *************** *** 261,268 **** STD_PHP_INI_ENTRY("user_dir", NULL, PHP_INI_SYSTEM, OnUpdateStringUnempty, user_dir, php_core_globals, core_globals) STD_PHP_INI_ENTRY("variables_order", NULL, PHP_INI_ALL, OnUpdateStringUnempty, variables_order, php_core_globals, core_globals) ! STD_PHP_INI_ENTRY("error_append_string", NULL, PHP_INI_ALL, OnUpdateStringUnempty, error_append_string, php_core_globals, core_globals) ! STD_PHP_INI_ENTRY("error_prepend_string", NULL, PHP_INI_ALL, OnUpdateStringUnempty, error_prepend_string, php_core_globals, core_globals) PHP_INI_ENTRY("SMTP", "localhost",PHP_INI_ALL, NULL) PHP_INI_ENTRY("browscap", NULL, PHP_INI_SYSTEM, NULL) --- 261,268 ---- STD_PHP_INI_ENTRY("user_dir", NULL, PHP_INI_SYSTEM, OnUpdateStringUnempty, user_dir, php_core_globals, core_globals) STD_PHP_INI_ENTRY("variables_order", NULL, PHP_INI_ALL, OnUpdateStringUnempty, variables_order, php_core_globals, core_globals) ! STD_PHP_INI_ENTRY("error_append_string", NULL, PHP_INI_ALL, OnUpdateString, error_append_string, php_core_globals, core_globals) ! STD_PHP_INI_ENTRY("error_prepend_string", NULL, PHP_INI_ALL, OnUpdateString, error_prepend_string, php_core_globals, core_globals) PHP_INI_ENTRY("SMTP", "localhost",PHP_INI_ALL, NULL) PHP_INI_ENTRY("browscap", NULL, PHP_INI_SYSTEM, NULL) diff -cr php4-200109061035/sapi/cgi/cgi_main.c php4/sapi/cgi/cgi_main.c *** php4-200109061035/sapi/cgi/cgi_main.c Tue Aug 14 19:25:14 2001 --- php4/sapi/cgi/cgi_main.c Thu Sep 6 14:25:35 2001 *************** *** 80,86 **** extern char *ap_php_optarg; extern int ap_php_optind; ! #define OPTSTRING "aCc:d:ef:g:hilmnqs?vz:" static int _print_module_info(zend_module_entry *module, void *arg TSRMLS_DC) { --- 80,86 ---- extern char *ap_php_optarg; extern int ap_php_optind; ! #define OPTSTRING "aCc:d:ef:g:hilmnqsS?vz:" static int _print_module_info(zend_module_entry *module, void *arg TSRMLS_DC) { *************** *** 249,254 **** --- 249,255 ---- php_printf("Usage: %s [-q] [-h] [-s [-v] [-i] [-f ] | { [args...]}\n" " -q Quiet-mode. Suppress HTTP Header output.\n" + " -S Shell-mode. Suppress error html & buffering. Implies `-q'\n" " -s Display colour syntax highlighted source.\n" " -f Parse . Implies `-q'\n" " -v Version number\n" *************** *** 606,611 **** --- 607,621 ---- case 's': /* generate highlighted HTML from source */ behavior=PHP_MODE_HIGHLIGHT; + break; + + case 'S': /* use shell scripting setup with no HTML and no output buffering */ + zend_alter_ini_entry("html_errors", strlen("html_errors")+1, "Off", strlen("Off"), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); + zend_alter_ini_entry("error_prepend_string", strlen("error_prepend_string")+1, NULL, 0, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); + zend_alter_ini_entry("error_append_string", strlen("error_append_string")+1, NULL, 0, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); + zend_alter_ini_entry("output_buffering", strlen("output_buffering")+1, "Off", strlen("Off"), PHP_INI_SYSTEM|PHP_INI_PERDIR, PHP_INI_STAGE_ACTIVATE); + zend_alter_ini_entry("output_handler", strlen("output_handler")+1, NULL, 0, PHP_INI_SYSTEM|PHP_INI_PERDIR, PHP_INI_STAGE_ACTIVATE); + no_headers = 1; break; case 'v': /* show php version & quit */