ramytamer's avatar

File sometimes got uploaded successfully & sometimes it disappears from the /tmp directory

I am running a Laravel 5.2 application with PHP 5.5and nginx on Ubuntu 14.04.

Sometimes it got uploaded successfully without any error, also sometimes out of nowhere it produces this error.

Image of the Exception thrown by Laravel:

Image of the Exception thrown by Laravel

I don't know what the problem is or what is happening. I can't reproduce the error every time. It just happens randomly!


Here is what I've tried (already configured):

php.ini:

post_max_size: 20M

upload_max_filesize: 20M

memory_limit: -1

max_execution_time: 60

max_input_time: 60

nginx configuration:

client_max_body_size 100m;

0 likes
6 replies
Srijan's avatar

I need the answer to that question as well. I am totally lost on the same error.

1 like
Magnetion's avatar
Level 1

You are not alone. We can consistently reproduce this error on multiple sites. It cropped up in the 5.2.14 release. If we roll back to that tag everything works again. It almost appears to us that when you upload a file and then take any action on it, any further things you then call from the request scope immediately bomb with this error.

The issue appears to be here:

https://github.com/laravel/framework/commits/5.2/src/Illuminate/Http/UploadedFile.php

1 like
acasar's avatar

This has just been fixed a few hours ago. Now we just need to wait until a new release is tagged, which should be later today.

kingpabel's avatar

I was also fall on this problem in 5.2.16 and in now i am using 5.2.29 and this is solved

Please or to participate in this conversation.