[2] ErrorException in Image.php line 35

imagecreatefrompng(): gd-png: fatal libpng error: Read Error: truncated data

  1. $this->width = $info[0];
  2. $this->height = $info[1];
  3. $this->bits = isset($info['bits']) ? $info['bits'] : '';
  4. $this->mime = isset($info['mime']) ? $info['mime'] : '';
  5. if ($this->mime == 'image/gif') {
  6. $this->image = imagecreatefromgif($file);
  7. } elseif ($this->mime == 'image/png') {
  8. $this->image = imagecreatefrompng($file);
  9. imageinterlace($this->image, false);
  10. } elseif ($this->mime == 'image/jpeg') {
  11. $this->image = imagecreatefromjpeg($file);
  12. } elseif ($this->mime == 'image/webp') {
  13. $this->image = imagecreatefromwebp($file);
  14. }
  15. } else {
  16. throw new \Exception('Error: Could not load image ' . $file . '!');

Call Stack

  1. in Image.php line 35
  2. at Error::appError(2, 'imagecreatefrompng()...', '/www/wwwroot/biliard...', 35, ['file' => '/home/www/product/55...', 'info' => [1500, 1500, 3, ...]])
  3. at imagecreatefrompng('/home/www/product/55...') in Image.php line 35
  4. at Image->__construct('/home/www/product/55...') in Images.php line 56
  5. at Images->resize('/static/catalog/imag...', 330, 440) in Collection.php line 341
  6. at Collection->getProductImage('/static/catalog/imag...') in Collection.php line 202
  7. at Collection->getManualProducts('343,784,7665,426,544...', 1, []) in Productblock.php line 73
  8. at Productblock->index(['module_id' => '538', 'name' => '首页展示产品', 'heading_title' => 'Prodotti Caldi', ...]) in ContentRightBottom.php line 67
  9. at ContentRightBottom->index() in Index.php line 23
  10. at Index->index()
  11. at ReflectionMethod->invokeArgs(object(Index), []) in Container.php line 395
  12. at Container->invokeReflectMethod(object(Index), object(ReflectionMethod), []) in Module.php line 131
  13. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  14. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  15. at Middleware->think\{closure}(object(Request))
  16. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  17. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  18. at Module->exec() in Dispatch.php line 168
  19. at Dispatch->run() in App.php line 432
  20. at App->think\{closure}(object(Request), object(Closure), null)
  21. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  22. at Middleware->think\{closure}(object(Request))
  23. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  24. at Middleware->dispatch(object(Request)) in App.php line 435
  25. at App->run() in index.php line 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Session
think { "theme_dir": "ella" }
Server/Request Data
USER www
HOME /home/www
SCRIPT_NAME /index.php
REQUEST_URI /
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REMOTE_PORT 39748
SCRIPT_FILENAME /www/wwwroot/biliardimoratti.it/public/index.php
SERVER_ADMIN [email protected]
CONTEXT_DOCUMENT_ROOT /www/wwwroot/biliardimoratti.it/public
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /www/wwwroot/biliardimoratti.it/public
REMOTE_ADDR 172.71.223.41
SERVER_PORT 80
SERVER_ADDR 209.74.108.18
SERVER_NAME www.biliardimoratti.it
SERVER_SOFTWARE Apache
SERVER_SIGNATURE <address>Apache Server at www.biliardimoratti.it Port 80</address>
LD_LIBRARY_PATH /www/server/apache/lib
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_CF_IPCOUNTRY US
HTTP_CDN_LOOP cloudflare
HTTP_CF_CONNECTING_IP 54.173.214.79
HTTP_REFERER http://www.biliardimoratti.it/
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_CF_VISITOR {"scheme":"https"}
HTTP_X_FORWARDED_PROTO https
HTTP_CF_RAY 86ba70757afe29b5-IAD
HTTP_X_FORWARDED_FOR 54.173.214.79
HTTP_ACCEPT_ENCODING gzip, br
HTTP_CONNECTION Keep-Alive
HTTP_HOST www.biliardimoratti.it
proxy-nokeepalive 1
SCRIPT_URI http://www.biliardimoratti.it/
SCRIPT_URL /
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711658468.8265
REQUEST_TIME 1711658468
Environment Variablesempty
ThinkPHP Constants
UC_CONNECT mysql
UC_DBHOST localhost
UC_DBUSER root
UC_DBPW root
UC_DBNAME ucenter
UC_DBCHARSET utf8
UC_DBTABLEPRE `ucenter`.uc_
UC_DBCONNECT 0
UC_KEY ceshi_ss
UC_API http://localhost/ucenter
UC_CHARSET utf-8
UC_IP
UC_APPID 1
UC_PPP 20