title: PHP Memory exhausted
body: <p>Any ideas why I'm getting ....</p>
  
  <blockquote>
  <pre><code>Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to
  </code></pre>
    
    <p>allocate 9792 bytes) in
    /home/frich/public_html/creation/systemc/sMain/upload_image.php
    on line 77</p>
  </blockquote>
  
  <p>on the following line</p>
  
  <pre><code>$oldImage = imagecreatefromjpeg($img);
  </code></pre>
  
  <p>The php grabs an image from a HTML form and resizes it.</p>
  
  <p>Works perfectly fine if its a small file. I.e. a few hundred KB</p>
  
  <p>Tried with a larger file as I want a max of up to 4mb.
  The image I get an error with is ca. 2mb</p>
  
  <p>Thanks in advance</p>