diff --git a/main/main.c b/main/main.c index 2e0802d3b3b00..ad5ef2902f4af 100644 --- a/main/main.c +++ b/main/main.c @@ -2107,7 +2107,7 @@ zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additi /* start up winsock services */ if (WSAStartup(wVersionRequested, &wsaData) != 0) { - php_printf("\nwinsock.dll unusable. %d\n", WSAGetLastError()); + fprintf(stderr, "\nwinsock.dll unusable. %d\n", WSAGetLastError()); return FAILURE; } php_win32_signal_ctrl_handler_init(); @@ -2166,7 +2166,7 @@ zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additi * (this uses configuration parameters from php.ini) */ if (php_init_stream_wrappers(module_number) == FAILURE) { - php_printf("PHP: Unable to initialize stream url wrappers.\n"); + fprintf(stderr, "PHP: Unable to initialize stream url wrappers.\n"); return FAILURE; } @@ -2180,7 +2180,7 @@ zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additi /* startup extensions statically compiled in */ if (php_register_internal_extensions_func() == FAILURE) { - php_printf("Unable to start builtin modules\n"); + fprintf(stderr, "Unable to start builtin modules\n"); return FAILURE; } diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 2f936a39b714f..5e147bfc48f0b 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -574,7 +574,7 @@ static zend_result cli_seek_file_begin(zend_file_handle *file_handle, char *scri { FILE *fp = VCWD_FOPEN(script_file, "rb"); if (!fp) { - php_printf("Could not open input file: %s\n", script_file); + fprintf(stderr, "Could not open input file: %s\n", script_file); return FAILURE; } diff --git a/sapi/cli/tests/007.phpt b/sapi/cli/tests/007.phpt index 2de5880a89f74..6f27586e27d96 100644 --- a/sapi/cli/tests/007.phpt +++ b/sapi/cli/tests/007.phpt @@ -45,8 +45,8 @@ string(81) " " -string(33) "Could not open input file: wrong -" +Could not open input file: wrong +NULL string(43) " " Done diff --git a/sapi/cli/tests/008.phpt b/sapi/cli/tests/008.phpt index 5edd40c84fefd..a8b205056300e 100644 --- a/sapi/cli/tests/008.phpt +++ b/sapi/cli/tests/008.phpt @@ -41,6 +41,6 @@ Stack trace: #0 {main} thrown in %s on line %d " -string(33) "Could not open input file: wrong -" +Could not open input file: wrong +NULL Done diff --git a/sapi/cli/tests/011.phpt b/sapi/cli/tests/011.phpt index bd61b260f5a94..d45cb94a08c71 100644 --- a/sapi/cli/tests/011.phpt +++ b/sapi/cli/tests/011.phpt @@ -50,8 +50,8 @@ echo "Done\n"; --EXPECTF-- string(%d) "No syntax errors detected in %s011.test.php " -string(40) "Could not open input file: some.unknown -" +Could not open input file: some.unknown +NULL string(%d) " Parse error: %s expecting %s{%s in %s on line %d Errors parsing %s011.test.php diff --git a/sapi/cli/tests/014.phpt b/sapi/cli/tests/014.phpt index 09f69faa521b3..734eef0c2ce95 100644 --- a/sapi/cli/tests/014.phpt +++ b/sapi/cli/tests/014.phpt @@ -40,6 +40,6 @@ string(1478) "
<?php
$test 
"var"//var
/* test class */
class test {
    private 
$var = array();

    public static function 
foo(Test $arg) {
        echo 
"hello";
        
var_dump($this);
    }
}

$o = new test;
?>
" -string(35) "Could not open input file: unknown -" +Could not open input file: unknown +NULL Done diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index 46ad97f2bf335..9c2f4e1344232 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -1347,7 +1347,7 @@ static int cli_main( int argc, char * argv[] ) php_request_shutdown( NULL ); } } else { - php_printf("Could not open input file: %s.\n", *p); + fprintf(stderr, "Could not open input file: %s.\n", *p); } } else { cli_usage();