干预措施不调整大文件的大小 [英] Intervention not resizing large files

查看:58
本文介绍了干预措施不调整大文件的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用[Intervention][1]调整文件大小.我发现它不会调整这一个

I am using [Intervention][1] to resize Files. I figured out it is not resizing large files like this one

我正在使用的代码是:

if (Input::hasFile('image'))
            {
                $file = Input::file('image');
                $r = $file->move('uploads', $file->getClientOriginalName());
                Image::make('/mountain.jpg')->resize(200,200)->save('uploads/k2.jpg');
                //print_r($image);
                exit;
            }

代码适用于较小的文件.文件大小为2.x MB,我的PHP限制为32MB.

Code works fine for smaller files. The file size is 2.x MB and my PHP limit is 32MB.

更新:Laravel Log说:

Update: Laravel Log says:

' with message 'Allowed memory size of 33554432 bytes exhausted (tried to allocate 3008 bytes`

推荐答案

通过查找您的错误日志消息; Allowed memory size of 33554432 bytes exhausted (tried to allocate 3008 bytes,您的应用程序内存不足.

Through finding out your error log message; Allowed memory size of 33554432 bytes exhausted (tried to allocate 3008 bytes, your app is running out of memory.

通过更改php.ini文件中的memory_limit的值来增加此值.

Increase this by changing the value of memory_limit within your php.ini file.

请确保重新启动您的Web服务器.

Be sure to restart your webserver.

这篇关于干预措施不调整大文件的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