I am installing composer with the following cammand
curl -s https://getcomposer.org/installer | php   But I am keep getting below error message
Zafars-MacBook-Pro:etc zafarsaleem$ curl -s https://getcomposer.org/installer | php #!/usr/bin/env php Some settings on your machine make Composer unable to work properly. Make sure that you fix the issues listed below and run this script again:  The detect_unicode setting must be disabled. Add the following to the end of your `php.ini`: detect_unicode = Off  A php.ini file does not exist. You will have to create one.   How can I install composer be removing above error?
EDIT
Zafars-MacBook-Pro:etc zafarsaleem$ php --ini Configuration File (php.ini) Path: /etc Loaded Configuration File:         (none) Scan for additional .ini files in: (none) Additional .ini files parsed:      (none)   Latest Edit
After some research I found that php.ini file which is being used is in /etc/php.ini. However, when I checked this file in /etc folder it wasn't there. /etc folder contained php.ini.default folder which linked to /private/etc/php.ini.default. So I added detect_unicode = Off in /etc/php.ini.default and the renamed this file to php.ini. Now when I execute below command
curl -s https://getcomposer.org/installer | php   OR
sudo curl -s https://getcomposer.org/installer | php   Then I get following errors
Zafars-MacBook-Pro:/ zafarsaleem$ sudo curl -s https://getcomposer.org/installer | php #!/usr/bin/env php All settings correct for using Composer Downloading... Download failed: failed to open stream: Permission denied Downloading... Download failed: failed to open stream: Permission denied Downloading... Download failed: failed to open stream: Permission denied The download failed repeatedly, aborting.   How can I install composer on my computer and remove above problems? Please help
Installation - Windows# This is the easiest way to get Composer set up on your machine. Download and run Composer-Setup.exe. It will install the latest Composer version and set up your PATH so that you can call composer from any directory in your command line. Note: Close your current terminal.
To download / install on MacOSX, you can do the following steps or try the homebrew steps below:
Goto a directory you can write to:
cd ~
get composer:
curl -sS https://getcomposer.org/installer | php
move composer into a bin directory in your $PATH var:
sudo mv composer.phar /usr/local/bin/composer
double check composer works
composer about
(optional) Update composer:
sudo composer self-update
Homebrew
brew update brew tap homebrew/homebrew-php brew tap homebrew/dupes brew tap homebrew/versions brew install php55-intl brew install homebrew/php/composer 
                        Try this instead and change the setting on the fly, just for this command
curl -sS https://getcomposer.org/installer | php -d detect_unicode=Off 
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With