Fixing ‘detect_unicode’ issue with Composer in OSX


Composer is obviously great dependency management system for the PHP. Use of composer makes your life much easier while dealing with third party libraries.

Sometimes, you will see issue while installing/downlng composer which looks like this :


This issue is quite normal when you upgrade your OSX. Don’t be panic, there is straight fix for this problem.


There are couple of solution to fix this issue on Mac OSX,

  • Edit/rename your php.ini.default

On Mac OSX, you will find your loaded php.ini at ‘/etc/php.ini.default’

You can search for loaded config using

Now, edit ‘/etc/php.ini.default’ file and add ” detect_unicode = Off”

You also need to rename this file to ‘php.ini’

Restart the terminal and you are good to go !

  • Just in case you need temporary fix, install composer like this

Go ahead and use composer smartly !!