EXIF extension is a standard part of PHP distributions, but it must be enabled in php.ini file in order to use its functions. On windows, EXIF extension also depends on mbstring, an extension that provides multi-byte string parsing. Moreover, the sequence of enabling extensions in php.ini file does matter. If exif is enabled prior to mbstring, EXIF functions will not be available at run-time.
mbstring extension must be enabled before EXIF!
If you need to use EXIF functions in your environment, be it development or production, this is something you need to keep in mind. By default, extensions are ordered in alphabetical order in php.ini file. This makes it very easy to run into situation when you start banging your head against the wall as you don’t realize why function_exists('exif_read_data') keeps returning FALSE even though you have enabled both EXIF and mbstring extensions. Recently I needed a quick setup of development environment on my laptop and downloaded WAMP server, probably the most popular WAMP stack available, and I run into the that situation.
I find it really awkward. Including extensions in alphabetical order does not make any sense when there are dependencies like this.







Hi ,
i was searching for an article like this . I want to enable exif extension for a php project . From your article , i understood that i shud enable mbstring before exif. But , as a beginner , i dont know how to enable an extension in php. Im using Ubuntu 10.04
Pls help me
Hi Irfan,
thanks for your comment. I have published a separate article describing the procedure the modify PHP configuration and enable/disable extensions.
Pingback: PHP Configuration – Extensions | RudiBela Creative Studio
Just Dropping a “Thank You!”.
Thanks!! Helped a lot!
Oh great article. Helped me a lot… :-)