No watermarks displaying IH5
Cannot get watermarks to display on our image files after upgrading to 1.5.8 from 1.5.7c. In tracking that down it appears we are having some issues with IH5 in our error logs.
Need some direction of where to look to solve this.
PHP Version: 7.4.33 (Zend: 3.4.0)
Database Engine: MySQL 5.5.5-10.3.38-MariaDB-0+deb10u1
Error log:
File Contents(logs/myDEBUG-20230223-051449-106252-warning.log)
[23-Feb-2023 05:14:49 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 mkdir() called at [/includes/functions/extra_functions/functions_bmz_io.php:100]
#2 io_mkdir_p() called at [/includes/functions/extra_functions/functions_bmz_io.php:79]
#3 io_makeFileDir() called at [/includes/classes/bmz_image_handler.class.php:491]
#4 ih_image->getCacheName() called at [/includes/classes/bmz_image_handler.class.php:409]
#5 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#6 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#7 handle_image() called at [/includes/functions/html_output.php:216]
#8 zen_image() called at [/includes/templates/template_default/sideboxes/tpl_whats_new.php:17]
#9 require(/includes/templates/template_default/sideboxes/tpl_whats_new.php) called at [/includes/modules/sideboxes/whats_new.php:26]
#10 include(/includes/modules/sideboxes/whats_new.php) called at [/includes/modules/column_left.php:30]
#11 require(/includes/modules/column_left.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:142]
#12 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: mkdir(): Permission denied in /includes/functions/extra_functions/functions_bmz_io.php on line 100.
[23-Feb-2023 05:14:49 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 imagejpeg() called at [/includes/classes/bmz_image_handler.class.php:1014]
#2 ih_image->save_imageGD() called at [/includes/classes/bmz_image_handler.class.php:893]
#3 ih_image->resize_imageGD() called at [/includes/classes/bmz_image_handler.class.php:421]
#4 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#5 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#6 handle_image() called at [/includes/functions/html_output.php:216]
#7 zen_image() called at [/includes/templates/template_default/sideboxes/tpl_whats_new.php:17]
#8 require(/includes/templates/template_default/sideboxes/tpl_whats_new.php) called at [/includes/modules/sideboxes/whats_new.php:26]
#9 include(/includes/modules/sideboxes/whats_new.php) called at [/includes/modules/column_left.php:30]
#10 require(/includes/modules/column_left.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:142]
#11 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: imagejpeg(/bmz_cache/6/69055-90a06jpg.image.150x117.jpg): failed to open stream: No such file or directory in /includes/classes/bmz_image_handler.class.php on line 1014.
[23-Feb-2023 05:14:49 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 mkdir() called at [/includes/functions/extra_functions/functions_bmz_io.php:100]
#2 io_mkdir_p() called at [/includes/functions/extra_functions/functions_bmz_io.php:79]
#3 io_makeFileDir() called at [/includes/classes/bmz_image_handler.class.php:491]
#4 ih_image->getCacheName() called at [/includes/classes/bmz_image_handler.class.php:409]
#5 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#6 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#7 handle_image() called at [/includes/functions/html_output.php:216]
#8 zen_image() called at [/includes/templates/responsive_classic/sideboxes/tpl_reviews_random.php:15]
#9 require(/includes/templates/responsive_classic/sideboxes/tpl_reviews_random.php) called at [/includes/modules/sideboxes/reviews.php:32]
#10 include(/includes/modules/sideboxes/reviews.php) called at [/includes/modules/column_left.php:30]
#11 require(/includes/modules/column_left.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:142]
#12 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: mkdir(): Permission denied in /includes/functions/extra_functions/functions_bmz_io.php on line 100.
[23-Feb-2023 05:14:50 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 imagejpeg() called at [/includes/classes/bmz_image_handler.class.php:1014]
#2 ih_image->save_imageGD() called at [/includes/classes/bmz_image_handler.class.php:893]
#3 ih_image->resize_imageGD() called at [/includes/classes/bmz_image_handler.class.php:421]
#4 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#5 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#6 handle_image() called at [/includes/functions/html_output.php:216]
#7 zen_image() called at [/includes/templates/responsive_classic/sideboxes/tpl_reviews_random.php:15]
#8 require(/includes/templates/responsive_classic/sideboxes/tpl_reviews_random.php) called at [/includes/modules/sideboxes/reviews.php:32]
#9 include(/includes/modules/sideboxes/reviews.php) called at [/includes/modules/column_left.php:30]
#10 require(/includes/modules/column_left.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:142]
#11 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: imagejpeg(/bmz_cache/8/81551-60320jpg.image.117x120.jpg): failed to open stream: No such file or directory in /includes/classes/bmz_image_handler.class.php on line 1014.
[23-Feb-2023 05:14:50 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 mkdir() called at [/includes/functions/extra_functions/functions_bmz_io.php:100]
#2 io_mkdir_p() called at [/includes/functions/extra_functions/functions_bmz_io.php:79]
#3 io_makeFileDir() called at [/includes/classes/bmz_image_handler.class.php:491]
#4 ih_image->getCacheName() called at [/includes/classes/bmz_image_handler.class.php:409]
#5 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#6 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#7 handle_image() called at [/includes/functions/html_output.php:216]
#8 zen_image() called at [/includes/modules/responsive_classic/product_listing.php:366]
#9 include(/includes/modules/responsive_classic/product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php:10]
#10 require(/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_index_product_list.php:108]
#11 require(/includes/templates/responsive_classic/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:231]
#12 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:178]
#13 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: mkdir(): Permission denied in /includes/functions/extra_functions/functions_bmz_io.php on line 100.
[23-Feb-2023 05:14:50 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 imagejpeg() called at [/includes/classes/bmz_image_handler.class.php:1014]
#2 ih_image->save_imageGD() called at [/includes/classes/bmz_image_handler.class.php:893]
#3 ih_image->resize_imageGD() called at [/includes/classes/bmz_image_handler.class.php:421]
#4 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#5 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#6 handle_image() called at [/includes/functions/html_output.php:216]
#7 zen_image() called at [/includes/modules/responsive_classic/product_listing.php:366]
#8 include(/includes/modules/responsive_classic/product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php:10]
#9 require(/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_index_product_list.php:108]
#10 require(/includes/templates/responsive_classic/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:231]
#11 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:178]
#12 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: imagejpeg(/bmz_cache/1/13575-17010jpg.image.200x131.jpg): failed to open stream: No such file or directory in /includes/classes/bmz_image_handler.class.php on line 1014.
[23-Feb-2023 05:14:50 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 mkdir() called at [/includes/functions/extra_functions/functions_bmz_io.php:100]
#2 io_mkdir_p() called at [/includes/functions/extra_functions/functions_bmz_io.php:79]
#3 io_makeFileDir() called at [/includes/classes/bmz_image_handler.class.php:491]
#4 ih_image->getCacheName() called at [/includes/classes/bmz_image_handler.class.php:409]
#5 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#6 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#7 handle_image() called at [/includes/functions/html_output.php:216]
#8 zen_image() called at [/includes/modules/responsive_classic/product_listing.php:366]
#9 include(/includes/modules/responsive_classic/product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php:10]
#10 require(/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_index_product_list.php:108]
#11 require(/includes/templates/responsive_classic/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:231]
#12 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:178]
#13 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: mkdir(): Permission denied in /includes/functions/extra_functions/functions_bmz_io.php on line 100.
[23-Feb-2023 05:14:50 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 imagejpeg() called at [/includes/classes/bmz_image_handler.class.php:1014]
#2 ih_image->save_imageGD() called at [/includes/classes/bmz_image_handler.class.php:893]
#3 ih_image->resize_imageGD() called at [/includes/classes/bmz_image_handler.class.php:421]
#4 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#5 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#6 handle_image() called at [/includes/functions/html_output.php:216]
#7 zen_image() called at [/includes/modules/responsive_classic/product_listing.php:366]
#8 include(/includes/modules/responsive_classic/product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php:10]
#9 require(/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_index_product_list.php:108]
#10 require(/includes/templates/responsive_classic/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:231]
#11 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:178]
#12 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: imagejpeg(/bmz_cache/8/89620-32020jpg.image.200x150.JPG): failed to open stream: No such file or directory in /includes/classes/bmz_image_handler.class.php on line 1014.
[23-Feb-2023 05:14:50 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 mkdir() called at [/includes/functions/extra_functions/functions_bmz_io.php:100]
#2 io_mkdir_p() called at [/includes/functions/extra_functions/functions_bmz_io.php:79]
#3 io_makeFileDir() called at [/includes/classes/bmz_image_handler.class.php:491]
#4 ih_image->getCacheName() called at [/includes/classes/bmz_image_handler.class.php:409]
#5 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#6 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#7 handle_image() called at [/includes/functions/html_output.php:216]
#8 zen_image() called at [/includes/modules/responsive_classic/product_listing.php:366]
#9 include(/includes/modules/responsive_classic/product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php:10]
#10 require(/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_index_product_list.php:108]
#11 require(/includes/templates/responsive_classic/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:231]
#12 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:178]
#13 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: mkdir(): Permission denied in /includes/functions/extra_functions/functions_bmz_io.php on line 100.
[23-Feb-2023 05:14:50 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 imagejpeg() called at [/includes/classes/bmz_image_handler.class.php:1014]
#2 ih_image->save_imageGD() called at [/includes/classes/bmz_image_handler.class.php:893]
#3 ih_image->resize_imageGD() called at [/includes/classes/bmz_image_handler.class.php:421]
#4 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#5 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#6 handle_image() called at [/includes/functions/html_output.php:216]
#7 zen_image() called at [/includes/modules/responsive_classic/product_listing.php:366]
#8 include(/includes/modules/responsive_classic/product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php:10]
#9 require(/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php) called at [/includes/templates/responsive_classic/templates/tpl_index_product_list.php:108]
#10 require(/includes/templates/responsive_classic/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:231]
#11 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:178]
#12 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: imagejpeg(/bmz_cache/8/89620-32020jpg.image.200x150.JPG): failed to open stream: No such file or directory in /includes/classes/bmz_image_handler.class.php on line 1014.
Re: No watermarks displaying IH5
The root-cause is reflected in this element of the log
Code:
[23-Feb-2023 05:14:49 America/Los_Angeles] Request URI: /index.php?main_page=index&manufacturers_id=1&sort=20a&page=14, IP address: 52.167.144.88
#1 mkdir() called at [/includes/functions/extra_functions/functions_bmz_io.php:100]
#2 io_mkdir_p() called at [/includes/functions/extra_functions/functions_bmz_io.php:79]
#3 io_makeFileDir() called at [/includes/classes/bmz_image_handler.class.php:491]
#4 ih_image->getCacheName() called at [/includes/classes/bmz_image_handler.class.php:409]
#5 ih_image->get_resized_image() called at [/includes/classes/bmz_image_handler.class.php:279]
#6 ih_image->get_local() called at [/includes/functions/extra_functions/functions_bmz_image_handler.php:153]
#7 handle_image() called at [/includes/functions/html_output.php:216]
#8 zen_image() called at [/includes/templates/template_default/sideboxes/tpl_whats_new.php:17]
#9 require(/includes/templates/template_default/sideboxes/tpl_whats_new.php) called at [/includes/modules/sideboxes/whats_new.php:26]
#10 include(/includes/modules/sideboxes/whats_new.php) called at [/includes/modules/column_left.php:30]
#11 require(/includes/modules/column_left.php) called at [/includes/templates/responsive_classic/common/tpl_main_page.php:142]
#12 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: mkdir(): Permission denied in /includes/functions/extra_functions/functions_bmz_io.php on line 100.
A couple of questions:
1. Is there a /bmz_cache sub-directory created in the site's 'root' (same level as your /admin and /includes directories)?
2. If so, what are the permissions for that sub-directory? The permissions should be 755.
Also, identifying which version of IH5 you're using will help!
Re: No watermarks displaying IH5
Thank you for your help. Yes, that is present at the correct level and set at 755
Re: No watermarks displaying IH5
should the .htaccess file inside that folder be set at a particular number?
Image Handler5 Version: 5.3.1
Re: No watermarks displaying IH5
Quote:
Originally Posted by
cruiser
should the .htaccess file inside that folder be set at a particular number?
Image Handler5 Version: 5.3.1
Not sure what particular number you're referring to, just verifying that you've included the .htaccess provided by IH for that /bmz_cache directory.
Re: No watermarks displaying IH5
Sorry by number I meant permissions are also at 755 on that file.
Do you know if this error below is 100% trying to write to the /bmz_cache folder?:
--> PHP Warning: mkdir(): Permission denied in /includes/functions/extra_functions/functions_bmz_io.php on line 100.
Or is there another folder its trying to use?
Re: No watermarks displaying IH5
When you look (via FTP) at the site's file-system, is the 'owner' the same for /bmz_cache as for all the other directories?
What server OS is in use?
Re: No watermarks displaying IH5
Owner is the same.
Server OS: Linux 5.15.14-nrk-guest
Re: No watermarks displaying IH5
Thanks for the help! it was a server configuration that the web host fixed.
In case anyone else has an error; It was because the web server runs as user 'www-data' which doesn't have write permission to that dir.
Modified the group ownership of bmz_cache to www-data and made it group writable.
Re: No watermarks displaying IH5
Regarding the no-watermarks, I'm guessing that the site's setting for Configuration :: Images :: Cache File-naming Convention is set to Readable.
It appears that when that format was introduced that it unfortunately 'forgot' to include the watermarking. Sigh.