php.net |  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
Votes:2
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
Description:
------------
Please see: http://bugs.php.net/bug.php?id=27248
Also see: http://bugs.php.net/bug.php?id=32552

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:

extension=php_exif.dll
extension=php_mbstring.dll

Solution:
extension=php_mbstring.dll
extension=php_exif.dll

(Swaped order)

Expected result:
----------------
-no error message-

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-21 17:30 UTC] jani@php.net
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 
Windows).

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

Google for the term "php_exif not found", you will find many reports like 
http://eligeske.com/wordpress/php_exif-dll-the-specified-module-could-not-be-
found/
 [2010-12-03 17:43 UTC] jani@php.net
-Status: Open +Status: Assigned -Package: Feature/Change Request +Package: Dynamic loading -Assigned To: +Assigned To: pajoye
 [2010-12-03 17:43 UTC] jani@php.net
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] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: pajoye +Assigned To:
 [2017-10-24 14:13 UTC] yunosh@php.net
-Status: Open +Status: Not a bug
 [2017-10-24 14:13 UTC] yunosh@php.net
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 http://www.php.net/downloads.php

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 Dec 21 12:01:31 2024 UTC