1
0
Fork 0

Remove hard coded memory limit. Add troubleshooting doc

pull/1025/head
Kirill chEbba Chebunin 2012-08-24 13:53:02 +04:00
parent 456b35ae72
commit 47156103a6
2 changed files with 25 additions and 1 deletions

View File

@ -7,7 +7,6 @@ use Composer\Console\Application;
error_reporting(-1); error_reporting(-1);
@ini_set('display_errors', 1); @ini_set('display_errors', 1);
@ini_set('memory_limit', '512M');
// run the command application // run the command application
$application = new Application(); $application = new Application();

View File

@ -0,0 +1,25 @@
<!--
tagline: Solving problems
-->
# Memory limit errors
If composer shows memory errors on some commands:
PHP Fatal error: Allowed memory size of XXXXXX bytes exhausted <...>
The `memory_limit` ini value should be increased.
Get current value:
php -r "echo ini_get('memory_limit').PHP_EOL;"
Increase limit with `php.ini` for a `CLI SAPI` (ex. `/etc/php5/cli/php.ini` for Debian-like systems):
; Use -1 for unlimited or define expicit value like 512M
memory_limit = -1
Or with comand line arguments:
php -d memory_limit=-1 composer.phar <...>