Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Support thread for the Image Magic contribution


tomjmul

Recommended Posts

After reinstall everything. I still have "error no GD library"

 

I can use the 'On the Fly' Auto Thumbnailer using GD Library no problem

 

Why I can't use the Image magic??

Link to comment
Share on other sites

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

After reinstall everything. I still have "error no GD library"

 

I can use the 'On the Fly' Auto Thumbnailer using GD Library no problem

 

Why I can't use the Image magic??

 

Try removing this line from catalog/imagemagic.php

if (!imagemagic_functions::gd_is_bundled()) http_headers('','Error,No GD library');

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

Good Is work.

Thanks Tomjmul

 

However, I have followed function could not use

 

Graphic Watermark in Pop-up Images okay

Graphic Watermark in Product Information Thumbnails No image

 

Text Watermark in Pop-up Images okay

Text Watermark in Product Information Thumbnails No image

 

How to fix it?

 

Thanks

Edited by vincenzo
Link to comment
Share on other sites

Graphic Watermark in Pop-up Images okay

Graphic Watermark in Product Information Thumbnails No image

 

Text Watermark in Pop-up Images okay

Text Watermark in Product Information Thumbnails No image

 

How to fix it?

 

Again, it would help if you would post or pm a link to your site

 

 

OK folks, I am now tired of asking for urls.

It is commonsense....If you are having difficulties and want help, then post or PM the url to your site.

 

 

Tom

Edited by tomjmul

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

Wondering if anyone else has lost the checkoutBar line across the bottom of their checkout pages since adding this contribution. Not even sure if this con. is what caused it but just showed up (or NOT showed up), noticed it today after adding IM yesterday. Could it be something in the html_output.php that was changed? Here's the code that doesn't work now, towards the end of the checkout confirmation php. The pixel shows up exactly as a pixel now and not a line.

 

<tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_PAYMENT . '</a>'; ?></td>
		<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
	</table></td>
  </tr>
</table></td>

.

 

Any ideas?

 

Thanks

Karen

Link to comment
Share on other sites

The same problem here as giapet. tep_draw_separator assign image as '%' in width. There's a line in tep_image function in html_output.php to don't calculate if image width or height value is '%'. Every tep_draw separator in my store now has width=1 and height=1. Why it doesn't seem to work?? Any suggestion??

Link to comment
Share on other sites

The same problem here as giapet. tep_draw_separator assign image as '%' in width. There's a line in tep_image function in html_output.php to don't calculate if image width or height value is '%'. Every tep_draw separator in my store now has width=1 and height=1. Why it doesn't seem to work?? Any suggestion??

 

Ignoring percentage values just means that i/m will just output the original

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

On second thoughts, I think I should fix a little gremlin that has crept in :D

 

In catalog/includes/functions/html_output.php

 

Find:

if (strstr($image, 'pixel')) $calculate = false

 

Change to:

if (strstr($src, 'pixel')) $calculate = false

 

Please let me know

 

Tom

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

Tom,

 

Still not working.

 

Is there a way to code this to combine the fact the pixel itself has a width%?

 

// Don't calculate if the image is set to a "%" width

if (strstr($width,'%') == true || strstr($height,'%') == true) $calculate = false;

 

// Dont calculate if a pixel image is being passed (hope you dont have pixels for sale)

if (strstr($image, 'pixel')) $calculate = false;

 

Karen

Link to comment
Share on other sites

HI to all!

 

i a'm having problems with i/m, images wouldn't show, i got no error message and i don't know where to begin. No pictures are written in my thumbnails dir although is present adn chmod is correct.

 

I have oscommerce installed on my root folder, any help would be apreciated. I re-installed twice but no way, still not showing images correctly.

 

please take a look at http://tienda.forapista.com/

Link to comment
Share on other sites

HI to all!

 

i a'm having problems with i/m, images wouldn't show, i got no error message and i don't know where to begin. No pictures are written in my thumbnails dir although is present adn chmod is correct.

 

I have oscommerce installed on my root folder, any help would be apreciated. I re-installed twice but no way, still not showing images correctly.

 

please take a look at http://tienda.forapista.com/

 

The problem is with your DIR_FS_CATALOG configuration value.

Is this set correctly in includes/configure.php

 

If so, try removing line 16 of imagemagic.php. This one:

 

chdir (DIR_FS_CATALOG);

Edited by tomjmul

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

Tom,

 

Kudos! Very cool and I can't wait to get it working! Here is my url http://www.mediamarketers.com/store

 

When I look at the image properties and copy the image src into the browser address, I get this before the jpg code starts:

 

<br />

<b>Notice</b>: Undefined variable: config_values in <b>C:\Websites\MediaMarketers\store\imagemagic.php</b> on line <b>30</b><br />

<br />

<b>Notice</b>: Undefined variable: page_prefix in <b>C:\Websites\MediaMarketers\store\imagemagic.php</b> on line <b>161</b><br />

