Re: Image Handler 3 Support Thread
I don't think there is confusion at my end. I agree with George.
The 'solution' posted does two things triggered by cron.
1. Deletes the log files
2. Clears some of the older files from the actual image cache.
1 is a bad idea because the log files are there for a good reason. If your site is creating errors you really want to sort that out not just delete the messages. A process that you went through I believe successfully, George. If the character encoding is causing a problem with html_entities then there are ways of getting around that. This is not really a Zen issue but is a php issue.
2. Is a bad idea because it makes image handler a bit pointless and increases server load during customer page load.
If your hosting is not large enough to store all the cached images then you need to get larger hosting. Or alternatively not use image handler and let the images be re-sized client-side.
Re: Image Handler 3 Support Thread
Nick, I hope that you didn't misunderstand me: what I meant is that Querk (not you) is confusing the cache log files with the bmz_cache image files.
I fully agree with you that the cache log files should not be deleted with a cron job without being examined first. My "solution", thanks to your suggestion, just does not create log files from character encoding any more. Other log files are of course created by Zen Cart for different reasons. And, obviously, there's no point in deleting the bmz_cache as this defeats the purpose of having IH installed.
Re: Image Handler 3 Support Thread
^^ First of all, I know the purpose for "cache" and "bmz_cache".
*Cache is an error log.
*bmz_cahe is "like a RAM for PC" (or internet temp, or Browser cache --> it stores image files, to speed things up)
----------------------------------
I know that is "sort of" B*******t delete log files. But there was so many. It prevent me from connecting to server. Cron was only solution. I am a novice in "this PHP-zencart-servers-world" and you must understand that it is frustrating not have a quick solution for impatient customer.
I read every log file, that appear. I was solid in debugging. Only error i had to debug was that "charset thing".
Everything was working on page, therefore i decided to delete logfiles. (I have another errorlogfile in webadmin in our webhost, i see every error on server, therefore i decided that too)
:lamo:
To debug that error (from what i read)
You mean like this?
**error log
HTML Code:
charset `windows-1250' not supported, assuming iso-8859-1 in .../bmz_image_handler.class.php on line 690
Change code FROM this
PHP Code:
$alt = addslashes(htmlentities($alt, ENT_COMPAT, CHARSET));
TO this
PHP Code:
$alt = addslashes(htmlentities($alt, ENT_COMPAT, cp1251));
?
(if yes, good ^^ --> log file stoped to appear (not caused by cron, it was turned off))
----------------------------------
bmz_cahe is important, but complete clear bmz_cache one per week is not that bad idea. (for customer which do not know "how point and click on -- imagehandler/admin/clear cache" is cron better idea) ... me think...
Re: Image Handler 3 Support Thread
Yes, that is the kind of thing that George was talking about. It is better to solve the error than just delete the log file. There are issues with html_entities and certain character sets so, in those cases, this line of code will create errors.
If people, including me, sounded abrupt in the last few posts, then I am sure we apologise. The thing is that advice that is posted on this thread is taken by the readers to be 'semi-official ' and if some of us think that there is bad advice being posted then it helps other users if we say so.
In my opinion, using cron to clear the bmz_cache folders is not good advice.
The files in that folder only need to be cleared in certain circumstances. For instance, if the size of images on your site is changed. Otherwise deleting the files just means that image handler needs to recreate them, which is not only pointless but actually uses processing resources
Again, just my opinion.
@George - no I didn't take it that way. :smile:
Re: Image Handler 3 Support Thread
Quote:
Originally Posted by
niccol
Yes, that is the kind of thing that George was talking about. It is better to solve the error than just delete the log file. There are issues with html_entities and certain character sets so, in those cases, this line of code will create errors.
and I need to point out that AT NO TIME was it ever clear that THIS was the real issue Querk was having..
Quote:
Originally Posted by
niccol
If people, including me, sounded abrupt in the last few posts, then I am sure we apologise. The thing is that advice that is posted on this thread is taken by the readers to be 'semi-official ' and if some of us think that there is bad advice being posted then it helps other users if we say so.
Exactly.. which is why I made the statements I made.. I don't want ANYONE thinking that regularly clearing the bmz_cache folder "just because" is a good idea.. Because as niccol correctly points out, it's just NOT good advice..
I also do NOT want people who follow the advice posted here to get the impression that creating a cron job to delete the PHP error log files stored in the cache folders is a good idea... and again it was NOT clear in Querk's posts what the REAL issue he was having was nor was it clear that what was REALLY being advocated was resolving the issue before deleting the error logs. It just looks like advice and code to delete the error logs using a cron job -- no mention of the REAL problem or the solution used to resolve the REAL problem.. just code to delete the error logs.
Quote:
Originally Posted by
niccol
In my opinion, using cron to clear the bmz_cache folders is not good advice.
The files in that folder only need to be cleared in certain circumstances. For instance, if the size of images on your site is changed. Otherwise deleting the files just means that image handler needs to recreate them, which is not only pointless but actually uses processing resources
Again, just my opinion.
@George - no I didn't take it that way. :smile:
Nods in agreement.. :yes:
1 Attachment(s)
Re: Image Handler 3 Support Thread
On a different note
DivaVocals knows that I am developing a different version of imagehandler. However, I am doing this in two different ways. (this one is different to the one you have, Diva) The first way is re-size on upload. The second way is re-scale when the image is used.
The second way simply creates a scaled version of the image in a directory on the server. It does this the first time that size is requested. After that first time it uses the stored version.
It is at a very early stage but if anyone want to give it a go on a development site (NOT A LIVE STORE) then that would be great. It's advantage is that it is a single file :-)
It has limitations at the moment so you may have issues if your server is configured in certain ways and if your images are large.
It is VERY simple and really at this stage is proof of concept rather than a finished article. But if anyone can add some feedback then it might turn into something. There is a read me file in the zip.
Thanks
Re: Image Handler 3 Support Thread
Nick you KNOW I love you..:hug: and you know I am all for what you are doing with your new image management mod (which BTW, I'll start testing tonight and FINALLY get you some feedback..:smile: Kinda excited to see what you've been cooking up..:smile:)
BUT
(you know what I'm getting ready to say right?????? :laugh:)
Perhaps we should move this discussion to a new thread?? I don't want to take this support thread too far off topic.. :smile:
Quote:
Originally Posted by
niccol
On a different note
DivaVocals knows that I am developing a different version of imagehandler. However, I am doing this in two different ways. (this one is different to the one you have, Diva) The first way is re-size on upload. The second way is re-scale when the image is used.
The second way simply creates a scaled version of the image in a directory on the server. It does this the first time that size is requested. After that first time it uses the stored version.
It is at a very early stage but if anyone want to give it a go on a development site (NOT A LIVE STORE) then that would be great. It's advantage is that it is a single file :-)
It has limitations at the moment so you may have issues if your server is configured in certain ways and if your images are large.
It is VERY simple and really at this stage is proof of concept rather than a finished article. But if anyone can add some feedback then it might turn into something. There is a read me file in the zip.
Thanks
Re: Image Handler 3 Support Thread
Fair Point :smile:
It is at:
http://www.zen-cart.com/forum/showth...72#post1096872
@Diva
Note that what is posted here is entirely different to what you have. Scale on demand rather than scale on upload. Still deciding :smile: As there is no real solution for IH on 1.5 at the moment this is just my quick fix for that problem.
Re: Image Handler 3 Support Thread
Hello
Got a wee bizarre user end question - for some reason images with the extension JPG are not being resized, picked up - but images with file extension jpg are (i.e down to teh image extension being in capitals).
Where can I change/amend image settings so image handle recognizes the image file with the image extension being in capitals - there are 2 many images for me to go through and rename these manually to having a lower case extension.
I've had a look through the files but I can't see what I need to amend - any ideas?
Re: Image Handler 3 Support Thread
Quote:
Originally Posted by
peanut77
Hello
Got a wee bizarre user end question - for some reason images with the extension JPG are not being resized, picked up - but images with file extension jpg are (i.e down to teh image extension being in capitals).
Where can I change/amend image settings so image handle recognizes the image file with the image extension being in capitals - there are 2 many images for me to go through and rename these manually to having a lower case extension.
I've had a look through the files but I can't see what I need to amend - any ideas?
It's not the Image Handler 3 that is case sensitive, it's the server's OS. Windows's system is not case sensitive, so .jpg and .JPG are the same. Operating system like Linux is case sensitive, so those two extensions are different. I guess that your server is running on a Linux host.
I suggest you should keep your image files with .jpg extensions so that everything will work fine :cool:
edit: Suggest you should run "ren .JPG .jpg" in dos command so that you earn time renaming all your files :)