Allowed memory size of 262144 bytes exhausted
<pre><code>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
</code></pre>

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

<ol>
<li>Putting <code>ini_set('memory_limit', '3G');</code> almost everywhere in my code (including ClassLoader.php)</li>
<li>Checking my php.ini file</li>
</ol>

<p>When I do a <code>php -i</code> or <code>phpinfo();</code> the allowed size is 3G. </p>

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

<p>Any idea?</p>