Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
tomjmul

Support thread for the Image Magic contribution

Recommended Posts

Guest

Hi All,

 

I have recently installed imagemagic 1.14, but cannot tell if it works correctly.

 

On some pop-ups I find some images small and some large, cannot get them to be the same.

 

Any ideas,

 

My site is at My Webpage

 

Regards

Share this post


Link to post
Share on other sites
Hi All,

 

I have recently installed imagemagic 1.14, but cannot tell if it works correctly.

 

On some pop-ups I find some images small and some large, cannot get them to be the same.

 

Any ideas,

 

My site is at My Webpage

 

Regards

 

 

Yes, your popups will be exactly the same size as the original (small, tall, wee or otherwise)

Tom


OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Share this post


Link to post
Share on other sites

Hi. is anyone aware how to make this contribution work if you have spaces in the image folder name ?

Share this post


Link to post
Share on other sites
Hi. is anyone aware how to make this contribution work if you have spaces in the image folder name ?

 

ok. im sorry. it seems like it works on the server that i just moved the site to. but the newly images are not shown. i get the imagemagic.php file in the path, and the correct name of the file. but the image is not shown ?

Share this post


Link to post
Share on other sites
ok. im sorry. it seems like it works on the server that i just moved the site to. but the newly images are not shown. i get the imagemagic.php file in the path, and the correct name of the file. but the image is not shown ?

 

 

what is the url?


OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Share this post


Link to post
Share on other sites

For those upgrading from Image Magic v1.13, it appears that you can simply replace imagemagic.php and apply the following SQL query to update your database. (Be sure to back it up first.)

 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3278,'Apply security features to registered customers','CFG_REGISTERED_WATERMARKS','Yes','If this option is set to no, all image security features will be disabled when a registered customer is browsing your site',333,4,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3279,'Help support the OSC Image Magic Project','','Make a donation', CONCAT('Reward the author & support future releases. Please click the button below to make a donation<p><a href=\"http://www.celtware.com/im/donate.php?ref=',FLOOR(0 + (RAND(UNIX_TIMESTAMP()) * 9999999999999999)),'\"><img src=\"http://www.celtware.com/im/donate.php?ref=img',FLOOR(0 + (RAND(UNIX_TIMESTAMP()) * 9999999999999999)),'\" border=\"0\"></a>'),333,-1,'2005-10-03 03:08:38','1899-12-29','','tep_cfg_readonly(');

 

--Glen

Share this post


Link to post
Share on other sites

Doh! Why didn't I think of that. Will add upgrade instructions to the readme....thanks Glen

Tom

Edited by tomjmul

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Share this post


Link to post
Share on other sites

My images are showing up broken, they have the imagemagic.php in the url. I get this message when I view only the image in my browser:

 

Warning: imagecreatefrompng(): 'images/dvd/the_matrix.gif' is not a valid PNG file in pathtosite\shop\imagemagic.php on line 234

Notice: Undefined variable: frame in pathtosite\shop\imagemagic.php on line 236

Notice: Undefined variable: bevel in pathtosite\shop\imagemagic.php on line 236

Fatal error: Call to undefined function: imageantialias() in pathtosite\shop\imagemagic.php on line 238

 

What can I do to fix this?

Edited by yatahaze

Share this post


Link to post
Share on other sites

Following the logic through, it would appear that your version of the GD library does not contain the imagecreatefromgif() function. There are particular versions of GD that removed this function due to licencing reasons - good old compuserve >_<

 

Anyways, unfortunately, the solution to this problem is to:

 

1. Update the GD library if you have control of the server

2. Ask your hosting company to due this for you if not

3. Move hosts if they won't

4. Convert your product images to JPEG format (they work much better anyway)

 

Tom


OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Share this post


Link to post
Share on other sites

I think the error reporting setting that I changed fixed the problems with jpegs. I was using an example category from the default osC install which is all gif images. Took me at least an hour and a half looking around this thread for the answer, I got it finally... though I'm not sure about the watermarking stuff, if I turn it on I see no watermark... I probably wont need it anyways.

Edited by yatahaze

Share this post


Link to post
Share on other sites

