I am working on file upload in Laravel 5.3. The file upload is working for the file with size less than 200 MB. Anything greater than 200 is failing. The strange reason for failure is when the upload file size is greater than 200 MB, the request obj is null. But same code works when the file size is less than 200 MB.
I have updated the php.ini and increased the file size as below and restarted apache. I have changed the following php.ini files.
/etc/php/5.6/cli/php.ini
/etc/php/5.6/apache2/php.ini
My phpinfo() returns following location for loaded configuration file.
Loaded Configuration File /etc/php/5.6/apache2/php.ini
**post_max_size** = 1024M
**upload_max_filesize** = 1024M
**max_execution_time** = 120
**memory_limit** = 1024M
Below code is in my controller. The failure happens at log message with error message
exception 'ErrorException' with message 'Undefined index: selectedType'
I did a dump of $input and it returns empty for file size greater than 200 MB, but works with lesser size file.
public function postAdd(Request $request)
{
$input = $request->all();
Log::info('In postAdd method input selectedType '.$input['selectedType']);
My form has multipart enctype included.
{!! Form::open([
'files' => true,
'method' => 'POST',
'route' => $route,
'enctype' => "multipart/form-data",
], [ 'class' => 'form' ]) !!}
@include ('form' )
{!! Form::close() !!}
Any idea why would the request obj become null? Any help or pointers are appreciated.
UPDATE:
I was able to get this resolved based on the comment from @user4892206 After changing the execution time to 600 seconds it started working.
NOTE: This is not a duplicate question. The other question mentioned about setting up post_max_size which was already done in my case. Anyways the execution time helped solve my problem.