Re: Image Handler 4 Support Thread (BEFORE YOU POST A SUPPORT QUESTION HERE)
Because our website has too many pictures, I want to move them to another domain: http://www.xxx.com/images
I set up the code under:includes\configure.php:
Code:
define('DIR_WS_IMAGES', 'http://www.xxx.com/images/');
I need to change the <img src=bmz_cache/f/f80d0fad6742d2bc1025f58181039149.image.120x120.jpg">to<img src=http://images.xxx.com/bmz_cache/f/f80d0fad6742d2bc1025f58181039149.image.120x120.jpg">
how to edit IH4 code?
I have tried to edit IH4 includes\extra_configures\bmz_io_conf.php
Code:
$bmzConf['cachedir'] = DIR_FS_CATALOG . 'http://images.xxx.com/bmz_cache';
and IH4 admin\includes\init_includes\init_image_handler.php 44-47 line
Code:
DIR_FS_CATALOG.'http://www.xxx.com/bmz_cache/.htaccess',
DIR_FS_CATALOG.'http://www.xxx.com/images/watermark.png',
DIR_FS_CATALOG.'http://www.xxx.com/images/large/watermark_LRG.png',
DIR_FS_CATALOG.'http://www.xxx.com/images/medium/watermark_MED.png',
but it didn't work.
my serverinfo
Server OS: Linux 3.2.0-2-686-pae
MySQL 5.1.66-0+squeeze1-log
HTTP Server: Apache/2.2.22 (Debian)
PHP Version: 5.4.0-3 (Zend: 2.4.0)
Re: Image Handler 4 Support Thread (BEFORE YOU POST A SUPPORT QUESTION HERE)
Quote:
Originally Posted by
zch0071
but it didn't work.
This shouldn't really be a surprise. There is so much amiss with what you've done that its hard to know where to start.
Lets start here:
define('DIR_WS_IMAGES', 'http://www.xxx.com/images/');
Other than the SERVER defines, you'll note that none of the other defines have the "http...." format (other than your addition). What makes you think you would be able to make such an obvious radical departure of the format and actually expect it to work?
What is going to happen here is that your 'define' will simply be appended to the SERVER define (just like the others), and the final URL being requested will be
http://yourserver.name/http://www.xxx.com/images/. Clearly not a valid URL.
The next thing to note is the names that have been assigned to these defines, specifically, they all start with either DIR_WS_ or DIR_FS. This isn't because the developers couldn't make up their mind, it is because they signify different meanings. The "WS" indicates the path/url as seen by the webserver, and the "FS" indicates the path to the files on the host machine... IOW, one is actually a portion of a URL, the other is a portion of the file System and has nothing to do with Webservers at all.
"$bmzConf['cachedir'] = DIR_FS_CATALOG . 'http://images.xxx.com/bmz_cache';"
is going to end up looking for the images on the servers' own file system, under
a pathname like "/home/youraccount/public_html/http://images.xxx.com/bmz_cache"
Clearly, not a valid pathname.
"DIR_FS_CATALOG.'http://www.xxx.com/bmz_cache/.htaccess'",
I've no idea what this is supposed to be doing.
Anyway, now that I've told you all the things you've done wrong, I guess I should attempt to tell you what you need to do to put it right.
Alas, it isn't as simple as you are hoping. It isn't just a matter of changing these 'defines' because to do what you want you need to modify some
of the core code to bypass the normal processing of the image code.
Although this isn't something I've done (or attempted) for myself, I am of the understanding that at least one of the regular participants
around here has adapted thier store to serve their images from a 3rd party site and they may be willing to step in and share.
I've no idea if they've done this with, or without IH4 though.
Personally, I don't see much point to do this anyway. If my hosting sites aren't up to the task of serving up its own
images I won't hold much trust in them to host the store in the 1st place.. it'll only be a matter of time before SQL server gets overloaded (or similar), and
the idea of moving half the site (the images) off to another server due to limits on the 1st server seems like a half assed fix to a problem that
is best avoided in the 1st place.
Is you next step going to be to set up a remote SQL server when your current host tells you that your store is making too many SQL queries?
(Yes, some hosts have been know to put pressure on ZenCart merchants' due to seemingly excessive DB queries).
Anyway, make what you will of this rant. It is not my intent to cause you offence with my critique over what your done,
or what you wish to do. The 'mistakes' I pointed out are just a typical example of what others have also done
in the past (and will no doubt continue to do in the future). Please don't take my comments personally.
Cheers
Rod
Re: Image Handler 4 Support Thread (BEFORE YOU POST A SUPPORT QUESTION HERE)
Quote:
Originally Posted by
RodG
Alas, it isn't as simple as you are hoping. It isn't just a matter of changing these 'defines' because to do what you want you need to modify some
of the core code to bypass the normal processing of the image code.
Although this isn't something I've done (or attempted) for myself, I am of the understanding that at least one of the regular participants
around here has adapted thier store to serve their images from a 3rd party site and they may be willing to step in and share.
I've no idea if they've done this with, or without IH4 though.
Personally, I don't see much point to do this anyway. If my hosting sites aren't up to the task of serving up its own
images I won't hold much trust in them to host the store in the 1st place.. it'll only be a matter of time before SQL server gets overloaded (or similar), and
the idea of moving half the site (the images) off to another server due to limits on the 1st server seems like a half assed fix to a problem that
is best avoided in the 1st place.
Is you next step going to be to set up a remote SQL server when your current host tells you that your store is making too many SQL queries?
(Yes, some hosts have been know to put pressure on ZenCart merchants' due to seemingly excessive DB queries).
Anyway, make what you will of this rant. It is not my intent to cause you offence with my critique over what your done,
or what you wish to do. The 'mistakes' I pointed out are just a typical example of what others have also done
in the past (and will no doubt continue to do in the future). Please don't take my comments personally.
Cheers
Rod
I have to agree with this and will add the following comments.. Seems the RIGHT solution is to find a hosting provider who can better service the site without having to serve up the images from a separate domain.
However, if the OP insists on making this solution work, he is probably going to have to seek out some professional development assistance to properly modify IH4 to use his third party image site location as opposed to the default Zen Cart image location (as IH4 is designed to use). I too am not aware of anyone making third part images with IH4.. Doesn't mean it can't be done.. It's software.. it's possible if you are willing to put time and effort (and sometimes money) into it.
Re: Image Handler 4 Support Thread (BEFORE YOU POST A SUPPORT QUESTION HERE)
I am using 1.5.1 and the plugins are just the IH4
I am looking to find out how to set the popup window for the large image to the center of the screen. As it is now the image is coming up in the bottom right hand corner of the screen ..
Site I am working on http://dezertdezinez.com/workspace
Any help would be wonderful ..
2 Attachment(s)
No Images in Admin and no Popups
I have my new site up and working so I thought it was time to get my images in order. I have a local version of my site that I test on so I cannot give you a link to it. The details of the setup are below.
Zencart Version: 1.5.1
Template: Abbington Mega
Addons: FEC, CSS/JS Loader, Image Handler 4 Install Method 1
Local Host: XAMPP 1.7.4
Image Manger in Admin
Attachment 12609
GD Info from phpinfo
Attachment 12610
I have gone through all the files as you would in Install Method 2 and found nothing that I "SEE" to be wrong. My admin shows no images and I am not getting any popups when I hover. Basically the settings and menus in the admin appear to be correct...but nothing works. I am baffled. After going through the instructions for the 6th time, I cannot see anything that I missed. Any input is greatly appreciated.
Re: No Images in Admin and no Popups
ah...forgot...I have no logs showing errors.
one more note...XAMPP is running on Windows XP SP 3
Re: Image Handler 4 Support Thread
Running Version 1.5 of ZenCart, have only Image Handler V4 installed for photo maintenance with GD FreeType Version 2.3.7 (GD Version bundled (2.0.34 compatible)). Probably need to upgrade to the most recent sub-version; however, haven't seen in the documentation anything that indicates a potential upper limit on image dimensions. Others have commented either in this version or previous versions about how they have had to resize the image before presenting to IH4. I typically will ensure that the largest dimension of an image is 1280 pixels. Though some have been larger without issue, this seems to be about where the image can be displayed even in the small perspective. Otherwise, pages will not display that include the image (at any size) which is problematic also in the admin section.
Is this something that IH4 can not handle, is it related to GD, is it a combination of the two? When such an image is uploaded and causes problems, then if I disable IH4, I can go back and address the image (remove, replace, etc...); however, I can't seem to remember having seen anything documenting the upper limits of an image.
Re: No Images in Admin and no Popups
Quote:
Originally Posted by
g2ktcf
ah...forgot...I have no logs showing errors.
one more note...XAMPP is running on Windows XP SP 3
Hover images has been fixed...I had some odd settings in my image sizes that I had forgotten about...so after changing those back to the defaults, the popups are working great! :)
However, I still do not have I still have no images in the Image Manager....
Re: Image Handler 4 Support Thread
Additional Images dont show in Brighton Pets Template - Zen version 1.5.1 ... any suggestions why?
http://simply4pets.co.za/zencart7/index.php?main_page= IF you look at Front Seat Voyagers - Small Voyager - there is only small dotted lines but no images - if you disabled resize images then they images wil show but loading images is slow...dont want to disable resize in IH....
Thanks
Cecile
Re: Image Handler 4 Support Thread (BEFORE YOU POST A SUPPORT QUESTION HERE)
Quote:
Originally Posted by
Debbie2014
I am using 1.5.1 and the plugins are just the IH4
I am looking to find out how to set the popup window for the large image to the center of the screen. As it is now the image is coming up in the bottom right hand corner of the screen ..
Site I am working on
http://dezertdezinez.com/workspace
Any help would be wonderful ..
This is not related to Image Handler and it's probably better that you start a new thread to get your answer..