title: Laravel Crash when Uploading Large Files
body: <p>My Laravel application is crashing when I attempt to upload images to AWS S3 that are larger than ~6mb. I am using Laravel 5.6, php 7.2, and apache 2.4. This error is in a local dev environment. </p>
  
  <p>I have the following <code>php.ini</code> settings:</p>
  
  <ul>
  <li><code>max_execution_time = 300</code></li>
  <li><code>max_input_time = 300</code></li>
  <li><code>memory_limit = 256M</code></li>
  <li><code>post_max_size = 100M</code></li>
  <li><code>upload_max_filesize = 100M</code></li>
  </ul>
  
  <p>The is the only feedback I receive:</p>
  
  <p><a href="https://i.stack.imgur.com/oqGY8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oqGY8.png" alt="Error in Chrome"></a></p>
  
  <p>Firefox displays no error, just a blank screen. No errors get logged the JS console or to Laravel and Apache logs.</p>
  
  <p>This is how I'm handling the image storage in the controller:</p>
  
  <pre><code>Image::create([
    'inductee_id' =&gt; $inductee-&gt;id,
    'path' =&gt; Storage::disk('s3')-&gt;putFile('images', $request-&gt;file('image_hero'), 'public'),
    'type' =&gt; 'raw',
    'image_credit' =&gt; request('image_hero_credit')
   ]);
  </code></pre>
  
  <p>This is working as intended when the overall file content size is below ~6mb. I have tried to use streams to upload the file, but received the same error using the following:</p>
  
  <pre><code>$disk = Storage::disk('s3');
  $disk-&gt;put($targetFile, fopen($sourceFile, 'r+'));
  </code></pre>
  
  <p>Any suggestions?</p>