php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55541 errors spawn MessageBox, which blocks test automation
Submitted: 2011-08-30 20:21 UTC Modified: 2014-12-03 15:02 UTC
Votes:4
Avg. Score:2.2 ± 0.8
Reproduced:0 of 1 (0.0%)
From: yaauie@php.net Assigned:
Status: Closed Package: Output Control
PHP Version: trunk-SVN-2011-08-30 (snap) OS: Win32
Private report: No CVE-ID: None
 [2011-08-30 20:21 UTC] yaauie@php.net
Description:
------------
Calls to the Win32 API MessageBox block automated testing. When the automation 
is spawned by a timed script, that script does not have access to the UI to 
close these messages.

3 places where MessageBox is called:

Zend/zend_ini_parser.y:179 - instead of printing an INI parse error to stderr, 
*always* when PHP_WIN32 is defined. This means that the test suite does not 
catch the error on Windows machines (example parse error directive `php -n -d 
foo="a=href"`) and execution of automated tests is blocked until a user can 
click through.
 - example 

main/main.c:984 - in addition to other logging, but only if 
display_startup_errors is true and the error type is either E_CORE_WARNING or 
E_CORE_ERROR.
 - since display_startup_errors is set to true by the testing suite (and is 
required for many tests to pass), I cannot disable it. Perhaps a new ini 
directive should be created instead of having this one overloaded?

sapi/cgi/cgi_main.c:1768 - only when PHP_DEBUG is defined. I don't have a big 
problem with this, since it is debug code, but perhaps it too could be governed 
by an ini directive.

Test script:
---------------
pass a deliberately-defective ini directive:

`php -n -d a=b=c -v`


Expected result:
----------------
--STDERR--
php: syntax error, unexpected '=' in Unknown on line 7
--STDOUT--
PHP 5.5.0-dev (cli) (built: Aug 30 2011 18:14:14)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2011 Zend Technologies


Actual result:
--------------
--BLOCKING-MESSAGEBOX--
---------------------------
PHP Error
---------------------------
syntax error, unexpected '=' in Unknown on line 7

---------------------------
OK   
---------------------------
--STDERR--(nothing)
--STDOUT--
PHP 5.5.0-dev (cli) (built: Aug 30 2011 18:14:14)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2011 Zend Technologies

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-12-03 15:02 UTC] ab@php.net
See also bug #30760. While not directly related, the same issue with MessageBox blocking execution.
 [2014-12-03 15:50 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=65fce7f9504036c561a97168d7759e01755ae31d
Log: Fixed bug #55541 errors spawn MessageBox, which blocks test automation
 [2014-12-03 15:50 UTC] ab@php.net
-Status: Open +Status: Closed
 [2014-12-05 07:00 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=65fce7f9504036c561a97168d7759e01755ae31d
Log: Fixed bug #55541 errors spawn MessageBox, which blocks test automation
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC