Jump to content
Sign in to follow this  
tomjmul

Support thread for the Image Magic contribution

Recommended Posts

I'm struggling with my fresh install of Image Magic.

 

Further up this page was a few comments which I've checked, but I was wondering if my image paths look ok.

 

With IM turned off, my images shows and has this url (yep I've changed the http:// bit to stop any changes when being displayed in this post)

hppt//mystore.co.uk/store/images/ML01181.jpg

This is the url when IM is turned on

hppt//mystore.co.uk/store/imagemagic.php?img=images/ML01181.jpg&w=100&h=87&page=prod_info

 

Can anyone comment If the above is okay please? (I have created a folder 'thumbnails' which remain empty)

 

Thanks in advance of any help :)

 

Steve

 

I don't like the hppt, maybe your browser doesn't like it either ;)

 

my path is, in the code source of the popup window:

 

<img src="imagemagic.php?img=images/theproduct.jpg&w=400&h=400&page=popup" width="400" height="400" border="0" alt="">

 

More seriously, to double check it was just not a typo when you posted, go to your product info page clkick to enlarge, and view source.

 

Let us know, you shouldn't see a full path, but a realtive path (no http - and no hppt either)

Share this post


Link to post
Share on other sites
I don't like the hppt, maybe your browser doesn't like it either ;)

 

my path is, in the code source of the popup window:

 

<img src="imagemagic.php?img=images/theproduct.jpg&w=400&h=400&page=popup" width="400" height="400" border="0" alt="">

 

More seriously, to double check it was just not a typo when you posted, go to your product info page clkick to enlarge, and view source.

 

Let us know, you shouldn't see a full path, but a realtive path (no http - and no hppt either)

Hi Hugh. :D

 

The typo foxed me for a while :(

just switched IM on to do the checks again.

 

product info

Just done a right click>properties>image properties>location

hppt://www.mystore.co.uk/store/imagemagic.php?img=images/mlb11004.jpg&w=481&h=150&page=prod_info

 

click to enlarge

Just done a right click>properties>image properties>location

hppt://www.mystore.co.uk/store/imagemagic.php?img=images/mlb11004.jpg&w=350&h=109&page=popup

 

Again hppt = http :)


____________________________________________________________________

____________________________________________________________________

Share this post


Link to post
Share on other sites
Issue with the readme.html in the install with html_output.php, the code is missing a ';' on the $image_size line. Should be this.

 

  if (strtolower(getcwd())."/" != strtolower(DIR_FS_CATALOG)) {
	$image_size = @getimagesize("../..".$src);
	$src=str_replace(DIR_WS_CATALOG_IMAGES,DIR_WS_IMAGES,$src);
 }

 

Hi Everyone,

 

I'm new to posting here so forgive me if I don't do it right. I have been viewing for a while and learning so much. However, I just can't figure this one out. :blink:

 

I installed the image magic contrib and my images do not show up. When I check the property I see image magic.php there and when I turn it off they come back. I see a post referring to code missing a ; but when I check my html_output.php I can't find that exact wording where this missing ; is supposed to go.

 

I also added a thumbnail folder as I saw a post talking about that and there wasn't one in my files.

 

Can someone give me any clue what I am doing wrong? Thanks :rolleyes:

Share this post


Link to post
Share on other sites

I dont know what to do the imagemagic works fine but after a few weeks doesn't

 

The image doesn't display and view all the errors in cpanel Error LOG

 

[sat Nov 4 23:22:49 2006] [error] PHP Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/altshop/public_html/imagemagic.php on line 509

[sat Nov 4 23:22:49 2006] [error] PHP Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/altshop/public_html/imagemagic.php on line 508

[sat Nov 4 23:22:49 2006] [error] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /home/altshop/public_html/imagemagic.php on line 505

[sat Nov 4 23:22:49 2006] [error] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /home/altshop/public_html/imagemagic.php on line 505

[sat Nov 4 23:22:49 2006] [error] PHP Warning: imagefilledrectangle(): supplied argument is not a valid Image resource in /home/altshop/public_html/imagemagic.php on line 503

[sat Nov 4 23:22:49 2006] [error] PHP Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /home/altshop/public_html/imagemagic.php on line 501

[sat Nov 4 23:22:49 2006] [error] PHP Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /home/altshop/public_html/imagemagic.php on line 500

[sat Nov 4 23:22:49 2006] [error] PHP Warning: imagecreate() [<a href='function.imagecreate'>function.imagecreate</a>]: Invalid image dimensions in /home/altshop/public_html/imagemagic.php on line 499

[sat Nov 4 23:22:49 2006] [error] PHP Warning: chdir() [<a href='function.chdir'>function.chdir</a>]: No such file or directory (errno 2) in /home/altshop/public_html/imagemagic.php on line 21

 

Can you tell me where are the problems? I think the problems are on my hosting company no ? :'(

Share this post


Link to post
Share on other sites

I would like to be able to up load a days worth of photo's (around 150 images), then the custmer can choose the photo's he or she like (by viewing all the photo thumbnails) and then down load the pictures.

Does the contribution work like that?

Share this post


Link to post
Share on other sites

just curious if anyone can help, i dont have time to look through 53 pages of posts, is there any suppor here for mulitple product images ?? thanks

Share this post


Link to post
Share on other sites

I hit several road bumps installing this but finally got it thanks to all of your help.

 

I have fancier invoice installed but it doen't work becuase I have PayPal IPN, needless to say my images weren't showing, until I made the edit mentioned below.

 

I also had to manually create the /thumbnails/images directory.

 

All seems to be working now, thanks everyone!

 

Image Magic and Fancier Invoice & Packingslip conflict and how to fix it:

 

Just installed this contribution and the images are not displayed, and when checking the image link this error comes up:

