Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Installer.sh cannot locate php.ini #466

Closed
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 installer.sh, 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:

/Applications/MAMP/

What is bizarre is that the installer explicitly tries to search through these locations: https://github.com/wp-cli/wp-cli.github.com/blob/master/installer.sh#L5-L9

Thanks in advance. -JP

Cristi Burcă
Owner

You should try manually installing Composer:

cd ~/.composer
curl https://getcomposer.org/installer | php

and follow the instructions that it gives you.

JP Lew
Cristi Burcă
Owner

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

curl https://getcomposer.org/installer | /path/to/bin/php

Some places to look for it: https://github.com/wp-cli/wp-cli/blob/master/utils/amp-paths.txt

JP Lew
Cristi Burcă
Owner

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.