After upgrading php from 5.1 to 5.2.10, I got the following warnings when php -v
:
# php -v
PHP Warning: PHP Startup: fileinfo: Unable t
try to upgrade each of those modules using pecl command
# pecl upgrade fileinfo
# pecl upgrade memcache
# pecl upgrade mhash
# pecl upgrade readline
etc...
This is just describing why I had this issue in case someone finds it helpful.
My problem was that I had upgraded php with homebrew and had forced at some point the variable PHP_INI_SCAN_DIR in my profile or bashrc file so it was pointing to the old php version. Removed that line and fixed.
brew reinstall php56-mcrypt --build-from-source
Do this—pass the --build-from-source
flag—for each module which needs to be compiled with the same version.
It may also require PHP options depending on your plugins. If so, brew reinstall php56 --with-thread-safety
To see all of the options for php[version] run brew options php56
(replacing 56 with your version)