Warning: chdir(): No such file or directory (errno 2) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 492

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 493

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 494

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 495

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 496

Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxxxxxxxxxxx/imagemagic.php:21) in /home/www/xxxxxxxxxxxxx/imagemagic.php on line 497
????JFIF??0kG?ȿd???}3?χ_?N/??j|?????1?????i;??&???????~?????? ???????g?????&??.??-?c?㗇?l????????? ???????g_???1?(?T???H?ڏ???? ???Z??_?ߌ?o?x?ş~8??~"???u???S??}??/???????%? ? '? S? ?? O?g?1????????0w?d??+??h?Qڿ؟?N?G???%??,?_0|,????0x??6? ?7?߇?3??????|?K?g?g??{??¾??}???????C??~~??~?~Կn?x??n?f|2? ?Ӿ\??^???????i?x???>~???RO???z??ϟ?u?o????????ǟ?>???e?|<?> ??z?Ɲ?|8??f|]??]?S?????????d??w???|v???????O?????o?????C?g?>'뿴???????j?? ?4f???^?-?Px??????,?????'???~?7c?x??|;???????? x??_??k>???? ?O?\?g?&W????c?o???????M???????]????ƽg???o??ᇀ???Yï?מ?????????N??/ۻ????5???M?v??6|??7??? xw? |?????^??l K?????/??????_|K???j/ x???&???^???P?n|s??&???????E????i_?? ah?k?Y?0?7??????&?џ?M??~?Q_?? ?n??*o?~$?? >!~˿??^?J?????ߴ???M?Ej?LJ?9????/ï??S???Eh߱_??????j?)7?}w?6??????O?~;???????>.?2?????_??6j???????????g??f?x??i??^|1? < ??h???$Z???????????9~ѿ?????Z?? ??do??? ???g?<? ???e?kv_ ?@??+???"???!?]??~,??~??>*?_?~?? <?믇?????wD??< ?i?,??ǰ\?ɾ ???o?(e??/ ??.?-????^???k:???:??_x???p??O,?+k?_??????o????2k^>Կf????g?W? ?~??w???/???I?+?A????????#ğ?i?'? ?=k?ϊ?Q??"????ee??N???˟??w???~ۿ?S_?K???$????a?e??s]? ??x?~???7?????????????x?_?s??W?????e???~ѿ?f/?U?s?~??????????&????<-?!? ?l??Ɠ?????????????X?*x???/????~.?L??1?k?[?^??'??e????N?S???/?M???????_|E?~??x'R????ٛ??o????W? ?=???| ??l?H???CI???c???]????~x?¿???E?h?4???(x????o?Z7?/???_?n??????^o|c?7?????< ???G??x????G?Q?x??h_ۇ???????S???ex??????/???????h??l?U?D??d}k?????&??????;_x????C?????%}ǁ<'?y???\???x?B?R??+P??+?ً????A?????_??<???x'K?? ?4??g?#¾'?5??u????\?ׇ?;????? ?????׮|I?Ӵ?;???/?>6???? \????'²?>???(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??(??

Probably is already posted, but i'm not gonna check all 40 pages to see exactly.

 

So, if somebody will get that error and has installed Fancier Invoice, here is the solution:

 

In catalog/imagemagic.php we have this:

The original oscommerce-2.2ms2-051113 package, doesn't have any includes/local/configure.php. As the script says, when includes/local/configure.php is not there, it will go to includes/configure.php.

But, installing Fancier Invoice & Packingslip you must create a includes/local/configure.php which doesn't have what imagemagic.php is looking for, that's why that error comes up; imagemagic.php finds the includes/local/configure.php file, but with something else inside it.

 

To get rid of that error, i simply removed this code:

 

if (file_exists('includes/local/configure.php')) {
  //use local dev params if available

} else {
// include server parameters
require('includes/configure.php');

 

and now what i have in my imagemagic.php is this:

include('includes/configure.php');

require('includes/imagemagic/imagemagic.functions.php');
chdir (DIR_FS_CATALOG);

 

The script will not check if includes/local/configure.php exists or not, it will simply includes includes/configure.php.

Now, all my images are displayed :)

Share this post


Link to post
Share on other sites

I hit several road bumps installing this but finally got it thanks to all of your help.

 

I have Fancier Invoice & Packingslip installed but it doen't work becuase I have PayPal IPN, needless to say my images weren't showing, until I made the edit mentioned below.

 

I also had to manually create the /thumbnails/images directory.

 

All seems to be working now, thanks everyone!

 

Image Magic and Fancier Invoice & Packingslip conflict and how to fix it:

 

 

The original oscommerce-2.2ms2-051113 package, doesn't have any includes/local/configure.php. As the script says, when includes/local/configure.php is not there, it will go to includes/configure.php.

But, installing Fancier Invoice & Packingslip you must create a includes/local/configure.php which doesn't have what imagemagic.php is looking for, that's why that error comes up; imagemagic.php finds the includes/local/configure.php file, but with something else inside it.

 

To get rid of that error, i simply removed this code:

 

if (file_exists('includes/local/configure.php')) {
  //use local dev params if available

} else {
// include server parameters
require('includes/configure.php');

 

and now what i have in my imagemagic.php is this:

include('includes/configure.php');

require('includes/imagemagic/imagemagic.functions.php');
chdir (DIR_FS_CATALOG);

 

The script will not check if includes/local/configure.php exists or not, it will simply includes includes/configure.php.

Now, all my images are displayed :)

Share this post


Link to post
Share on other sites

This was exactly what I was looking for! osC should implement some of these amazing contribs into standard package stuff in later versions.

Share this post


Link to post
Share on other sites

Hi,

 

I have two things to ask if you don't mind.

 

Firstly, I have recently changed the 'Product Information Image Width/Height' in admin>images to a larger value than that of 'Small Image Width/Height'. This works great for most places images are displayed such as product info and the new products infobox. However, when on the product info page for one of my products, with the review for that product in the infobox in the right column, it displays at the 'Product Information Image' size instead of the 'Small Image' size. This makes my right column expand which breaks my layout.

 

I have checked in catalog\includes\boxes\reviews.php and it seems to be using SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT for the size (which is the same as in whats_new.php. I can't think how this could be happening but I read earlier in the thread that people were having problems with images displayed in infoboxes in the columns and I was hoping someone might be able to point me in the right direction.

 

The second thing I wanted to ask was: I have downloaded the bug fix release in the contributions section released on 7 Nov 2006. I have image magic installed already so I checked for differences using a file compare program. The only change I can see is to the mysql file. It is a change to the Paypal donate button link which was kindly installed in the admin>imagemagic page for all of us lucky people. What function does this change have? It seems to have something to do with PASSWORD as this was one of the changes.

 

Psy

Share this post


Link to post
Share on other sites
Hi,

 

I have two things to ask if you don't mind.

 

Firstly, I have recently changed the 'Product Information Image Width/Height' in admin>images to a larger value than that of 'Small Image Width/Height'. This works great for most places images are displayed such as product info and the new products infobox. However, when on the product info page for one of my products, with the review for that product in the infobox in the right column, it displays at the 'Product Information Image' size instead of the 'Small Image' size. This makes my right column expand which breaks my layout.

 

I have checked in catalog\includes\boxes\reviews.php and it seems to be using SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT for the size (which is the same as in whats_new.php. I can't think how this could be happening but I read earlier in the thread that people were having problems with images displayed in infoboxes in the columns and I was hoping someone might be able to point me in the right direction.

 

The second thing I wanted to ask was: I have downloaded the bug fix release in the contributions section released on 7 Nov 2006. I have image magic installed already so I checked for differences using a file compare program. The only change I can see is to the mysql file. It is a change to the Paypal donate button link which was kindly installed in the admin>imagemagic page for all of us lucky people. What function does this change have? It seems to have something to do with PASSWORD as this was one of the changes.

 

Psy

 

1) first thing answer:quick hack: in your admin put the values back to what they used to be (ex 100 pixels), and instead, open your product_info.php file, locate the SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT, and apply a multiplicator:

SMALL_IMAGE_WIDTH*2 and SMALL_IMAGE_WIDTH*2 will give you a 200pixel size.

 

2) second thing answer: No idea :-)

Edited by pixclinic

Share this post


Link to post
Share on other sites

Hi pixclinic,

 

Thanks very much for the super fast reply. I thought this would work when I read it but I've just tried and am quite shocked that it doesn't. I tried blanking out the settings for Product Info Image but that just displayed the original size image.

 

Thanks for trying though,

 

Psy

Share this post


Link to post
Share on other sites
Hi pixclinic,

 

Thanks very much for the super fast reply. I thought this would work when I read it but I've just tried and am quite shocked that it doesn't. I tried blanking out the settings for Product Info Image but that just displayed the original size image.

 

Thanks for trying though,

 

Psy

 

this is working in my stores, so there is no reason it won't in yours :-)

post your product_info.php file, I'll take a look

Share this post


Link to post
Share on other sites

this is what I have in my product info to have a 200x200 pix picture:

 

<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')"><div id="fly_img">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</div><br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>

Share this post


Link to post
Share on other sites

Not wanting to paste my whole product_info.php code here I have put the code in a pastebin. Please check it out here:

 

http://pastebin.com/823836

 

The lines in question seem to be 114 and 117.

 

I understand that the creator of this contribution added some code to check when a user is at the prod_info page and adjusts the image size using that. I think this is the way the Product Information Image can have a different setting and it might be what is causing this problem I am having.

 

Thanks a lot for helping me I really appreciate it.

 

Psy

Share this post


Link to post
Share on other sites
Not wanting to paste my whole product_info.php code here I have put the code in a pastebin. Please check it out here:

 

http://pastebin.com/823836

 

The lines in question seem to be 114 and 117.

 

I understand that the creator of this contribution added some code to check when a user is at the prod_info page and adjusts the image size using that. I think this is the way the Product Information Image can have a different setting and it might be what is causing this problem I am having.

 

Thanks a lot for helping me I really appreciate it.

 

Psy

 

When I compare your code with mine, they are the same , beside the noUnder class and my flydiv (I doubt that it would make a difference).

Try to remove your 'hspace="5" vspace="5"' parameter?

Share this post


Link to post
Share on other sites

Thanks for the suggestion. I tried it but it only changed the orientation slightly as expected. I also tried removing the noUnder class just in case but that had no effect (apart from putting the underline back under the image).

 

I can live with it as it is, It just looks so much better (as you know) to have them larger.

 

Off topic: Could you please tell me which EP to use as there is a lot of confusion over in the contrib section?

 

Thanks again for your efforts.

 

Psy

Edited by psynaptic

Share this post


Link to post
Share on other sites
Thanks for the suggestion. I tried it but it only changed the orientation slightly as expected. I also tried removing the noUnder class just in case but that had no effect (apart from putting the underline back under the image).

 

