|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #45586 php_mbstring must be loaded before php_exif extension in php.ini
Submitted: 2008-07-21 17:17 UTC Modified: 2017-10-24 14:13 UTC
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: bouke at haarsma dot eu Assigned:
Status: Not a bug Package: Dynamic loading
PHP Version: 5.2.6 OS: Windows XP
Private report: No CVE-ID: None
 [2008-07-21 17:17 UTC] bouke at haarsma dot eu
Please see:
Also see:

Using the latest php.ini files, the problem still exists. The default order for loading the extensions is wrong and error-prone. The 'solution' as stated in the comments should also be reflected in the php.ini-file.

Please note that this has been "solved" in 2005, but the bug is introduced again.

Reproduce code:
Enter this into php.ini:



(Swaped order)

Expected result:
-no error message-

Actual result:
-error message: "php_mbstring.dll" not found


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-21 17:30 UTC]
Better summary. There's no crash here.
 [2008-07-23 09:54 UTC] missingno at ifrance dot com
I guess the problem comes from the fact that the extension entries are sorted by alphabetical order in the php.ini file.

Correcting the order of extensions would solve the problem but would require a lot of testing because I think this problem also occurs with other extensions as well...
I don't think it is such a good idea because the way the list is currently written makes it easy to find the extensions you want to activate. Also, each extension's page in the manual clearly has some sort of a FAQ regarding installation/configuration.
The only problem I seen then is users that do not read the manual, but I digress...

Anyway, I think this is a WONTFIX for now. One possible solution would be for extensions to manage dependancies at runtime and let the user know the steps to follow in order for the extension to work.
But this would probably put to much of a burden on the developpers compared to the actual gain.
 [2010-06-09 01:17 UTC] whistl0r+phpbug at googlemail dot com
This problem also affects PHP 5.3 (tested against the latest 5.3.2 release for 

If you cannot change the order (I agree missingno's argumentation), this should be 

Google for the term "php_exif not found", you will find many reports like
 [2010-12-03 17:43 UTC]
-Status: Open +Status: Assigned -Package: Feature/Change Request +Package: Dynamic loading -Assigned To: +Assigned To: pajoye
 [2010-12-03 17:43 UTC]
There is module dependancy system in PHP which should take care of this..perhaps it does not work under windows..? I do not know how windows binaries are build. Pierre, can you check it out? ext/exif does have dependancy set for mbstring.
 [2017-10-24 07:33 UTC]
-Status: Assigned +Status: Open -Assigned To: pajoye +Assigned To:
 [2017-10-24 14:13 UTC]
-Status: Open +Status: Not a bug
 [2017-10-24 14:13 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 22:01:29 2024 UTC