You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a page that I have used in the past (this is the site of an art organization and they have various shows that repeat each year; this is probably the third year on this show). In the past, all the images displayed without a problem. This year, I'm getting occasional broken images and I don't see any pattern to it.
For the purpose of this question, I excerpted the phpThumb code since the rest of the code was not relevant to the problem. This is the URL of the page in question:
<?php
$result_art = $mysqli->query("SELECT * FROM eventart WHERE (event = 'motherbrook') ORDER BY artist ASC");
$row_result_art = mysqli_fetch_assoc($result_art);
require_once('../resize/phpThumb.config.php');
?>
<?php do {
$image = $row_result_art['artworkid'];
echo '<img src="'.htmlspecialchars(phpThumbURL('src=show_images/'.$image.'&w=150', '../resize/phpThumb.php')).'"><p>';
} while ($row_result_art = mysqli_fetch_assoc($result_art));
?>
You should get a fairly lengthy column of 150px wide images. It looks fine until you start scrolling down and then you start seeing broken images. The broken images are more numerous as you get further down the column, and near the bottom there are more broken ones that unbroken ones. If you right-click on a broken image, you can look at it in a new tab (Chrome) or reload it (Firefox) and then if you go back to the original page the reloaded image is there. But if you reload the entire page (especially with a CTRL-reload) the broken ones show up again. But note that the ones that are broken are not always the same ones.
Also note that Firefox shows many more broken images than Chrome.
I have tried several different approaches - I changed the PHP version (5.6 and 7.0 produce the same results). I got the latest (development) version of phpThumb. Nothing seems to make much of a difference.
I hope you can make a suggestion - I have a client who is getting impatient.
I enabled debugging and got this:
phpThumb() v1.7.15-201902101903
http://phpthumb.sourceforge.net
phpThumb() version = 1.7.15-201902101903
phpversion() = 7.0.31
PHP_OS = Linux
$_SERVER[SERVER_SOFTWARE] = Apache
__FILE__ = /home2/newtonar/public_html/membership/resize/phpthumb.class.php
realpath(.) = /home2/newtonar/public_html/membership/resize
$_SERVER[PHP_SELF] = /membership/resize/phpThumb.php
$_SERVER[HOST_NAME] =
$_SERVER[HTTP_REFERER] = https://newtonartassociation.com/membership/admin/mb_test.php
$_SERVER[QUERY_STRING] = src=show_images%2F590-Salter.jpg&w=150&hash=9a8233d9d9bf4083bcce51cd56ac2533
$_SERVER[PATH_INFO] =
$_SERVER[DOCUMENT_ROOT] = /home2/newtonar/public_html
getenv(DOCUMENT_ROOT) = /home2/newtonar/public_html
get_magic_quotes_gpc() = FALSE
get_magic_quotes_runtime() = FALSE
error_reporting() = integer 32767
ini_get(error_reporting) = string(5) "32767"
ini_get(display_errors) = string(1) "1"
ini_get(allow_url_fopen) = string(1) "1"
ini_get(disable_functions) = string(0) ""
get_cfg_var(disable_functions) = FALSE
ini_get(safe_mode) = FALSE
ini_get(open_basedir) = string(0) ""
ini_get(max_execution_time) = string(2) "60"
ini_get(memory_limit) = string(4) "128M"
get_cfg_var(memory_limit) = FALSE
memory_get_usage() = integer 6555392
$this->config_prefer_imagemagick = TRUE
$this->config_imagemagick_path = NULL
$this->ImageMagickWhichConvert() = /usr/bin/convert
[actual ImageMagick path used] = string(16) "/usr/bin/convert"
file_exists([actual ImageMagick path used]) = TRUE
ImageMagickVersion(false) = 6.6.0-4 2015-11-27 Q16
ImageMagickVersion(true) = Version: ImageMagick 6.6.0-4 2015-11-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
$this->config_cache_directory = string(52) "/home2/newtonar/public_html/membership/resize/cache/"
$this->config_cache_directory_depth = integer 2
$this->config_cache_disable_warning = FALSE
$this->config_cache_maxage = integer 2592000
$this->config_cache_maxsize = integer 10485760
$this->config_cache_maxfiles = integer 200
$this->config_cache_force_passthru = TRUE
$this->cache_filename = string(189) "/home2/newtonar/public_html/membership/resize/cache//4/4e/phpThumb_cache_newtonartassociation.com__src4eed75475b34d046431643f8c21cb938_par0b9e73569dbbfe81d5e1ff2a11d92887_dat1564103397.jpeg"
is_readable($this->config_cache_directory) = TRUE
is_writable($this->config_cache_directory) = TRUE
is_readable($this->cache_filename) = TRUE
is_writable($this->cache_filename) = TRUE
$this->config_document_root = string(10) "../resize/"
$this->config_temp_directory = string(52) "/home2/newtonar/public_html/membership/resize/cache/"
$this->config_output_format = string(4) "jpeg"
$this->config_output_maxwidth = integer 0
$this->config_output_maxheight = integer 0
$this->config_error_message_image_default = string(0) ""
$this->config_error_bgcolor = string(6) "CCCCFF"
$this->config_error_textcolor = string(6) "FF0000"
$this->config_error_fontsize = integer 1
$this->config_error_die_on_error = TRUE
$this->config_error_silent_die_on_error = FALSE
$this->config_error_die_on_source_failure = TRUE
$this->config_nohotlink_enabled = TRUE
$this->config_nohotlink_valid_domains = array(1) { [0]=> string(24) "newtonartassociation.com" }
$this->config_nohotlink_erase_image = TRUE
$this->config_nohotlink_text_message = string(38) "Off-server thumbnailing is not allowed"
$this->config_nooffsitelink_enabled = TRUE
$this->config_nooffsitelink_valid_domains = array(1) { [0]=> string(24) "newtonartassociation.com" }
$this->config_nooffsitelink_require_refer = FALSE
$this->config_nooffsitelink_erase_image = FALSE
$this->config_nooffsitelink_text_message = string(41) "Image taken from newtonartassociation.com"
$this->config_high_security_enabled = TRUE
$this->config_allow_src_above_docroot = FALSE
$this->config_allow_src_above_phpthumb = TRUE
$this->config_max_source_pixels = float 22369621
$this->config_use_exif_thumbnail_for_speed = FALSE
$this->config_border_hexcolor = string(6) "000000"
$this->config_background_hexcolor = string(6) "FFFFFF"
$this->config_ttf_directory = string(51) "/home2/newtonar/public_html/membership/resize/fonts"
$this->config_disable_pathinfo_parsing = TRUE
$this->config_disable_imagecopyresampled = FALSE
$this->phpThumbDebug = integer 9
$this->thumbnailQuality = integer 75
$this->thumbnailFormat = string(4) "jpeg"
$this->gdimg_output = NULL
$this->gdimg_source = resource
$this->sourceFilename = string(72) "/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg"
$this->source_width = integer 150
$this->source_height = integer 170
$this->thumbnailCropX = NULL
$this->thumbnailCropY = NULL
$this->thumbnailCropW = NULL
$this->thumbnailCropH = NULL
$this->exif_thumbnail_width = NULL
$this->exif_thumbnail_height = NULL
$this->exif_thumbnail_type = NULL
$this->thumbnail_width = NULL
$this->thumbnail_height = NULL
$this->thumbnail_image_width = NULL
$this->thumbnail_image_height = NULL
strlen($this->rawImageData) = 0
strlen($this->exif_thumbnail_data) = 0
$this->src = string(72) "/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg"
$this->new = NULL
$this->w = string(3) "150"
$this->h = string(0) ""
$this->f = string(0) ""
$this->q = integer 75
$this->sx = NULL
$this->sy = NULL
$this->sw = NULL
$this->sh = NULL
$this->far = NULL
$this->bg = NULL
$this->bc = NULL
$this->file = NULL
$this->goto = NULL
$this->err = NULL
$this->xto = NULL
$this->ra = NULL
$this->ar = NULL
$this->aoe = NULL
$this->iar = NULL
$this->maxb = NULL
builtin_function_exists(exif_thumbnail) = TRUE
builtin_function_exists(gd_info) = TRUE
builtin_function_exists(image_type_to_mime_type) = TRUE
builtin_function_exists(getimagesize) = TRUE
builtin_function_exists(imagecopyresampled) = TRUE
builtin_function_exists(imagecopyresized) = TRUE
builtin_function_exists(imagecreate) = TRUE
builtin_function_exists(imagecreatefromstring) = TRUE
builtin_function_exists(imagecreatetruecolor) = TRUE
builtin_function_exists(imageistruecolor) = TRUE
builtin_function_exists(imagerotate) = TRUE
builtin_function_exists(imagetypes) = TRUE
builtin_function_exists(version_compare) = TRUE
builtin_function_exists(imagecreatefromgif) = TRUE
builtin_function_exists(imagecreatefromjpeg) = TRUE
builtin_function_exists(imagecreatefrompng) = TRUE
builtin_function_exists(imagecreatefromwbmp) = TRUE
builtin_function_exists(imagecreatefromxbm) = TRUE
builtin_function_exists(imagecreatefromxpm) = FALSE
builtin_function_exists(imagecreatefromstring) = TRUE
builtin_function_exists(imagecreatefromgd) = TRUE
builtin_function_exists(imagecreatefromgd2) = TRUE
builtin_function_exists(imagecreatefromgd2part) = TRUE
builtin_function_exists(imagejpeg) = TRUE
builtin_function_exists(imagegif) = TRUE
builtin_function_exists(imagepng) = TRUE
builtin_function_exists(imagewbmp) = TRUE
gd_info.GD Version = string(26) "bundled (2.1.0 compatible)"
gd_info.FreeType Support = TRUE
gd_info.FreeType Linkage = string(13) "with freetype"
gd_info.GIF Read Support = TRUE
gd_info.GIF Create Support = TRUE
gd_info.JPEG Support = TRUE
gd_info.PNG Support = TRUE
gd_info.WBMP Support = TRUE
gd_info.XPM Support = FALSE
gd_info.XBM Support = TRUE
gd_info.WebP Support = FALSE
gd_info.JIS-mapped Japanese Font Support = FALSE
exif_info.EXIF Support = string(7) "enabled"
exif_info.EXIF Version = string(6) "7.0.31"
exif_info.Supported EXIF Version = string(4) "0220"
exif_info.Supported filetypes = string(9) "JPEG,TIFF"
ApacheLookupURIarray() -- FAILED
$_GET[src] = string(26) "show_images/590-Salter.jpg"
$_GET[w] = string(3) "150"
$_GET[hash] = string(32) "9a8233d9d9bf4083bcce51cd56ac2533"
$_GET[phpThumbDebug] = integer 9
$this->debugmessages:
* phpThumb() v1.7.15-201902101903 in file "phpthumb.class.php" on line 229
* setParameter(config_document_root, string(10) "../resize/") in file "phpThumb.php" on line 156
* setParameter(config_disable_debug, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_high_security_enabled, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_high_security_url_separator, string(1) "&") in file "phpThumb.php" on line 156
* setParameter(config_allow_src_above_docroot, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_allow_src_above_phpthumb, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_auto_allow_symlinks, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_additional_allowed_dirs, array(0) { } ) in file "phpThumb.php" on line 156
* setParameter(config_cache_directory, string(52) "/home2/newtonar/public_html/membership/resize/cache/") in file "phpThumb.php" on line 156
* setParameter(config_cache_disable_warning, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_cache_directory_depth, integer 2) in file "phpThumb.php" on line 156
* setParameter(config_cache_maxage, integer 2592000) in file "phpThumb.php" on line 156
* setParameter(config_cache_maxsize, integer 10485760) in file "phpThumb.php" on line 156
* setParameter(config_cache_maxfiles, integer 200) in file "phpThumb.php" on line 156
* setParameter(config_cache_source_enabled, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_cache_source_directory, string(59) "/home2/newtonar/public_html/membership/resize/cache/source/") in file "phpThumb.php" on line 156
* setParameter(config_cache_source_filemtime_ignore_local, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_cache_source_filemtime_ignore_remote, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_cache_default_only_suffix, string(0) "") in file "phpThumb.php" on line 156
* setParameter(config_cache_prefix, string(40) "phpThumb_cache_newtonartassociation.com_") in file "phpThumb.php" on line 156
* setParameter(config_cache_force_passthru, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_temp_directory, string(52) "/home2/newtonar/public_html/membership/resize/cache/") in file "phpThumb.php" on line 156
* setParameter(config_prefer_imagemagick, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_imagemagick_use_thumbnail, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_imagemagick_path, NULL) in file "phpThumb.php" on line 156
* setParameter(config_max_source_pixels, float 22369621) in file "phpThumb.php" on line 156
* setParameter(config_output_format, string(4) "jpeg") in file "phpThumb.php" on line 156
* setParameter(config_output_maxwidth, integer 0) in file "phpThumb.php" on line 156
* setParameter(config_output_maxheight, integer 0) in file "phpThumb.php" on line 156
* setParameter(config_output_interlace, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_error_image_width, integer 400) in file "phpThumb.php" on line 156
* setParameter(config_error_image_height, integer 100) in file "phpThumb.php" on line 156
* setParameter(config_error_message_image_default, string(0) "") in file "phpThumb.php" on line 156
* setParameter(config_error_bgcolor, string(6) "CCCCFF") in file "phpThumb.php" on line 156
* setParameter(config_error_textcolor, string(6) "FF0000") in file "phpThumb.php" on line 156
* setParameter(config_error_fontsize, integer 1) in file "phpThumb.php" on line 156
* setParameter(config_error_die_on_error, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_error_silent_die_on_error, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_error_die_on_source_failure, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_nohotlink_enabled, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_nohotlink_valid_domains, array(1) { [0]=> string(24) "newtonartassociation.com" } ) in file "phpThumb.php" on line 156
* setParameter(config_nohotlink_erase_image, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_nohotlink_text_message, string(38) "Off-server thumbnailing is not allowed") in file "phpThumb.php" on line 156
* setParameter(config_nooffsitelink_enabled, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_nooffsitelink_valid_domains, array(1) { [0]=> string(24) "newtonartassociation.com" } ) in file "phpThumb.php" on line 156
* setParameter(config_nooffsitelink_require_refer, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_nooffsitelink_erase_image, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_nooffsitelink_watermark_src, string(26) "/demo/images/watermark.png") in file "phpThumb.php" on line 156
* setParameter(config_nooffsitelink_text_message, string(41) "Image taken from newtonartassociation.com") in file "phpThumb.php" on line 156
* setParameter(config_border_hexcolor, string(6) "000000") in file "phpThumb.php" on line 156
* setParameter(config_background_hexcolor, string(6) "FFFFFF") in file "phpThumb.php" on line 156
* setParameter(config_ttf_directory, string(51) "/home2/newtonar/public_html/membership/resize/fonts") in file "phpThumb.php" on line 156
* setParameter(config_http_user_agent, string(115) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36") in file "phpThumb.php" on line 156
* setParameter(config_disable_pathinfo_parsing, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_disable_imagecopyresampled, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_disable_onlycreateable_passthru, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_disable_realpath, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_http_fopen_timeout, integer 10) in file "phpThumb.php" on line 156
* setParameter(config_http_follow_redirect, TRUE) in file "phpThumb.php" on line 156
* setParameter(config_allow_local_http_src, FALSE) in file "phpThumb.php" on line 156
* setParameter(config_use_exif_thumbnail_for_speed, FALSE) in file "phpThumb.php" on line 156
* setParameter(src, string(26) "show_images/590-Salter.jpg") in file "phpThumb.php" on line 389
* resolvePath: /home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg (allowed_dirs: Array
(
)
) in file "phpthumb.class.php" on line 1176
* resolvePath: iteration, path=/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg, base path = /home2/newtonar/public_html/membership/resize in file "phpthumb.class.php" on line 1195
* open_basedir: "" in file "phpthumb.class.php" on line 1162
* resolvePath: stop at component 8 in file "phpthumb.class.php" on line 1211
* resolvePath: stop at path=/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg in file "phpthumb.class.php" on line 1214
* resolvePath: path parsed, over in file "phpthumb.class.php" on line 1220
* setSourceFilename(/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg) set $this->sourceFilename to "/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg" in file "phpthumb.class.php" on line 294
* setParameter(w, string(3) "150") in file "phpThumb.php" on line 389
* setParameter(hash, string(32) "9a8233d9d9bf4083bcce51cd56ac2533") in file "phpThumb.php" on line 389
* setParameter(phpThumbDebug, integer 9) in file "phpThumb.php" on line 389
* $CanPassThroughDirectly=false because $_GET[hash] are set in file "phpThumb.php" on line 472
* $CanPassThroughDirectly="0" && $phpThumb->src="/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg" in file "phpThumb.php" on line 483
* Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 999
* $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg;webp) in file "phpthumb.class.php" on line 1005
* $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 1016
* $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 1033
* SetCacheFilename() _src set from md5($this->sourceFilename) "/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg" = "4eed75475b34d046431643f8c21cb938" in file "phpthumb.class.php" on line 3587
* SetCacheFilename() _par set from md5(_w150_dpi150_q75) in file "phpthumb.class.php" on line 3620
* Would have used cached file, but skipping due to phpThumbDebug in file "phpThumb.php" on line 66
* * Would have sent headers (1): Last-Modified: Sun, 28 Jul 2019 18:38:36 GMT in file "phpThumb.php" on line 67
* * Would have sent headers (2): Content-Type: image/jpeg in file "phpThumb.php" on line 69
* * Would have sent data: readfile(/home2/newtonar/public_html/membership/resize/cache//4/4e/phpThumb_cache_newtonartassociation.com__src4eed75475b34d046431643f8c21cb938_par0b9e73569dbbfe81d5e1ff2a11d92887_dat1564103397.jpeg) in file "phpThumb.php" on line 74
* resolvePath: /home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg (allowed_dirs: Array
(
)
) in file "phpthumb.class.php" on line 1176
* resolvePath: iteration, path=/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg, base path = /home2/newtonar/public_html/membership/resize in file "phpthumb.class.php" on line 1195
* resolvePath: stop at component 8 in file "phpthumb.class.php" on line 1211
* resolvePath: stop at path=/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg in file "phpthumb.class.php" on line 1214
* resolvePath: path parsed, over in file "phpthumb.class.php" on line 1220
* $this->sourceFilename set to "/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg" in file "phpthumb.class.php" on line 926
* $this->cache_filename already set, skipping SetCacheFilename() in file "phpthumb.class.php" on line 3543
* starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3385
* getimagesize(/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg) says image is 3596x4081 in file "phpthumb.class.php" on line 3395
* $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1631
* phpThumb_tempnam() returning "/home2/newtonar/public_html/membership/resize/cache/pThumbYd1kfT" in file "phpthumb.class.php" on line 4422
* ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1567
* getimagesize(/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg) SUCCEEDED: Array
(
[0] => 3596
[1] => 4081
[2] => 2
[3] => width="3596" height="4081"
[bits] => 8
[channels] => 3
[mime] => image/jpeg
)
in file "phpthumb.class.php" on line 1726
* ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1567
* getimagesize(/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg) returned [w=3596;h=4081;f=2] in file "phpthumb.class.php" on line 1741
* source dimensions set to 3596x4081 in file "phpthumb.class.php" on line 1744
* SetOrientationDependantWidthHeight() starting with "3596"x"4081" in file "phpthumb.class.php" on line 3364
* SetOrientationDependantWidthHeight() setting w="150", h="0" in file "phpthumb.class.php" on line 3380
* Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 2292
* ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1564
* ImageMagick called as (convert '/home2/newtonar/public_html/membership/resize/show_images/590-Salter.jpg[0]' -flatten -density '150' -background '#FFFFFF' -thumbnail '150x' -quality '75' -interlace line jpeg:'/home2/newtonar/public_html/membership/resize/cache/pThumbYd1kfT' 2>&1) in file "phpthumb.class.php" on line 2310
* getimagesize(/home2/newtonar/public_html/membership/resize/cache/pThumbYd1kfT) returned [w=150;h=170;f=2] in file "phpthumb.class.php" on line 2327
* ImageMagickThumbnailToGD::imagecreatefromjpeg() succeeded, $this->gdimg_source is now (150x170) in file "phpthumb.class.php" on line 2333
* ImageMagickThumbnailToGD() returning $this->IMresizedData (5494 bytes) in file "phpthumb.class.php" on line 2334
* deleting "/home2/newtonar/public_html/membership/resize/cache/pThumbYd1kfT" in file "phpthumb.class.php" on line 2340
* Skipping rest of GenerateThumbnail() because ($this->useRawIMoutput == true) in file "phpthumb.class.php" on line 369
* CleanUpCacheDirectory() set to purge (30.0 days; 10.00 MB; 200 files) in file "phpthumb.class.php" on line 744
* CleanUpCacheDirectory() skipped because "/home2/newtonar/public_html/membership/resize/cache//phpThumbCacheStats.txt" is recently modified in file "phpthumb.class.php" on line 754
* RenderOutput copying $this->IMresizedData (5494 bytes) to $this->outputImage in file "phpthumb.class.php" on line 456
* RenderToFile(/home2/newtonar/public_html/membership/resize/cache//4/4e/phpThumb_cache_newtonartassociation.com__src4eed75475b34d046431643f8c21cb938_par0b9e73569dbbfe81d5e1ff2a11d92887_dat1564103397.jpeg) succeeded in file "phpthumb.class.php" on line 622
* Would have used cached file, but skipping due to phpThumbDebug in file "phpThumb.php" on line 66
* * Would have sent headers (1): Last-Modified: Sun, 28 Jul 2019 18:38:36 GMT in file "phpThumb.php" on line 67
* * Would have sent headers (2): Content-Type: image/jpeg in file "phpThumb.php" on line 69
* * Would have sent data: readfile(/home2/newtonar/public_html/membership/resize/cache//4/4e/phpThumb_cache_newtonartassociation.com__src4eed75475b34d046431643f8c21cb938_par0b9e73569dbbfe81d5e1ff2a11d92887_dat1564103397.jpeg) in file "phpThumb.php" on line 74
$this->debugtiming:
* 1564341644.038278 : phpThumb() constructor in file "phpthumb.class.php" on line 228
* 1564341644.029989 : phpThumb.php start in file "phpThumb.php" on line 123
* 1564341644.039164 : phpThumbDebug[0] in file "phpThumb.php" on line 215
* 1564341644.039203 : phpThumbDebug[1] in file "phpThumb.php" on line 272
* 1564341644.039247 : phpThumbDebug[2] in file "phpThumb.php" on line 374
* 1564341644.039508 : phpThumbDebug[3] in file "phpThumb.php" on line 410
* 1564341644.039579 : phpThumbDebug[4] in file "phpThumb.php" on line 477
* 1564341644.039591 : phpThumbDebug[5] in file "phpThumb.php" on line 564
* 1564341644.039740 : skipped using cached image in file "phpThumb.php" on line 65
* 1564341644.039860 : phpThumbDebug[6] in file "phpThumb.php" on line 580
* 1564341644.039896 : phpThumbDebug[7] in file "phpThumb.php" on line 645
* 1564341644.938110 : phpThumbDebug[8] in file "phpThumb.php" on line 655
* 1564341644.938636 : skipped using cached image in file "phpThumb.php" on line 65
* 1564341644.938711 : phpThumbDebug[9] in file "phpThumb.php" on line 688
* Total processing time: 0.908722
The text was updated successfully, but these errors were encountered:
I have seen similar problems before, but without solution. It's not any bug in phpThumb per se, but seems to be related to server resources (too many thumbnails processed at once lead to the occasional timeout).
Unfortunately I don't have any particular solution to offer. Perhaps another user who has experienced this problem can offer other suggestions.
I tried adding this line after the phpThumb call:
time_nanosleep(0, 070000000);
in an attempt to give the system time to pull itself together between each image construction.
It increased the time it took to start showing the images but still came up with several broken ones. So no really noticeable improvement.
Would there be any advantage to using phpThumb.php rather than phpThumbURL?
I am using a page that I have used in the past (this is the site of an art organization and they have various shows that repeat each year; this is probably the third year on this show). In the past, all the images displayed without a problem. This year, I'm getting occasional broken images and I don't see any pattern to it.
For the purpose of this question, I excerpted the phpThumb code since the rest of the code was not relevant to the problem. This is the URL of the page in question:
https://newtonartassociation.com/membership/admin/mb_test.php
This is the phpThumb code on that page:
You should get a fairly lengthy column of 150px wide images. It looks fine until you start scrolling down and then you start seeing broken images. The broken images are more numerous as you get further down the column, and near the bottom there are more broken ones that unbroken ones. If you right-click on a broken image, you can look at it in a new tab (Chrome) or reload it (Firefox) and then if you go back to the original page the reloaded image is there. But if you reload the entire page (especially with a CTRL-reload) the broken ones show up again. But note that the ones that are broken are not always the same ones.
Also note that Firefox shows many more broken images than Chrome.
I have tried several different approaches - I changed the PHP version (5.6 and 7.0 produce the same results). I got the latest (development) version of phpThumb. Nothing seems to make much of a difference.
I hope you can make a suggestion - I have a client who is getting impatient.
I enabled debugging and got this:
The text was updated successfully, but these errors were encountered: