From 65fce7f9504036c561a97168d7759e01755ae31d Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 3 Dec 2014 16:33:05 +0100 Subject: Fixed bug #55541 errors spawn MessageBox, which blocks test automation With that, also fixed bug #68297 (Application Popup provides too few information) as a better error message is provided to the event log. In the second case, the condition for display_startup_error was removed. The condition was added as a fix for bug #30760 which was preventing the MessageBox to appear. When display_startup_error=on, the error will be seen on the console. But when running under a webserver it'll probably get lost, so we need to log it other way into the event log (would be done automatically when message box was used, but that would eventually cause issues of blocked execution). Generally speaking - any MessageBox or other graphical element is a potential issue and that was repeatedly reported. Graphical elements shouldn't be used in the core. Even being a rare one it can cause a bad situation where the server is blocked. Yet some places have to cleaned up. --- main/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/main.c') diff --git a/main/main.c b/main/main.c index 66e4b6e93f..5646264638 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); -- cgit v1.2.1