title: PHP - Allowed memory size of 33554432 bytes exhausted (tried to allocate 12864 bytes)
body: <p>I get this error when I try to upload a file of 3,424KB and got this error </p>
  
  <pre><code>Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12864 bytes)
  </code></pre>
  
  <p>but its fine when I try to upload a file thats 4,891KB why is this?</p>
  
  <p>Also I have updated my php5.ini file and the permissions are fine and everything.</p>
  
  <p>Any tips would be awesome thanks!</p>
  
  <p>J</p>
  
  <p>this is the line of the code where the error occurs:</p>
  
  <pre><code> $image = imagecreatefromjpeg($source); 
  </code></pre>