Similar to this question: gd2 not showing in phpinfo, is showing in php -i
I have the same problem with mbstring
. I enabled it in my php.ini
The problem is, that when PHP is loaded via apache, the extension_dir
is apparently read relative to the apache server root dir.
But, starting from command line, it is read relative to the PHP root dir.
Thus, despite it being the same loaded php.ini
, because I set the extension dir as ext
instead of F:\PHP\5.4\ext
, apache (or rather: PHP) searched for it in F:\Apache\2.4\ext
, which it didn't find for obvious reasons.
Setting the extension_dir
to an absolute folder solved the issue. Now apache and cmd both load the exact same configuration, including all extensions (which is exactly how I wanted it).