You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.
Trying to run 'composer require...' or 'composer update' within the-vagrant (via vagrant ssh) gives the following error:
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 32 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
Checked the /etc/php5/cli/php.ini, and 'memory_limit = -1' is present, but I suspect the setting isn't taking effect. Running the following gives a result of '256M':
php -r "echo ini_get('memory_limit').PHP_EOL;"
Adding the memory_limit setting on the command line allows 'composer update' to succeed. For example:
Recommend updating the-vagrant/conf/vagrant/provisioning/roles/php/tasks/main.yml to not set the 256M memory_limit in cli/php.ini or set it to '-1' separately.
Increase the memory limit for the CLI specifically
... and, as you mentioned: verifying the php.ini file for the version of PHP you're running. The default PHP config location changed when the PHP 7 packages were standardized, so that all paths include the version number as its own path component. Several things in the-vagrant have referred to the wrong path over time.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Trying to run 'composer require...' or 'composer update' within the-vagrant (via vagrant ssh) gives the following error:
Checked the /etc/php5/cli/php.ini, and 'memory_limit = -1' is present, but I suspect the setting isn't taking effect. Running the following gives a result of '256M':
php -r "echo ini_get('memory_limit').PHP_EOL;"
Adding the memory_limit setting on the command line allows 'composer update' to succeed. For example:
php -d memory_limit=-1 /usr/local/bin/composer update
(See also https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors)
The text was updated successfully, but these errors were encountered: