Try prefixing your command with COMPOSER_MEMORY_LIMIT=-1 . This will remove the memory limit for the execution of the command. Update: Memory exhaust errors should now be resolved by using Composer 2.
The correct way is to edit your php. ini file. Edit memory_limit to your desire value. As from your question, 128M (which is the default limit) has been exceeded, so there is something seriously wrong with your code as it should not take that much.
Hot to solve this problem and why it happens?
Zend Server Log:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 538798977 bytes) in C:\Program Files (x86)\Zend\Apache2\htdocs\test\modules\main.php on line 3
The file main.php
does not produce any error, if it's executed directly from browser. However, if I use its functions from another PHO file, then Zend Log prints the above-mentioned error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With