Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading… cannot locate php.ini #466

jplew opened this Issue · 5 comments

2 participants

JP Lew Cristi Burcă
JP Lew

I am trying to install WP-CLI on my Mac using, yet am receiving the following error message:

#!/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.
If you can not modify the ini file, you can also run php -d option=value to modify ini values on the fly. You can use '-d' multiple times.

Installing the main WP-CLI package...

Could not open input file: composer.phar

Installing the Boris package...

Could not open input file: composer.phar

WP-CLI files have been succesfully installed.

To test, run:

/Users/[username]/.composer/bin/wp --info

When I run the test it reports no such file or directory.

The Alternative Install Methods give the same error.

I have not installed the bundled PHP that ships with OS X, nor am I using any kind of package. I use MAMP for my local development environment, so I have various php.ini files scattered in this folder:


What is bizarre is that the installer explicitly tries to search through these locations:

Thanks in advance. -JP

Cristi Burcă

You should try manually installing Composer:

cd ~/.composer
curl | php

and follow the instructions that it gives you.

JP Lew
Cristi Burcă

Well, try to find the path to the MAMP binary and use that:

curl | /path/to/bin/php

Some places to look for it:

JP Lew
Cristi Burcă

Sorry to keep bugging you, but any ideas what the problem is?

It's right there in the log:

the requested PHP extension pcntl is missing from your system

Anyway, Boris is optional.

Cristi Burcă scribu closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.