I bet this is a nice contribution. However when Im having difficulties installing it especially with the Install instructions at

 

Step #6 - In :

/catalog/includes/functions/html_output.php

replace the entire tep_image() function with

 

What I did was delete the whole code snippet where all 4 tep_image() are located and pasted the new code from the install instructions but then when I open up my shop I get a

 

Fatal error: Call to undefined function: tep_draw_separator() in /home/fhlinux188/t/tpstudios.streamlinenettrial.co.uk/user/htdocs/cart/includes/classes/boxes.php on line 117

 

Do I have to replace all 4 tep_images? Or is it just the first one? Also if I uploaded the old html_output.php I can access the store again but if I upload an image the thumbnail is the same like it was when I didnt had image magic installed. There is no frame around the image nor the size is different. I tried playing with the Image configurations but nothing changed. My current Images settings look like this:

 

Images

 

Name Wert Aktion

Small Image Width 120

Small Image Height

Heading Image Width 120

Heading Image Height 0

Subcategory Image Width 100

Subcategory Image Height 0

Calculate Image Size true

Image Required true

Product Information Image Width 120

Product Information Image Height

Calculate Image Size

 

 

Calculate the size of images?

 

hinzugef?gt am: 17.05.2006

 

I tried using some numbers at the Heights or wrote down zeros but no matter what I do the thumbnails just stay the way I define them as the option "calculate image size" doesnt seem to work here. Also the /thumbnails folder has not been created, I had to do it myself.

 

Any help would be greatly appreciated!

Share this post


Link to post
Share on other sites

also something I would like to add (didnt find an edit button for my previous post) is that if I go to my shop right now the top banner is showin up only as a red X and below comes the error message I posted above. Also I noticed the link to the banner image had changed to

 

http://www.tpstudios.streamlinenettrial.co...850&h=116&page=

is that a good or bad sign that imagemagic is included? lol

 

Hope that helps to see what the problem is.

 

thanks

Edited by tpstudios

Share this post


Link to post
Share on other sites
also something I would like to add (didnt find an edit button for my previous post) is that if I go to my shop right now the top banner is showin up only as a red X and below comes the error message I posted above. Also I noticed the link to the banner image had changed to

 

http://www.tpstudios.streamlinenettrial.co...850&h=116&page=

is that a good or bad sign that imagemagic is included? lol

 

Hope that helps to see what the problem is.

 

thanks

 

The solution has been described here many times and can also be found in the online instructions here:

http://www.celtware.com/im/instructions.php

Edited by tomjmul

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Share this post


Link to post
Share on other sites
Guest
Hello everybody.

 

I've noticed a few people mentioning that they could not get the dropdown box for watermarks to work properly (just a blank dropdown). In my configuration, I was able to fix that by:

 

Open catalog/admin/includes/functions/general.php

 

Change DIR_FS_DOCUMENT_ROOT (2 instances)

To DIR_FS_CATALOG

 

So, that is fixed, but now all my images are broken links :rolleyes:

 

Was having the same problem and this solved it.

That is I have something in my drop down menu.

 

Now I have to find how to make the watermark image show although all are set to YES.

 

Thanks.

 

Also thanks to Tom for the awesome contrib.

 

Cheers, W

Edited by shopaholicjapan

Share this post


Link to post
Share on other sites
The solution has been described here many times and can also be found in the online instructions here:

http://www.celtware.com/im/instructions.php

 

well I didnt seem to find the solutin in there but I went to the direct link I posted above for the first time (usually I just went to my cart) and it said permission denied etc..so now I created the thumbnails folder in /cart/ and set permssion to 777 and now it works..atleast it displays the picture I mean. I had created the thumbnail folder at /cart/images/ before..oh well you never learn lol

 

but anyhow when I go to my cart the error message still occurs

 

Fatal error: Call to undefined function: tep_draw_separator() in /home/fhlinux188/t/tpstudios.streamlinenettrial.co.uk/user/htdocs/cart/includes/classes/boxes.php on line 117

 

