Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Support thread for the Image Magic contribution


tomjmul

Recommended Posts

When I watch my thumbnail directory as I go to a page a thumbnail on it, it takes 3 to 4 seconds for the thumbnail to be created. That's why the image appears to be broken on the first load. Why would it take longer for me? I have a different GD plugin for another oscommerce store on this same server that can generate thumbnails instantly. Maybe it's supposed to show the non-server cached thumbnail if the server cached thumbnail exists, but that's broken?

 

If possible, could someone email their working files:

catalog/includes/functions/html_output.php

catalog/admin/includes/functions/general.php

to [email protected] ... thanks

Link to comment
Share on other sites

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Ok I finally got some good info. If I enter the url of an image that doesnt have a thumbnail yet I get this:

 

Notice: Undefined variable: image_watermark in C:\Inetpub\wwwroot\eStuff\shop\imagemagic.php on line 283

 

Notice: Undefined variable: frame in C:\pathtosite\imagemagic.php on line 284

 

Notice: Undefined variable: bevel in C:\pathtosite\imagemagic.php on line 285

 

Notice: Undefined variable: text_watermark in C:\pathtosite\imagemagic.php on line 286

 

Warning: Cannot modify header information - headers already sent by (output started at C:\pathtosite\imagemagic.php:283) in C:\pathtosite\imagemagic.php on line 465

 

Warning: Cannot modify header information - headers already sent by (output started at C:\pathtosite\imagemagic.php:283) in C:\pathtosite\imagemagic.php on line 466

 

Warning: Cannot modify header information - headers already sent by (output started at C:\pathtosite\imagemagic.php:283) in C:\pathtosite\imagemagic.php on line 475

 

Warning: Cannot modify header information - headers already sent by (output started at C:\pathtosite\imagemagic.php:283) in C:\pathtosite\imagemagic.php on line 301

 

and then a bunch of jibber jabber...

And when I refresh the image appears.

Link to comment
Share on other sites

You have got to be kidding me... It was the PHP error reporting setting.

 

Changed it from:

error_reporting = E_ALL; display all errors, warnings and notices

 

To this:

error_reporting = E_ALL & ~E_NOTICE

 

Now it works great. What a relief.

Link to comment
Share on other sites

TOM! I purchased your install service a week ago. And I havent heard from you. My credit card was charged a week ago by another company. (Sex Toy website) Please help. I feel like an idiot because I trusted the transaction with my ftp info in it but you have never replied to any emails. Did I get ripped off and/or did your website get hijacked. Anybody else have this problem? I used the link on Toms signature. :'( http://www.celtware.com/im/installation.php

 

Someone please clue me into what's going on.

Link to comment
Share on other sites

Sorry I can't read every page regarding this but I need to know how to enable the water mark feature? I've installed the latest version and all is fine. When I go to create the water mark I choose text and make it 100% visable but nothing shows up....is there something I've done wrong?

 

Thanks,

 

Nigel

www.tsurishopjapan.net

 

can you post the url. I want to get to the bottom of this watermark thing

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

UPDATE: Tom emailed me and squared things up. No Problem...

 

 

Hi Cameron,

 

Yes indeed I left for Ireland for a week on the beach and forgot to take the installation service offline. Doh !!

My mistake and all I can do is apologize.

 

I have done a good few of these installations and fixes and normally turn them around within 12 hours.

 

Thanks for coming back and setting the record straight.

 

Tom

Edited by tomjmul

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

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.

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

 

I am having the same problem as the last guy asking this question. I have installed many contributions and I'm no dummy!!! But I need to know exactly what files need to be replaced regarding the tep_image function. I don't know where to begin in the html output file and where to end regarding replacing the code. Please help. Thanks!

 

Any other ideas on this? Thanks! I would like to use this contribution but am hanging on this one thing. Thanks!

Link to comment
Share on other sites

johnnnie

He made with an ftp prog all the folders and subfolders manual and also atributes for that folders on 777 ( user rights)

Then you have to set with the admin of oscommerce the thumbnail cache directory the right path.

