Re: Image Handler 2 Support
I see many people before got my same problem, since 2005 toward today... And no solution... I guess there's no solution to this problem...
Re: Image Handler 2 Support
Quote:
Originally Posted by
jmies
I haven't been able to find a reference to this problem in any posts. IH2 is working fine, but I can't use the IH manager to upload images. When I browse my images and upload one, I get a blank page with the address
http://www.mysite.com/catalog/admin/...if&action=save showing in the address bar.
Images zoom perfectly on the pages. I'm trying to upload a small JPG, does the reference to a GIF in the address have anything to do with it?
Thanks for the help.
Use large images as Image Handler makes small and medium from your large images.
I'm not sure why Gif would be in the address if it's a jpg but sounds like there might be a problem there.
You can go into your admin, configuration and images and change the filetype if it is a gif and it'll then work with Gif files.
Regarding your error message. Check the file image_handler.php is installed and in the correct folder.
Re: Image Handler 2 Support
Quote:
Originally Posted by
Balamir
I see many people before got
my same problem, since 2005 toward today... And no solution... I guess there's no solution to
this problem...
Clear the image cache and set permissions on the images folder and bmz_cache to 755.
Make sure there are no image files in the medium and large folders as otherwise Image Handler just won't do it's job.
Re: Image Handler 2 Support
Quote:
Originally Posted by
need_help
Clear the image cache and set permissions on the images folder and bmz_cache to 755.
Make sure there are no image files in the medium and large folders as otherwise Image Handler just won't do it's job.
Thank you for your help, but, unfortunately, it still doesn't work...
The problem isn't in the cache directory but in the fact that the image uplaoded is set to CHMOD 600 instead of 755 (as when you upload image through categories/products).
Any other solution?
Re: Image Handler 2 Support
Quote:
Originally Posted by
gonsman
I am having a permissions problem where the images that I upload are set to 600. If I upload an image under categories/products it works fine. I have seen this issue a few times in this thread, but no real answers. I talked to my host about it and they suggested that I customize the code and manually set the permissions using chmod(). I can easily do this if someone could direct me to the file and line that uploads/moves the files to server. Does anybody know where this is?
I was able to find the answer to this question. The file to edit is /admin/includes/ih_manager.php. In my version, I changed lines 166-212.
Change the following (old code):
Code:
if ($check != 1) {
// check for destination directory and create, if they don't exist!
// Then move uploaded file to its new destination
// default image
if ($_FILES['default_image']['name'] != '') {
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['defaultFileName']);
$source_name = $_FILES['default_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['defaultFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_DEFAULT, "error" );
$check = 1;
}
}
// medium image
if ($_FILES['medium_image']['name'] != '') {
$data['mediumImgExtension'] = substr( $_FILES['medium_image']['name'],
strrpos($_FILES['medium_image']['name'], '.'));
$data['mediumFileName'] ='medium/' . $data['imgBaseDir']
. $data['imgBase']
. $data['imgSuffix'] . IMAGE_SUFFIX_MEDIUM
. $data['mediumImgExtension'];
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['mediumFileName']);
$source_name = $_FILES['medium_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['mediumFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_MEDIUM, "error" );
$check = 1;
}
}
// large image
if ($_FILES['large_image']['name'] != '') {
$data['largeImgExtension'] = substr( $_FILES['large_image']['name'],
strrpos($_FILES['large_image']['name'], '.'));
$data['largeFileName'] = 'large/' . $data['imgBaseDir']
. $data['imgBase']
. $data['imgSuffix'] . IMAGE_SUFFIX_LARGE
. $data['largeImgExtension'];
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['largeFileName']);
$source_name = $_FILES['large_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['largeFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_LARGE, "error" );
$check = 1;
}
}
}
to (new code):
Code:
if ($check != 1) {
// check for destination directory and create, if they don't exist!
// Then move uploaded file to its new destination
// default image
if ($_FILES['default_image']['name'] != '') {
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['defaultFileName']);
$source_name = $_FILES['default_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['defaultFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_DEFAULT, "error" );
$check = 1;
}
else
{
chmod($destination_name, 0755);
}
}
// medium image
if ($_FILES['medium_image']['name'] != '') {
$data['mediumImgExtension'] = substr( $_FILES['medium_image']['name'],
strrpos($_FILES['medium_image']['name'], '.'));
$data['mediumFileName'] ='medium/' . $data['imgBaseDir']
. $data['imgBase']
. $data['imgSuffix'] . IMAGE_SUFFIX_MEDIUM
. $data['mediumImgExtension'];
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['mediumFileName']);
$source_name = $_FILES['medium_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['mediumFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_MEDIUM, "error" );
$check = 1;
}
else
{
chmod($destination_name, 0755);
}
}
// large image
if ($_FILES['large_image']['name'] != '') {
$data['largeImgExtension'] = substr( $_FILES['large_image']['name'],
strrpos($_FILES['large_image']['name'], '.'));
$data['largeFileName'] = 'large/' . $data['imgBaseDir']
. $data['imgBase']
. $data['imgSuffix'] . IMAGE_SUFFIX_LARGE
. $data['largeImgExtension'];
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['largeFileName']);
$source_name = $_FILES['large_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['largeFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_LARGE, "error" );
$check = 1;
}
else
{
chmod($destination_name, 0755);
}
}
}
As you can see, I added 3 chmod functions after each upload. You can change the permissions from 0755 to 0777 or whatever you want. If you want to check the version, the top of this file has the following:
Code:
/**
* ih_manager.php
* manager module for IH2 admin interface
*
* @author Tim Kroeger <[email protected]>
* @copyright Copyright 2005-2006 breakmyzencart.com
* @license http://www.gnu.org/licenses/gpl.txt GNU General Public License V2.0
* @version $Id: ih_manager.php,v 1.2 2006/04/17 18:23:24 tim Exp $
*/
Re: Image Handler 2 Support
Quote:
Originally Posted by
gonsman
I was able to find the answer to this question. The file to edit is /admin/includes/ih_manager.php. In my version, I changed lines 166-212.
Change the following (old code):
Code:
if ($check != 1) {
// check for destination directory and create, if they don't exist!
// Then move uploaded file to its new destination
// default image
if ($_FILES['default_image']['name'] != '') {
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['defaultFileName']);
$source_name = $_FILES['default_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['defaultFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_DEFAULT, "error" );
$check = 1;
}
}
// medium image
if ($_FILES['medium_image']['name'] != '') {
$data['mediumImgExtension'] = substr( $_FILES['medium_image']['name'],
strrpos($_FILES['medium_image']['name'], '.'));
$data['mediumFileName'] ='medium/' . $data['imgBaseDir']
. $data['imgBase']
. $data['imgSuffix'] . IMAGE_SUFFIX_MEDIUM
. $data['mediumImgExtension'];
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['mediumFileName']);
$source_name = $_FILES['medium_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['mediumFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_MEDIUM, "error" );
$check = 1;
}
}
// large image
if ($_FILES['large_image']['name'] != '') {
$data['largeImgExtension'] = substr( $_FILES['large_image']['name'],
strrpos($_FILES['large_image']['name'], '.'));
$data['largeFileName'] = 'large/' . $data['imgBaseDir']
. $data['imgBase']
. $data['imgSuffix'] . IMAGE_SUFFIX_LARGE
. $data['largeImgExtension'];
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['largeFileName']);
$source_name = $_FILES['large_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['largeFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_LARGE, "error" );
$check = 1;
}
}
}
to (new code):
Code:
if ($check != 1) {
// check for destination directory and create, if they don't exist!
// Then move uploaded file to its new destination
// default image
if ($_FILES['default_image']['name'] != '') {
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['defaultFileName']);
$source_name = $_FILES['default_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['defaultFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_DEFAULT, "error" );
$check = 1;
}
else
{
chmod($destination_name, 0755);
}
}
// medium image
if ($_FILES['medium_image']['name'] != '') {
$data['mediumImgExtension'] = substr( $_FILES['medium_image']['name'],
strrpos($_FILES['medium_image']['name'], '.'));
$data['mediumFileName'] ='medium/' . $data['imgBaseDir']
. $data['imgBase']
. $data['imgSuffix'] . IMAGE_SUFFIX_MEDIUM
. $data['mediumImgExtension'];
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['mediumFileName']);
$source_name = $_FILES['medium_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['mediumFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_MEDIUM, "error" );
$check = 1;
}
else
{
chmod($destination_name, 0755);
}
}
// large image
if ($_FILES['large_image']['name'] != '') {
$data['largeImgExtension'] = substr( $_FILES['large_image']['name'],
strrpos($_FILES['large_image']['name'], '.'));
$data['largeFileName'] = 'large/' . $data['imgBaseDir']
. $data['imgBase']
. $data['imgSuffix'] . IMAGE_SUFFIX_LARGE
. $data['largeImgExtension'];
io_makeFileDir(DIR_FS_CATALOG_IMAGES.$data['largeFileName']);
$source_name = $_FILES['large_image']['tmp_name'];
$destination_name = DIR_FS_CATALOG_IMAGES . $data['largeFileName'];
if ( !move_uploaded_file($source_name, $destination_name) ) {
$messageStack->add( TEXT_MSG_NOUPLOAD_LARGE, "error" );
$check = 1;
}
else
{
chmod($destination_name, 0755);
}
}
}
As you can see, I added 3 chmod functions after each upload. You can change the permissions from 0755 to 0777 or whatever you want. If you want to check the version, the top of this file has the following:
Code:
/**
* ih_manager.php
* manager module for IH2 admin interface
*
* @author Tim Kroeger <[email protected]>
* @copyright Copyright 2005-2006 breakmyzencart.com
* @license http://www.gnu.org/licenses/gpl.txt GNU General Public License V2.0
* @version $Id: ih_manager.php,v 1.2 2006/04/17 18:23:24 tim Exp $
*/
Finally it works!
Thank you so much, gonsman! You saved my life (and my small brain...) :hug:
Re: Image Handler 2 Support
Quote:
Originally Posted by
need_help
Use large images as Image Handler makes small and medium from your large images.
I'm not sure why Gif would be in the address if it's a jpg but sounds like there might be a problem there.
You can go into your admin, configuration and images and change the filetype if it is a gif and it'll then work with Gif files.
Regarding your error message. Check the file image_handler.php is installed and in the correct folder.
Thanks. I found what was wrong. When I was setting it up, each time FTP'ed the bmz_io_conf.php file to the admin directory, my admin interface went blank. I installed it without that file, and forgot to transfer it again. I put it in the directory and that problem is solved.
I have one more small problem. In the categories/product section, the new icon wih the "i" is missing from between the copy and attribute icon. What would cause that to happen? Thanks in advance.
Re: Image Handler 2 Support
I must not know how to use this mod - I installed everything and nothing has changed on the storefront. The images don't popup when hovered over, even though it says to do so. It looks just like the regular additional images before I added the mod. Anyone know what I might have done wrong? I triple checked I uploaded all the files.
Re: Image Handler 2 Support
Quote:
Originally Posted by
timkroeger
I have looked and looked, and I can't see how to upload images. The directions that tell me to go to admin/images/logo.gif. I know where admin - configurations - images is. but I don't see a logo.gif. I know that I am missing something basic.
Thanks,
Cupid
Re: Image Handler 2 Support
Click on the little "i" circle on the right side of the product listing pages.