atleast Im seeing the banner now. I hope when you wrote that the solution has been described many times / can be found in the online instructions it doesnt cover the tep_draw_seperator() error or otherwise I must be blind. Since I wouldnt want to post the code on here as it would flood the whole thread I uploaded text versions of html_output and general file so if anybody could have a look and tell me where the problem is would be appreciated.

 

http://www.tpstudios.streamlinenettrial.co...html_output.txt

http://www.tpstudios.streamlinenettrial.co.uk/general.txt

 

thanks

Share this post


Link to post
Share on other sites

well for some weird reason when I restore my Original html_output.php file I can access my shop and all thumbnails are now the way I wanted them (calculated size + frame). Great! Also the shop and everything seems to be working so do I need to modify the html_output file then, even if its working with the Original one?

Share this post


Link to post
Share on other sites
well I didnt seem to find the solutin in there but I went to the direct link I posted above for the first time (usually I just went to my cart) and it said permission denied etc..so now I created the thumbnails folder in /cart/ and set permssion to 777 and now it works..atleast it displays the picture I mean. I had created the thumbnail folder at /cart/images/ before..oh well you never learn lol

 

That is the most common problem people have with the contribution, the solution is plastered all over this forum and is in big red bold letters in the readme.

 

but anyhow when I go to my cart the error message still occurs

atleast Im seeing the banner now. I hope when you wrote that the solution has been described many times / can be found in the online instructions it doesnt cover the tep_draw_seperator() error or otherwise I must be blind. Since I wouldnt want to post the code on here as it would flood the whole thread I uploaded text versions of html_output and general file so if anybody could have a look and tell me where the problem is would be appreciated.

 

You are only meant to replace the tep_image function, not the tep_seperator etc. Yes your pictures will be showing now that you restored the html_output file, but image magic will not be active

Edited by tomjmul

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Share this post


Link to post
Share on other sites
here is an example where cache on server is enabled

 

http://filmkaeden.w2wserver.dk/index.php?cPath=10_42

the image is created in the thumbnail dir

and is called

starwars2.jpg.thumb_97x140_347a22a0f7e8608d1287e445c93465d6.jpg

 

I just went to your site. The problem has to do with the fact that safe mode is switched on in your php.ini file. Either switch it off, ask your webhost to do it for you or move hosts.

 

Tom


OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Share this post


Link to post
Share on other sites

Thank you very much.

 

its my own dedicated server. do you by any chance know how to set safe_mode to off locally ? i have done it in the php.ini file, and i have tried it in the vhost.conf file. but its not working(i have restarted the apache)

Share this post


Link to post
Share on other sites
Thank you very much.

 

its my own dedicated server. do you by any chance know how to set safe_mode to off locally ? i have done it in the php.ini file, and i have tried it in the vhost.conf file. but its not working(i have restarted the apache)

 

turn the safe_mode_gid setting on in php.ini

Edited by tomjmul

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Share this post


Link to post
Share on other sites
When you turn it off in php.ini have you verified that it is actually off? To do so go into your osc admin panel and click on tools then server info. In the php section have a look for the safe mode setting. It appears as though it is still on.

 

Also turn the safe_mode_gid setting on in php.ini

 

 

Hi. and thanks again for your help.

 

the safe_mode is set to off globally(have just checket the server info). but not locally, i guess its to allow for inividual settings pr. domain

 

you can see the info here

http://filmkaeden.w2wserver.dk/php.php

Share this post


Link to post
Share on other sites
Hi. and thanks again for your help.

 

the safe_mode is set to off globally(have just checket the server info). but not locally, i guess its to allow for inividual settings pr. domain

 

you can see the info here

http://filmkaeden.w2wserver.dk/php.php

 

 

ok. i found the solution. thanks

Share this post


Link to post
Share on other sites

Hi Tom,

 

Thanks for your effort, nice contribution!

 

In case of a server with locally SAFE MODE ON, could it be a solution to CHOWN the folders and images by the imagemagic.php? Could that work?

I'm sorry, but my knowledge isn't good enough to try this out myself, I don't know, where to put the code.

 

Thanks for your help!

G?tz

Share this post


Link to post
Share on other sites
Guest

i just upgraded to 1.14 and now my pics dont show.

i added the 2 new sql lines and replaced the files. all the other instructions look to be identical

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×