dreamscape Posted August 3, 2003 Share Posted August 3, 2003 Implemented support for the admin upload class in newer OSC snapshots. ** Build on May 18th, 2003 snapshot. Needs tested on MS2 to verify support or not ** ** Build off Image Resize v1.3a by Henri Schmidhuber ** http://www.oscommerce.com/community/contributions,350 What can it do:- the uploaded image is copied into big image directory below your image directory - then a small image according to the images settings (Small Image Width, Small Image Heigth) in the admin is made and copied into your image directory - the big image can be resized too - if something goes wrong (no gd-lib) it copies the original file to the image directory - It corrects wrong filenames in uploaded images (empty spaces, specialchars...) - Three methods of resizing Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
dreamscape Posted August 9, 2003 Author Share Posted August 9, 2003 ** The regular version 1.5 DOES NOT work with MS2 ** I have released a v1.5 for MS2. I have not been able to test it on an MS2 system, but it should work. http://www.oscommerce.com/community/contributions,350 Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
David 1cog Posted August 10, 2003 Share Posted August 10, 2003 http://www.directplastics.com/ Fatal error: Call to undefined function: imagegif() in /home/directpl/public_html/bigboss/includes/classes/upload.php on line 268 This was produced when attempting to add a GIF image to an existing product - JPEGs are OK. Also, the large image is not displaying when I click the thumbnail - it just shows the thumbnail version again. Quote David @ 1cog. Link to comment Share on other sites More sharing options...
David 1cog Posted August 10, 2003 Share Posted August 10, 2003 FYI with echo turned on in popup_image.php, the image path is: /home/directpl/public_html//images/BIG_IMAGE_SUBDIR/fa65wg.jpg I guess BIG_IMAGE_SUBDIR is not being populated? Quote David @ 1cog. Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 I guess BIG_IMAGE_SUBDIR is not being populated? whoops... sorry about that David. I changed that variable name... it should be DIR_FS_CATALOG_IMAGES_BIG Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 Fatal error: Call to undefined function: imagegif()in /home/directpl/public_html/bigboss/includes/classes/upload.php on line 268 This was produced when attempting to add a GIF image to an existing product - JPEGs are OK. Certain versions of GD-Lib do not support GIFs. Nothing I can really do about that... just make sure in the config you have the right version selected that you are running (1.xx or 2.xx). Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
David 1cog Posted August 10, 2003 Share Posted August 10, 2003 GD Support enabled GD Version bundled (2.0 compatible) FreeType Support enabled FreeType Linkage with freetype GIF Read Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled Looks like I've got GDLIB 2 and that's what is selected in Admin. Could the problem be something else? I've run GDLIB with other scripts without problem in the past on this server and GDLIB2 supports GIFs (???). Big images problem now solved. :) Quote David @ 1cog. Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 GD Support enabled GD Version bundled (2.0 compatible) FreeType Support enabled FreeType Linkage with freetype GIF Read Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled Looks like I've got GDLIB 2 and that's what is selected in Admin. Could the problem be something else? I've run GDLIB with other scripts without problem in the past on this server and GDLIB2 supports GIFs (???). Big images problem now solved. :) according to that, only GIF read support is enabled. the others say "support enabled" and GIF says "Read Support enabled"... I am not sure, but would take that to mean the others are read/write; whereas GIF is read only. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
chfields Posted August 10, 2003 Share Posted August 10, 2003 I tried installing on MS2 when entering new products and previewing I get this error and no image( just empty box with the text but no pic Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 39 if (isset($_FILES[$this->file])) { Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 44 } elseif (isset($GLOBALS['HTTP_POST_FILES'][$this->file])) { Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 55 'tmp_name' => $GLOBALS[$this->file]); Quote Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 chfields, did you download and re-install the new MS2 version? the 1st version I released is not for MS2. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 Looks like I've got GDLIB 2 and that's what is selected in Admin. Could the problem be something else? I've run GDLIB with other scripts without problem in the past on this server and GDLIB2 supports GIFs (???). found this Daivd: http://www.phpbuilder.com/board/printthrea...readid=10236496 Looks as though only GD lib v1.6 or earlier support GIF creation. Though newer ones support PNG, which is *supposed* to replace the GIF Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 I tried installing on MS2 when entering new products and previewing I get this error and no image( just empty box with the text but no pic Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 39 if (isset($_FILES[$this->file])) { Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 44 } elseif (isset($GLOBALS['HTTP_POST_FILES'][$this->file])) { Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 55 'tmp_name' => $GLOBALS[$this->file]); Those lines are found in the MS1 version, which will not work with MS2. Please install the MS2 version. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
chfields Posted August 10, 2003 Share Posted August 10, 2003 Yes I used the MS2 version I wanted to compare it to big images which I have on MS1 shop Quote Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 Yes I used the MS2 version I wanted to compare it to big images which I have on MS1 shop Those lines do not match up with the MS2 upload.php. they match up with the MS1 upload.php... some of those lines are not even found in the MS2 upload.php file. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
David 1cog Posted August 10, 2003 Share Posted August 10, 2003 Sorry Joshua, didn't spot that. I'll follow up with my hosting company. If they cannot enable GIF support is it possible to disable it in your mod? Thanks for your help and an excellent contribution. Quote David @ 1cog. Link to comment Share on other sites More sharing options...
chfields Posted August 10, 2003 Share Posted August 10, 2003 I just replaced the upload.php from the MS2 download and now I get target_small: /home/mrsfield/public_html/catalog/images/3565.jpg Resizing small image Starting in_resize_image() temp_pic:/tmp/phpms7lyk image_new:/home/mrsfield/public_html/catalog/images/3565.jpg width:500 Image has to be resized; checking for gd-lib GD-Lib found start resizing Image Format:2 Generated new SRC-Pic GD-LIB 2 - Generated new Pic target_big: /home/mrsfield/public_html/catalog/images/images_big/ Copying big image Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 44 Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 49 Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 60 Quote Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 44 Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 49 Warning: Illegal offset type in /home/mrsfield/public_html/catalog/admin/includes/classes/upload.php on line 60 those lines are part of the original MS2 upload.php script. They were not altered by the image resize mod. I have a feeling that if you revert to the original MS2 upload.php script (without the image resize) that you will still get those errors. Its an error that has to do with arrays, and something in the PHP configuration, I think. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
loxly Posted August 10, 2003 Share Posted August 10, 2003 There is some legality about gif's that doesn't allow development of software to manipulate them. That is one of the reasons that png's are replacing gif's. It would be a good idea to get your favorite graphics progam out and convert the gif's to something else :) Quote [no external urls in signatures please, kthanks] Link to comment Share on other sites More sharing options...
chfields Posted August 10, 2003 Share Posted August 10, 2003 I guess I will just delete this and use big images. Thanks for the help! Quote Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 I guess I will just delete this and use big images. Thanks for the help! sorry about the bad luck man. From the info you posted, the image resize is working great (it resizes and copies the images), but then the upload script is failing in the function parse().. I did not touch that function in either the MS1 or MS2 versions... and no-one else is reporting a problem with Illegal offsets. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 There is some legality about gif's that doesn't allow development of software to manipulate them. That is one of the reasons that png's are replacing gif's. It would be a good idea to get your favorite graphics progam out and convert the gif's to something else :) Actually that may start to change now... the patent on GIF compression has expired in the US (as of June 21th, 2003) and will expire in other countries next year (Canada expiring July 7, 2004; the UK, France, and Germany expiring June 18, 2004; and Japan expiring June 20, 2004).... whether GNU companies who could not use the GIF compression before will go back and add or re-add support for it remains to be seen. PNG is really the better format of the two, but which will prevail is hard to say. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
David 1cog Posted August 10, 2003 Share Posted August 10, 2003 There is some legality about gif's that doesn't allow development of software to manipulate them. That is one of the reasons that png's are replacing gif's. The patent for GIFs expired in the US last month and will expire around the rest of the world over the next year (?), so there is no longer an issue with using them because of patent fees. PNG is unlikely to threaten GIFs until M$ provides full support for PNG in Windows IE (alpha transparency, etc.). Quote David @ 1cog. Link to comment Share on other sites More sharing options...
chfields Posted August 10, 2003 Share Posted August 10, 2003 but then the upload script is failing in the function parse().. Any ideas on how to fix this?? Quote Link to comment Share on other sites More sharing options...
dreamscape Posted August 10, 2003 Author Share Posted August 10, 2003 but then the upload script is failing in the function parse().. Any ideas on how to fix this?? not really... are you on a test server or the same server as your live shop?? those lines refer to $GLOBALS... I am wondering if something in the php configuration is messing it up... only thing I can think of is registered globals... that error & that part of the upload script is out of my league really... maybe either contact the dev team or post in the general support about the MS2 upload class and those errors... may get more attention there Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
chfields Posted August 10, 2003 Share Posted August 10, 2003 I am on the same server as my live shop, although my live shop is MS1. I am putting together my MS2 shop on the same server. I am using /catalog for MS2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.