我只是使用具有 8GB 内存的基本 PHP 服务器,它只是运行 LAMP 服务器。
我有一个 codeigniter V3 正在运行,我可以上传小图像并轻松裁剪调整它们的大小。
但是,如果我上传大于 540 x 540 的图像,则会出现以下错误
遇到 PHP 错误
严重性:警告
Message: imagecreatetruecolor(): gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
Filename: libraries/Image_lib.php
Line Number: 807
Backtrace:
File: /home/boomboomdead/public_html/application/controllers/File.php
Line: 127
Function: crop
File: /home/boomboomdead/public_html/application/controllers/File.php
Line: 173
Function: generate_thumbs
File: /home/boomboomdead/public_html/index.php
Line: 292
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: imagealphablending() expects parameter 1 to be resource, boolean given
Filename: libraries/Image_lib.php
Line Number: 811
Backtrace:
File: /home/boomboomdead/public_html/application/controllers/File.php
Line: 127
Function: crop
File: /home/boomboomdead/public_html/application/controllers/File.php
Line: 173
Function: generate_thumbs
File: /home/boomboomdead/public_html/index.php
Line: 292
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: imagesavealpha() expects parameter 1 to be resource, boolean given
Filename: libraries/Image_lib.php
Line Number: 812
Backtrace:
File: /home/boomboomdead/public_html/application/controllers/File.php
Line: 127
Function: crop
File: /home/boomboomdead/public_html/application/controllers/File.php
Line: 173
Function: generate_thumbs
File: /home/boomboomdead/public_html/index.php
Line: 292
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: imagecopyresampled() expects parameter 1 to be resource, boolean given
Filename: libraries/Image_lib.php
Line Number: 815
Backtrace:
File: /home/boomboomdead/public_html/application/controllers/File.php
Line: 127
Function: crop
File: /home/boomboomdead/public_html/application/controllers/File.php
Line: 173
Function: generate_thumbs
File: /home/boomboomdead/public_html/index.php
Line: 292
Function: require_once
我不知道该怎么做,因为在我的本地计算机上一切正常。我的意思是,我上传了 3000 X 2000 的照片,并且收成很好。
我在 mac book pro 上,有 8GB 内存,但在远程服务器上,一切都出错了