laravel 4在文件上传中返回错误

时间:2014-01-29 09:42:54

标签: php image file-upload laravel laravel-4

我的问题是,当我尝试上传大图片时,我收到了上传错误。 (大于2MB)。

我在php.ini中的上传大小限制是40MB,我仍然收到以下错误:

 development.ERROR: exception 'Exception' with message Serialization of   Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed in /var/www/laravel/vendor/laravel/framework/src/Illuminate/Session/Store.php:212
 Stack trace:
 #0 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Session/Store.php(212): serialize(Array)
 #1 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(126): Illuminate\Session\Store->save()
 #2 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(79): Illuminate\Session\Middleware->closeSession(Object(Illuminate\Session\Store))
 #3 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
 #4 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
 #5 /var/www/laravel/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
 #6 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(606): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
 #7 /var/www/laravel/public/index.php(61): Illuminate\Foundation\Application->run()
 #8 {main} [] []

为什么我会收到错误?

1 个答案:

答案 0 :(得分:0)

您是如何尝试上传文件的?使用bundle的原生laravel上传功能?权限可能只是其中一个问题。