Here is the situation, I'm trying to install wp-cli
with Homebrew as following:
brew install wp-cli
But during the installation process, the following error occurs:
PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 29889 bytes) in Unknown on line 0
Homebrew first download the appropriate package:
==> Downloading https://github.com/wp-cli/wp-cli/archive/v0.18.0.tar.gz
And then the process use Composer to proceed the installation:
==> /usr/local/bin/composer install
That causes the above PHP Error
and I haven't find any solution to fix this problem (I followed the instructions described here but no success).
I understand the error message and tried to increase the memory limit in the php.ini
file (I also tried 1G):
memory_limit = 512M
But without any success even after having restarted the server in order to be sure that my modification was taken into account.
Here are some information about my configuration:
> php -v
PHP 5.5.23 (cli) (built: Mar 23 2015 01:47:37)
> brew -v
Homebrew 0.9.5
> composer -v
Composer version 1.0-dev (f10c71475167a4661225b14560ca0a400d730829) 2015-03-29 14:37:42
> php --ini
Configuration File (php.ini) Path: /usr/local/etc/php/5.5
Loaded Configuration File: /usr/local/etc/php/5.5/php.ini
Scan for additional .ini files in: /usr/local/etc/php/5.5/conf.d
Additional .ini files parsed: /usr/local/etc/php/5.5/conf.d/ext-mcrypt.ini
Thinking about a memory overload, I also cleaned the cache of Composer with the following command (because error message occurs during the composer install
process):
> composer clearcache
That was still useless in my situation, of course every used tools are up-to-date:
> brew update
> brew upgrade
> composer selfupdate
I probably missed something simple but I didn't find the cause of my problem.