diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index 3823efd4130..b56277b16ab 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -29,6 +29,10 @@ #include "zend_ini_scanner.h" #include "zend_extensions.h" +#ifdef PHP_WIN32 +#include "win32/syslog.h" +#endif + #define YYERROR_VERBOSE #define YYSTYPE zval @@ -179,10 +183,9 @@ static void ini_error(char *msg) if (CG(ini_parser_unbuffered_errors)) { #ifdef PHP_WIN32 - MessageBox(NULL, error_buf, "PHP Error", MB_OK|MB_TOPMOST|0x00200000L); -#else - fprintf(stderr, "PHP: %s", error_buf); + syslog(LOG_ALERT, "PHP: %s (%s)", error_buf, GetCommandLine()); #endif + fprintf(stderr, "PHP: %s", error_buf); } else { zend_error(E_WARNING, "%s", error_buf); } diff --git a/main/main.c b/main/main.c index 66e4b6e93fb..5646264638e 100644 --- a/main/main.c +++ b/main/main.c @@ -1066,8 +1066,8 @@ static void php_error_cb(int type, const char *error_filename, const uint error_ if (!module_initialized || PG(log_errors)) { char *log_buffer; #ifdef PHP_WIN32 - if ((type == E_CORE_ERROR || type == E_CORE_WARNING) && PG(display_startup_errors)) { - MessageBox(NULL, buffer, error_type_str, MB_OK|ZEND_SERVICE_MB_STYLE); + if (type == E_CORE_ERROR || type == E_CORE_WARNING) { + syslog(LOG_ALERT, "PHP %s: %s (%s)", error_type_str, buffer, GetCommandLine()); } #endif spprintf(&log_buffer, 0, "PHP %s: %s in %s on line %d", error_type_str, buffer, error_filename, error_lineno);