|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37428 php.exe crashing if unable to load any of configured extension dll
Submitted: 2006-05-13 10:43 UTC Modified: 2006-05-24 22:05 UTC
From: velkran-2 at yahoo dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 5.1.4 OS: Windows XP SP2
Private report: No CVE-ID:
 [2006-05-13 10:43 UTC] velkran-2 at yahoo dot com
php.exe will crash if any of configured extension dll cannot be found.
It can either incorrect extension_dir or just missing dll file.
From my point of view it is better to proper report this situation, not just crash.
As far as i can see usually php report this situation in error log.
I'v tried 5.1.4 and 5.1.2 with same results.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-14 12:31 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2006-05-16 19:07 UTC] velkran-2 at yahoo dot com
Just to be sure, i did these steps:
1. Download
2. Download
3. unpack these 2 files to e:\php5.2
4. copy php.ini-recommended to php.ini
5. edit php.ini, uncomment line ;error_log = syslog
6. edit php.ini (to emulate "PHP Startup: Unable to load dynamic library" error)
7. change current directory to e:\php5.2
8. start php.exe
9. got usual windows GPF message, click "Debug" to create backtrace
Please find a Backtrace at the end of this comment.

As far as i can see there is some problem with windows event log reporting, basically it failes at this line:
	/* default event source */
--->	if (!PW32G(log_source))
		openlog("php", LOG_PID, LOG_SYSLOG);
I'm pretty that openlog was not called yet, i put a breakpoint on it. So failing somewhere inside mystical PW32G thing.
Hope this will be help.

A Backtrace (hope you will see it well-formatted):
	>	php5ts.dll!syslog(int priority=6, const char * message=0x102a6814, ...)  Line 91	C
 	php5ts.dll!php_log_err(char * log_message=0x009b1080, void * * * tsrm_ls=0x00324200)  Line 349 + 0x14	C
 	php5ts.dll!php_error_cb(int type=32, const char * error_filename=0x102967d0, const unsigned int error_lineno=0, const char * format=0x009b1080, char * args=0x00000001)  Line 763	C
 	php5ts.dll!zend_error(int type=32, const char * format=0x10296780, ...)  Line 948 + 0x17	C
 	php5ts.dll!php_verror(const char * docref=0x00000000, const char * params=0x10296690, int type=32, const char * format=0x0000000b, char * args=0x0000006d, void * * * tsrm_ls=0x00000000)  Line 573	C
 	php5ts.dll!php_error_docref0(const char * docref=0x00000000, void * * * tsrm_ls=0x00324200, int type=32, const char * format=0x10307754, ...)  Line 588 + 0x23	C
 	php5ts.dll!php_dl(_zval_struct * file=0x009f5610, int type=1, _zval_struct * return_value=0x0012fbe4, int start_now=0, void * * * tsrm_ls=0x00324200)  Line 142 + 0x26	C
 	php5ts.dll!php_load_function_extension_cb(void * arg=0x009f5610, void * * * tsrm_ls=0x00324200)  Line 236	C
 	php5ts.dll!zend_llist_apply(_zend_llist * l=0x104366d4, void (void *, void * * *)* func=0x100bcb50, void * * * tsrm_ls=0x00324200)  Line 191 + 0x7	C
 	php5ts.dll!php_ini_register_extensions(void * * * tsrm_ls=0x00324200)  Line 555	C
 	php5ts.dll!php_module_startup(_sapi_module_struct * sf=0x00405020, _zend_module_entry * additional_modules=0x00000000, unsigned int num_additional_modules=0)  Line 1563	C
 	php.exe!main(int argc=64, char * * argv=0x7ffde000)  Line 681 + 0x12	C
 	php.exe!_mainCRTStartup()  + 0xe3	
 [2006-05-22 09:29 UTC] velkran-2 at yahoo dot com
I was able to reproduce this problem on latest 5.2 snapshot
 [2006-05-22 09:30 UTC] velkran-2 at yahoo dot com
The workaround for this issue - is not use event log (on Windows)
 [2006-05-24 21:06 UTC]
What do you mean by do not use event log?

I don't get a crash I get:

PHP Warning:  PHP Startup: Unable to load dynamic library '.\php_xxx.dll' - The specified module could not be found.

 [2006-05-24 22:05 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Fri Nov 27 06:02:02 2015 UTC