--- main.c 2006-11-10 13:31:18.000000000 +0000 +++ main.c.new 2006-11-17 15:48:43.953125000 +0000 @@ -1005,12 +1005,18 @@ struct tm *ta, tmbuf; time_t curtime; char *datetime_str, asctimebuf[52]; + char script_name[132]; time(&curtime); ta = php_localtime_r(&curtime, &tmbuf); datetime_str = php_asctime_r(ta, asctimebuf); datetime_str[strlen(datetime_str)-1]=0; /* get rid of the trailing newline */ - fprintf(stderr, "[%s] Script: '%s'\n", datetime_str, SAFE_FILENAME(SG(request_info).path_translated)); + snprintf(script_name, 132,"[%s] Script: '%s'\n", datetime_str, SAFE_FILENAME(SG(request_info).path_translated)); +# if defined(PHP_WIN32) + OutputDebugString(script_name); +# else + fprintf(stderr, "%s", script_name); +# endif } break; }