( if the folders where already made by image magic then the rights can't be set because of apache owner for that folders) ( aks your admin or provider to remove them or to set the proper owner with userrights)

So then do make another folder and subfolders before you set:

The folder in the admin of oscommerce and after that switch the the cache to on .

You are exactly right.

You have to create an new folder for the thumbnails with a ftp program, for example call it mythumbnails.

And, if you have subfolders in your /images/ folder, you have to create this folders with the same names in this mythumbnails folder.

Now you got the same structure as in your /images/ folder in your mythumbnails folder.

Now chmod the mythumbnails folder and his subfolders to 777

Then you have to set in the adminsection of oscommerce the settings of imagemagic the thumbnail cache directory to the right name: mythumbnails.

 

Result: imagemagic has not to create folders anymore himself, as they have been created by yourself allready and imagemagic is now able to create and read the images it creates in your handcreated mythumbnails folder and his subfolders, if any.

 

If you add images lateron and you are going to use a new subfolder for them in your /images/ folder, you have to create a subfolder with the same name in your mythumbnails folder as well before you run your site again and imagemagic starts to create his own images.

 

G?tz

Link to comment
Share on other sites

Any other ideas on this? Thanks! I would like to use this contribution but am hanging on this one thing. Thanks!

 

Don't you just need to replace everything from the function "function tep_image" to immediately before the "tep_image_submit" function?

 

 

I was wondering if anybody knew the solution to the refresh problem - that is that the images do not display properly when viewed the first time, yet display fine when the page is refreshed?! Any ideas? I've FTPd the images from the thumbnail directory and it seems that the thumbnails are created fine the first time, yet fail to display properly. Tom, or anybody else, any suggestions would be greatly appreciated.

 

Again this is on a Windows server.

 

PS: I've read the whole 34 pages of this topic to no avail.

 

-------------------------------------------

Edited by The_Bear
Link to comment
Share on other sites

Hi,

Im tring to install the image magic plug-in/contribution however when i try to upload the SQL database via PHPmyAdmin i get the following error:

 

Error

SQL query:

 

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 ( 3205, 'Product Information Image Width', 'PRODUCT_INFO_IMAGE_WIDTH', '100', 'The pixel width of images shown on your product information page', 4, 100, NULL , '2005-01-06 20:24:30', NULL , '' ) ;

 

 

 

MySQL said:

 

#1146 - Table 'wspcs_ostt1.configuration' doesn't exist

 

Unfortunatly i dont have 60 bucks to spare for installation and any help would be greatly appreciated

Thanks

Kyle

Link to comment
Share on other sites

I'd just like to say thanks for this contribution. It's really improved my website's appearance. I went for the guaranteed install as I couldn't face doing it myself (it took me nearly three weeks to sort out my Worldpay module!!).

 

Installed quickly and works great, thanks.

 

Rua

Link to comment
Share on other sites

hi guys i read nearly all replies but it didnt work for me :'(

i ve windows server and we can say this cont. is not for iss :o

can someone offer another image contr. like this one? <_<

 

I have it working on a windows server myself so it is indeed very possible. Manually create the 'thumbnails' folder in your store's root and set the permissions to allow it to be written by the script.

Failing that....just click the link below :D

 

Can you use the "osc image magic" contribution if

 

regester globals is turned off.

 

That has nothing to do with register globals. I can't think why it wouldn't work.

Edited by tomjmul

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

Hi!

I have strange problem. First I have installed Image Magic on my localhost( I have XAMPP with PHP 5... and MySQL aslo 5...) and it work perfect, but later I have try the same code on other version of PHP and MySQL and it does't work any more...

after last fix on 18 May 2006 it work with some picture - the popup big picture I can see, but thumbnails and some times small picture in details not.

Link to comment
Share on other sites

Hi!

I have strange problem. First I have installed Image Magic on my localhost( I have XAMPP with PHP 5... and MySQL aslo 5...) and it work perfect, but later I have try the same code on other version of PHP and MySQL and it does't work any more...

after last fix on 18 May 2006 it work with some picture - the popup big picture I can see, but thumbnails and some times small picture in details not.

 

 

That sounds as though it could be a GD library problem.

 

Write a small script and put it on both servers then compare the output

 

<?php

phpinfo();

?>

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

i have my thumbnails folder but cant change it writable information :wacko:

i renamed it to "/kucuk" for my language but as others windows doesnt change its read only status, cant do anything on folders :'(

is it related with iis ? it gives 777 for everything ..

Link to comment
Share on other sites

That sounds as though it could be a GD library problem.

 

Write a small script and put it on both servers then compare the output

 

<?php

phpinfo();

?>

 

 

This version work:

gd

GD Support enabled

GD Version bundled (2.0.28 compatible)

FreeType Support enabled

FreeType Linkage with freetype

FreeType Version 2.1.7

T1Lib Support enabled

GIF Read Support enabled

GIF Create Support enabled

JPG Support enabled

PNG Support enabled

WBMP Support enabled

XBM Support enabled

 

 

and this not:

gd

GD Support enabled

GD Version bundled (2.0.22 compatible)

FreeType Support enabled

FreeType Linkage with freetype

GIF Read Support enabled

JPG Support enabled

PNG Support enabled

WBMP Support enabled

XBM Support enabled

 

 

Where is the point?

Link to comment
Share on other sites

Hi Rui,

 

If you haven't solved the html "not valid" problem with image magic yet then here is the solution:

 

replace the suspect code you quoted below with:

 

//Return the html
	$image = '<img src="imagemagic.php?img='.$src.'&w='.
	tep_output_string($width).'&h='.tep_output_string($height).'&page='.$page.'"';

 

W3C returns no errors from imagemagic with this change.

 

Sheri

 

 

Dear Sirs

 

I've installed the Image Magic Contribution, but I'm experiencing a strange situation concerning the & in the image link.

In the html_output.php the problem concerns the line:

 

//Return the html

//$image = '<img src="imagemagic.php?img='.$src.'&w='.tep_output_string($width).'&h='.tep_output_string($height).'&page='.$page.'"';

 

This result in the following code in the html files:

 

<IMG title="Quarto Ambar" height=8 alt="Quarto Ambar" src="imagemagic.php?img=images/grp_bg10162_lg.jpg&w=102&h=1&page=prod_info" width=102 border=0></A>

 

The problem is that the &_GET will be with the wrong values, resulting in a page without any image.

 

How can I force, not to translate & in &?

 

PS: I've also tested with:

$image = '<img src="imagemagic.php?img='.$src.'&'.'w='.tep_output_string($width).'&'.'h='.tep_output_string($height).'&'.'page='.$page.'"';

 

(Above, where is shown & the correct value is & amp ;)

and

 

$image = '<img src="imagemagic.php?img='.$src."&".'w='.tep_output_string($width)."&".'h='.tep_output_string($height)."&".'page='.$page.'"';

 

(Above, where is shown & the correct value is & amp ;)

 

And the result is the same.

 

Best Regards

Rui Castro

Link to comment
Share on other sites

Tom,

I am interested in your "guaranteed install" service but I do have a question as to how this contribution might interact (or not) with a modification I have made to my images on the product_info pages. I eliminated the pop up window that shows up when a product is clicked on for a larger image and instead installed a contribution that allows the picture to be resized and displayed on the page bigger and smaller when it is clicked on (again rather than having a popup). Check out my website: www.momentsofelegance.com. I would still like to have this functionality rather than the pop up windows on the images. I have already installed the contribution except for the html_output page which is giving me some trouble and I think may need some slight modifications to your code in order to make this work. check out my site (to see what I mean as far as how the images are set up) and I've also pasted below my tep_image function for you to see what changes were made. Please let me know if you think you'd be able to get this contribution to work without using the popu ups and I can go ahead an place the install order on your website.

 

Thanks!!!

 

 

// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
  return false;
}

 if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
	if ($image_size = @getimagesize($src)) {
	  if (empty($width) && tep_not_null($height)) {
		$ratio = $height / $image_size[1];
		$width = $image_size[0] * $ratio;
	  } elseif (tep_not_null($width) && empty($height)) {
		$ratio = $width / $image_size[0];
		$height = $image_size[1] * $ratio;
	  } elseif (empty($width) && empty($height)) {
		$width = $image_size[0];
		$height = $image_size[1];
	  }
	} elseif (IMAGE_REQUIRED == 'false') {
	  return false;
	}
  }




// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) {
  $image .= ' title=" ' . tep_output_string($alt) . ' "';
}

if (tep_not_null($width) && tep_not_null($height)) {
  $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
}

if (tep_not_null($parameters)) $image .= ' ' . $parameters;

$image .= '>';

return $image;
 }

////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
global $language;

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

$image_submit .= '>';

return $image_submit;
 }

Link to comment
Share on other sites

Hi Tom,

 

Your contribution looks perfect for me, only I'm having a problem getting it to display the images.

 

I can't work out whether GD is resizing the images correctly (an outline appears where the image should be and it is the right size), and I'm not sure whether the path to the resized image is correct. Here's an example:

 

http://www.f4l.co.uk/imagemagic.php?img=im...338&h=150&page=

 

I've manually created the /thumbnails directory in the root of my site, i.e. /home/httpd/vhosts/f4l.co.uk/httpdocs/thumbnails

and CHMODed it to 777, but it's empty, so clearly the resized images aren't being written to it.

 

I'm using PHP 4.4.1 and GD 2.0.28 with support for all formats enabled.

 

The site is at www.f4l.co.uk and is password protected during development - user is carol and password is access.

 

I have been through your instructions several times with a fine-tooth comb, and I can't see where I'm going wrong. This is a heavily modified site, so I'm worried that another contribution is causing the problem, however I wonder what your initial thoughts are on reading this... Is this an issue you have come across before?

 

Thanks for any help/guidance that you or any other people of greater intelligence than myself can offer.

 

Andrew

=======================

I do not fear computers. I fear the lack of them.

Isaac Asimov

Link to comment
Share on other sites

Does anyone know how to install "gd lib" on a windows server.

 

A dummies guide, I'm not very bright! :huh:

 

Yes, it's quite simple. Most of the latest versions are shipped with it, though it might be switched off. Go into your php.ini, find the extensions section and uncomment the gd line.

 

Andrew, I've seen your problem. Go into your php.ini file and switch off warnings.

 

Tom

 

Wayey - We've hit the big 500 since May 18th B) Despite all the problems posted here, the contribution must be working out for some :lol:

Edited by tomjmul

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

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...