PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, January 24, 2022

[FIXED] Allowed memory size of 262144 bytes exhausted

 January 24, 2022     composer-php, memory, php     No comments   

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
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

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

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing