Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Support thread for the Image Magic contribution


tomjmul

Recommended Posts

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 ? :'(

Link to comment
Share on other sites

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

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?

Link to comment
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 :)

Link to comment
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 :)

Link to comment
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

Link to comment
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
Link to comment
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

Link to comment
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

Link to comment
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>

Link to comment
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

Link to comment
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?

Link to comment
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
Link to comment
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. :-)

Link to comment
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

Link to comment
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!

Link to comment
Share on other sites

Link to comment
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://www.oscommerce.com/forums/index.php?sho...172479&st=0

Link to comment
Share on other sites

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

 

Much appreciated!

 

Psy

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

I'm running CRE 6.15..

 

I tried to do the install, but am having problems with:

Step #6 - In :

/catalog/includes/functions/html_output.php

replace the entire tep_image() function with

 

I'm not sure which one to replace.. Can anyone help?

 

Thanks in advance!

Link to comment
Share on other sites

Hi there,

 

I have installed the very first version of IM (date: 2005-11-21) on my system some time ago and it worked perfectly.

 

But now I just figured out, that the renewal of the thumbs is not working just by replacing the big image.

I had to delete the thumb, press refresh and IM brought up the new image.

 

So far, no problem.

 

Now, I just had to do exactly the same thing as described above, but now, my ftp-program is telling me, that he is running into a "permission denied" if I want to delete the new thumb again (to renew it again).

I took my console and saw that IM was writing the thumb as user NOBODY.

 

Can anyone tell me, why that happens and if I can change this (without upgrading - you now, never touch...)

 

Thanks in advance,

great contrib,

 

Andreas

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...