<br />

<b>Notice</b>: Use of undefined constant file - assumed 'file' in <b>C:\Websites\MediaMarketers\store\imagemagic.php</b> on line <b>398</b><br />

 

I also had to enable something in my PHP.ini file to get rid of some other errors (allow_call_time_pass_reference changed to On).

 

I am a VBScript guy so I am not real good in PHP and don't know where these variables are coming from, etc.

 

Again, great work Tom! :thumbsup:

 

Chad

Link to comment
Share on other sites

This is another problem with your php.ini file. You have error notices switched on.

 

Have a look for your error reprting line and change to something like this:

 

error_reporting = E_ALL & ~E_NOTICE

 

Actually, while I'm here, I think it is a bad idea to have any error reporting switched on in php for a live site. For security reasons errors should instead be logged.

 

Thanks though for pointing this out, I will be a little tighter in my coding for the next major revision.

 

Tom

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

If I have oscommerce installed on my root folder , not catalog , what files need to be changed in order to make this contrib work ?

 

I tried installing this before but it didn't work out , i'd like to get it working.

 

 

Cheers

Link to comment
Share on other sites

If I have oscommerce installed on my root folder , not catalog , what files need to be changed in order to make this contrib work ?

 

I tried installing this before but it didn't work out , i'd like to get it working.

Cheers

 

yeah in my root folder i got public_html and then my catalog but its not named catalog its a different folder name but i dont know if that makes a difference or not

Link to comment
Share on other sites

This is another problem with your php.ini file. You have error notices switched on.

 

Have a look for your error reprting line and change to something like this:

 

error_reporting = E_ALL & ~E_NOTICE

 

Actually, while I'm here, I think it is a bad idea to have any error reporting switched on in php for a live site. For security reasons errors should instead be logged.

 

Thanks though for pointing this out, I will be a little tighter in my coding for the next major revision.

 

Tom

 

Tom, you are the man! You are right, I do have it turned on. I was planning on turning it off, but was still troubleshooting some PHP and OSC problems... Thanks again!!! :thumbsup:

Link to comment
Share on other sites

Tom, great contribution, but I'm experiencing quite some difficulties.

 

The problem has been mentioned before: Some images (I'd say about 15%-30%) cannot display unless you turn filename encryption on. When viewing the thumbnail, the following error messages appear:

 

Warning: Division by zero in /var/www/html/catalog/imagemagic.php on line 139

 

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/catalog/imagemagic.php:139) in /var/www/html/catalog/imagemagic.php on line 481

 

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/catalog/imagemagic.php:139) in /var/www/html/catalog/imagemagic.php on line 482

 

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/catalog/imagemagic.php:139) in /var/www/html/catalog/imagemagic.php on line 483

 

This is in itself not such a huge problem, but filename encryption is really taking a huge load and makes all pages load really slow. I'd say that (with server-side caching on ofcourse) page loading times are at least 3x as high as when I set your 'master switch' to disabled.

You can see for yourself at my site, www.computeramstelveen.nl.

 

BTW, I've upgraded to the version you uploaded the day before yesterday, I believe that only change was in imagemagic.php?

Link to comment
Share on other sites

yeah in my root folder i got public_html and then my catalog but its not named catalog its a different folder name but i dont know if that makes a difference or not

It shouldn't make a difference - please read the readme.

 

Tom, great contribution, but I'm experiencing quite some difficulties.

 

The problem has been mentioned before: Some images (I'd say about 15%-30%) cannot display unless you turn filename encryption on. When viewing the thumbnail, the following error messages appear:

 

Warning: Division by zero in /var/www/html/catalog/imagemagic.php on line 139

 

Yes this something I will definitely be looking into. Will release a new version over the weekend

 

This is in itself not such a huge problem, but filename encryption is really taking a huge load and makes all pages load really slow. I'd say that (with server-side caching on ofcourse) page loading times are at least 3x as high as when I set your 'master switch' to disabled.

 

I don't think it is the filename encrytion routine, which is quite lightweight in itself, but instead the image processing until the server cache is built up

 

I will have a look at your site when I get some time

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

After toggling options for the last half hour, I've worked out that you have to have set in the Images configuration for Image Required = true

 

This allows the images to be shown, and Image Magic is now doing it's thing.

 

I don't really want to have this set, since there are several instances of where I don't have an image, and I'd rather not see a failed image holder.

 

Any ideas?

 

Thanks

Aaron

 

Arron not a techincal solution, but I just use this image wherever I don't have a suitable pic to use no_pic.gif

Link to comment
Share on other sites

Arron not a techincal solution, but I just use this image wherever I don't have a suitable pic to use no_pic.gif

 

Great tip djswain, there is a lot to be said for a standard 'no image' image

 

Anyway, regards the initial problem Aaron had, we did come up with the fix and nobody else should come across this again.

 

Tom

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