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



Reply With Quote
