php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30760 php hangs when extension does not exist
Submitted: 2004-11-11 12:05 UTC Modified: 2005-12-07 00:33 UTC
Votes:4
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: Claus-Werner dot Lermen at zf dot com Assigned: dmitry
Status: Closed Package: IIS related
PHP Version: 5CVS, 4CVS (2005-04-30) OS: Windows 2000/2003
Private report: No CVE-ID:
 [2004-11-11 12:05 UTC] Claus-Werner dot Lermen at zf dot com
Description:
------------
php hangs when it tries to load an non existing extension. 
This happens no matter if cgi or ISAPI.  The effect is most dramatic, if php runs als ISAPI Filter; then it is no longer possible to stop IIS. When running as cgi, the cgi timeout will evetually clean up the situation.
A small typo in php.ini can thus make an webserver unavailable - which I would consider a bug.
When I call php.exe from the commandline, a message box with an errormessage pops up (... unable to load dynamic library ...)! If php tries to to the same while running without a screen, could this cause the observed behaviour?
I tried several php Version up to 5.02 - they all do the same!

Reproduce code:
---------------
any php code

Expected result:
----------------
php writes an error message!

Actual result:
--------------
php hange when running without a screen

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-04 11:22 UTC] programmer at bardware dot de
Hi,

I'm a PHP user too, I can only tell from my experience and of how I understand the sources of PHP.

In the PHP source-distribution there is a file main.c
It reads:

if (!module_initialized || PG(log_errors)) {
char *log_buffer;

#ifdef PHP_WIN32
if (type==E_CORE_ERROR || type==E_CORE_WARNING) {
MessageBox(NULL, buffer, error_type_str, MB_OK|ZEND_SERVICE_MB_STYLE);
}
#endif

"Unable to load dynamic library..." is a CORE_WARNING according to what I see in the log.

That means - according to my understanding of this code - if you don't log or display CORE_WARNINGs the messagebox should not appear.

Try to set
error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
in the PHP.ini

I don't understand why the PHP-developers decided to pop up a messagebox even if you decided to only log errors and warnings.

I understand your problem because I wanted to restart the Apache-Server after updating the PHP-version through a Win2K-Terminal-Session and had to go to the physical webserver though, because the MessageBoxes are shown on Windowstation 0 and not on the very console created for my Terminal-Session.

Best wishes and happy new year,
Bernhard
 [2005-02-11 11:59 UTC] Claus-Werner dot Lermen at zf dot com
the latest snapshot does not solve the problem: php stills hangs when an extension cannot be loaded.
When php.exe is called from the commandline the messagebox still pops up, even when I disable the E_CORE_WARNING.
php is normally running in the background, therefore a messagebox should never be used - any message should be written to a logfile!
 [2005-03-16 01:30 UTC] sniper@php.net
Do you have "display_startup_errors" ini option on?

 [2005-03-17 10:55 UTC] Claus-Werner dot Lermen at zf dot com
display_startup_error = off
but the behaviour is the same no matter what the value of this variable is!
 [2005-09-02 00:39 UTC] sniper@php.net
Zeev, looks like you made E_CORE_WARNINGS to cause these messageboxes to popup whatever you have set your error_reporting, display_errors, etc. to..

 [2005-10-06 14:43 UTC] dolecek at stringdata dot cz
Pretty please make that MessageBox display go away completely, or optional on startup. I've just spend several unproductive hours debugging the very same problem with PHP CGI process hanging. If it's not an interactive program, do not interact with desktop, damn it!
 [2005-11-03 22:20 UTC] sniper@php.net
Dmitry, can you check this out? (Zeev seems to have vanished)
 [2005-12-07 00:33 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 03:02:42 2014 UTC