Monday, January 24, 2022

[FIXED] Allowed memory size of 262144 bytes exhausted

Issue

Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 145460 bytes) in /home/legalvis/public_html/wolfpack/vendor/composer/ClassLoader.php on line 411

I've got this error when trying to execute a rather large script. I've tried a few things:

  1. Putting ini_set('memory_limit', '3G'); almost everywhere in my code (including ClassLoader.php)
  2. Checking my php.ini file

When I do a php -i or phpinfo(); the allowed size is 3G.

My script is working perfectly locally, but on the server despite the configuration it seems to be failing.

Any idea?


Solution

Try this: ini_set('memory_limit','3072M');


Answered By - Peeje

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.