Last active
May 11, 2020 15:58
-
-
Save almokhtarbr/02c173a57b06eee0d1c7a2eaccf34e77 to your computer and use it in GitHub Desktop.
PHP Fatal error: Allowed memory #composer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>To locate your php.ini configuration file you can use the following command: php --ini | |
``` | |
After running this command you should see an output like the following: | |
Configuration File (php.ini) Path: /usr/local/etc/php/7.3 | |
Loaded Configuration File: /usr/local/etc/php/7.3/php.ini | |
Scan for additional .ini files in: /usr/local/etc/php/7.3/conf.d | |
Additional .ini files parsed: /usr/local/etc/php/7.3/conf.d/ext-opcache.ini``` | |
```The file we want to change is the Loaded Configuration File When you open the file you can search for the memory_limit setting and then update it accordingly. You can try to incrementally override this value and re-run your composer commands or alternatively, you can set the memory_limit = -1 to give an unlimited amount of memory to PHP processes.``` | |
```After saving your file, you can verify the PHP changes by running this command which will output the current memory settings in your php.ini file: | |
php -r "echo ini_get('memory_limit').PHP_EOL;"``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment