If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Started by lat9 on 15 Oct 2017, 3:54 PM · Views: 160,515

Results 541 to 560 of 774
23 Feb 2023, 1:19 PM
#541
cruiser avatar

cruiser

New Zenner

Join Date:
Aug 2006
Posts:
34
Plugin Contributions:
0

Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

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.

23 Feb 2023, 2:28 PM
#542
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

The root-cause is reflected in this element of the 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(): [B][I]Permission denied[/I][/B] 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!

23 Feb 2023, 2:32 PM
#543
cruiser avatar

cruiser

New Zenner

Join Date:
Aug 2006
Posts:
34
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

Thank you for your help. Yes, that is present at the correct level and set at 755

23 Feb 2023, 2:34 PM
#544
cruiser avatar

cruiser

New Zenner

Join Date:
Aug 2006
Posts:
34
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

should the .htaccess file inside that folder be set at a particular number?

Image Handler5 Version: 5.3.1

23 Feb 2023, 5:21 PM
#545
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

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.

23 Feb 2023, 5:26 PM
#546
cruiser avatar

cruiser

New Zenner

Join Date:
Aug 2006
Posts:
34
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

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?

23 Feb 2023, 5:40 PM
#547
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

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?

23 Feb 2023, 5:47 PM
#548
cruiser avatar

cruiser

New Zenner

Join Date:
Aug 2006
Posts:
34
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

**Owner is the same.

Server OS:** Linux 5.15.14-nrk-guest

23 Feb 2023, 6:13 PM
#549
cruiser avatar

cruiser

New Zenner

Join Date:
Aug 2006
Posts:
34
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

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.

23 Feb 2023, 6:27 PM
#550
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

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.

24 Feb 2023, 1:50 PM
#551
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

lat9:

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.
The current GitHub repository contents (https://github.com/DivaVocals/zen_Image-Handler) now contains the correction for those missing watermarks and also provides support for webp image types (thanks @brittainmark).

That updated release (v5.3.2) is forthcoming.

7 Mar 2023, 2:12 PM
#552
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

v3.5.2 of Image Handler 5 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2169

This release contains changes associated with the following GitHub issues:

#262: Add support for webp images.
#15: Don't count on an image's extension identifying the image's type; check the image's type programmatically (brittainmark).
#273: Restore watermarks for all "Cache-file Naming Conventions" (was only working for Hashed.

22 Mar 2023, 2:33 PM
#553
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

lat9:

You could use a site-specific init_includes module (you'll need to add an auto_loader, too) that loads somewhere around CP 200 that makes the change to $ihConf (it's a global variable) as you'd identified a couple of posts back.

Sorry I missed your reply @lat9 and thank you for teaching me something new. I was able to set a custom background colour for small images on product_info pages using your suggestion.

Simon

29 Mar 2023, 12:09 PM
#554
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

includes/classes/observers/ColorBoxObserver.php line 42 says

require DIR_WS_MODULES . zen_get_module_directory('zen_colorbox.php');

but that file doesn't exist either in IH or Zen Cart.

Should this logic test for the existence of the file first, or am I missing some needed code?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

29 Mar 2023, 12:44 PM
#555
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

swguy:

includes/classes/observers/ColorBoxObserver.php line 42 says

require DIR_WS_MODULES . zen_get_module_directory('zen_colorbox.php');

but that file doesn't exist either in IH or Zen Cart.

Should this logic test for the existence of the file first, or am I missing some needed code?
It does check:

        if (defined('ZEN_COLORBOX_STATUS') && ZEN_COLORBOX_STATUS == 'true') {
            $this->attach(
                $this,
                array(
                    //- From /includes/modules/additional_images.php
                    'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK',
                )
            );
        }

... but IH5 provides *only *that observer to aid in use when the overall ColorBox (or Fual Slimbox) plugin is installed. I'm guessing that you did an upgrade on a site that previously used ColorBox so its database configuration settings are still present. Been there, done that.

29 Mar 2023, 4:06 PM
#556
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

LOL thank you.

Others who may have this issue - you may not easily be able to find the ZEN_COLORBOX_STATUS admin page but you can turn the value off in SQL:

update configuration set configuration_value = 'false' where configuration_key = 'ZEN_COLORBOX_STATUS';

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

31 Mar 2023, 9:21 AM
#557
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

COLORBOX did supply an uninstall script

DELETE FROM `configuration` WHERE `configuration_key` LIKE 'ZEN_COLORBOX_%';
DELETE FROM `configuration_group` WHERE `configuration_group_title` = 'Zen Colorbox';
DELETE FROM `admin_pages` WHERE `language_key` = 'BOX_CONFIGURATION_ZEN_COLORBOX';

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

26 Apr 2023, 6:45 AM
#558
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
433
Plugin Contributions:
0

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

ZC158a; PHP 8.2.4; MySQL 10.4.17-MariaDB-log
I installed Image Handler 5.3.2 on my dev system and received a fatal error

 PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's canvas. Default is <strong>Center</Strong>.', 4, 1171, now(), NULL, 'zen_cf...' at line 4 :: INSERT IGNORE INTO zen_configuration
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function)
VALUES
('IH watermark gravity', 'WATERMARK_GRAVITY', 'Center', 'Select the position for the watermark relative to the image's canvas. Default is <strong>Center</Strong>.', 4, 1171, now(), NULL, 'zen_cfg_select_option([\'Center\',\'NorthWest\',\'North\',\'NorthEast\',\'East\',\'SouthEast\',\'South\',\'SouthWest\',\'West\'],') ==> (as called by) E:\Web\zc158A_DEV_PHP8.2\admin\includes\init_includes\init_image_handler.php on line 190 

the error comes from the escaped apostrophe ```html
the image's canvas


Because the installer crashed I did not have the option under Admin > Tools to uninstall image handler so I deleted the database entries based on the code in admin / image_handler_uninstall.php then recopied the files with the ofending apostrophe removed.


I have searched the net and cannot find any answer to the problem.


Is there a switch in MariaDB that disallows escaping characters such as this?


OldNGrey
ZC222 PHP 8.4.27
MySQL 11.8.5-MariaDB

26 Apr 2023, 1:38 PM
#559
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

OldNGrey:

ZC158a; PHP 8.2.4; MySQL 10.4.17-MariaDB-log
I installed Image Handler 5.3.2 on my dev system and received a fatal error

PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's canvas. Default is <strong>Center</Strong>.', 4, 1171, now(), NULL, 'zen_cf...' at line 4 :: INSERT IGNORE INTO zen_configuration
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function)
VALUES
('IH watermark gravity', 'WATERMARK_GRAVITY', 'Center', 'Select the position for the watermark relative to the image's canvas. Default is <strong>Center</Strong>.', 4, 1171, now(), NULL, 'zen_cfg_select_option(['Center','NorthWest','North','NorthEast','East','SouthEast','South','SouthWest','West'],') ==> (as called by) E:\Web\zc158A_DEV_PHP8.2\admin\includes\init_includes\init_image_handler.php on line 190

> 
> the error comes from the escaped apostrophe ```html
the image\'s canvas
``` on line 167.
> 
> Because the installer crashed I did not have the option under Admin > Tools to uninstall image handler so I deleted the database entries based on the code in admin / image_handler_uninstall.php then recopied the files with the ofending apostrophe removed.
> 
> 
> I have searched the net and cannot find any answer to the problem.
> 
> 
> Is there a switch in MariaDB that disallows escaping characters such as this?
Nope, it a bug that @marco-pm graciously corrected back in March (<https://github.com/lat9/zen_Image-Handler/pull/11/commits/010d6d5a390a2d94b78168e9fa888a6855bfd9b7>).  Let me get that 5.3.3 update going.
26 Apr 2023, 2:09 PM
#560
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread

lat9:

Nope, it a bug that @marco-pm graciously corrected back in March (https://github.com/lat9/zen_Image-Handler/pull/11/commits/010d6d5a390a2d94b78168e9fa888a6855bfd9b7). Let me get that 5.3.3 update going.
IH-5 v5.3.3 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2169

Thanks to @marco-pm for the initial bug-reports and corrections!

This release contains changes associated with the following GitHub issues:

#12: MySQL Error on Installation (not upgrade), due to mis-escaped single-quote.
#13: 'imagecopy' float implicit conversion warning