I can live with it as it is, It just looks so much better (as you know) to have them larger.

 

Off topic: Could you please tell me which EP to use as there is a lot of confusion over in the contrib section?

 

Thanks again for your efforts.

 

Psy

 

That's really strange this doesn't work with your configuration.... Maybe your image magic version is different from mine?

 

Regarding EP I use 5 to 6 different versions, from 2.8 to 3.0 depending on the store I'm working on, and they are all pretty heavily customized for the sprecific store as well: there is not good or bad version, it;s just a question of what mods you have installed and what field you want to retrieve. And FYI In any case, i coould make them work with products attributes. :-)

Share this post


Link to post
Share on other sites

I use the latest version of IM (because it's exactly the same as the new bug fix). I will leave it for now and find a way to fix it up when I get desperate.

 

I'm glad to hear you have got EP attributes working. I'm just trying to find a quick way to upload products with the default fields at the moment. Maybe later I will need more. I've been sat in the #oscommerce irc channel on freenode all day but noone has said a word.

 

Thanks again for your help.

 

Psy

Share this post


Link to post
Share on other sites
I use the latest version of IM (because it's exactly the same as the new bug fix). I will leave it for now and find a way to fix it up when I get desperate.

 

I'm glad to hear you have got EP attributes working. I'm just trying to find a quick way to upload products with the default fields at the moment. Maybe later I will need more. I've been sat in the #oscommerce irc channel on freenode all day but noone has said a word.

 

Thanks again for your help.

 

Psy

 

Sorry I made a typo: I could NOT make them work with attributes in the complete file:-) Ever!

Share this post


Link to post
Share on other sites
Thanks for the suggestion. I tried it but it only changed the orientation slightly as expected. I also tried removing the noUnder class just in case but that had no effect (apart from putting the underline back under the image).

 

I can live with it as it is, It just looks so much better (as you know) to have them larger.

 

Off topic: Could you please tell me which EP to use as there is a lot of confusion over in the contrib section?

 

Thanks again for your efforts.

 

Psy

 

forget EP, and use this no files to edit and no messing. just export and import anything keeping all the original filenames. :D

 

http://forums.oscommerce.com/index.php?sho...172479&st=0

Share this post


Link to post
Share on other sites

Thanks a lot for that suggestion artpics! I will have a go at it now.

 

Much appreciated!

 

Psy

Share this post


Link to post
Share on other sites

i have just installed the contrib last version : Bug Fix release tomjmul 7 Nov 2006

and also more pic , with the addition for image magic

 

but none of my image or thumbnails appears ,and here are :

 

- the ulr i can see :

http://localhost/ms2/shop/imagemagic.php?img=images/eve_camille_apres3_lrg.jpg&w=149&h=219&page=

 

- the error i an see with a debug :

 

INFO:

Undefined variable: page

At \ms2\shop\includes\functions\html_output.php:163

tep_image()

Called from \ms2fr_atelier_morepic\shop\product_info.php:122

tep_image(string: "images/eve_camille_apres1_lrg.jpg" , string: "test image magic" , string: "149" , string: "" , string: "hspace="5" vspace="5"")

 

so that mean that the page is not given like i see in the url

 

i checked the install 2 times , any idea of the problem


MS2

Share this post


Link to post
Share on other sites

hi , I have image magic installed on another shop running version 1.1 and it all works fine.

 

I am now setting up on a new server and installed tomjmul's version of 7 Nov 2006. Nothing worked for me with this version. I am running with PHP 5 and Mysql 5. Even with all the fixes to error reporting and the mysql fixes sorted (dont think they are related, but anyway...) it would not function for me.

 

I removed it and installed V1.1 and it all worked straight away , on PHP 5 with Mysql 5.

 

I had to create and CHMOD the thumbnail DIR myself, but other than that it all worked out of the box.

 

Anyone having trouble , perhaps try an earlier version. I can no longer find V1.1 in the contrib section.

 

BTW . the latest install instructions don't seem to be as clear and concise as the old , especially the image wrapper function instructions, earlier versions state clearly what should be changed , this latest one doesn't , it only instructs to replace the entire image wrapper function , ok if you are experienced , but for a newb a bit confusing and some could end up with problems.

 

 

cheers

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  

×