Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

phpThumb


rromeijn

Recommended Posts

I have migrated my shop from a shared server to a a dedicated one, but the products images no longer appear.

images with watermarks are generated correctly in the cache folder. but on the shop the images are displayes as a red cross.

 

can anyone tell me where the problem is.

Link to comment
Share on other sites

In your browser, View > Page source and see where it is looking for the images. Maybe the database still has an old domain name or URL? Are you producing images on-the-fly, or just showing canned images? If on-the-fly, are you missing any PHP libraries, such as GD, used to manipulate images? You've got to do some detective work here. Are you getting any errors logged anywhere on your site? Do you have "hotlink protection" enabled and your site isn't in the whitelist of allowed sites? Were image names changed while going from one server to another? E.g., underscores became hyphens, or everything folded to lower case? Was your previous server on Windows and your new one Linux, and you never bothered to consistently capitalize names, such that a file is "Product_1234.jpg" and the reference in the database is "product_1234.jpg"? Lots of things could have happened, and you've given us no information to work with.

Link to comment
Share on other sites

In your browser, View > Page source and see where it is looking for the images.

My word Phil...that's taking the long way around the barn, isn't it? Can't you just right click on the red x and select properties to get the same information? But I think you're right on the problem.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

To be sure i have turned hotlink protection off.

I am producing images on the fly. in the phpThumb Cache foldr i can see that the images are created correct with the watermark on it.

imagenames are not changed during the migration from shared to dedicated server. both servers are Linux and have the same PHP version installed on them

the whole webshop works fine (with phpThumb disabled).

 

View > Page source (from catalog/index.php) shows me this

<img src="oscthumb.php?src=lMzVwtXM2I7gzdLf1dfUyn_a1M_MytzOhcbi0pGysbU.&w=100&h=100&f=jpg&q=95&hash=f300d1a13e5480ee7ac399031054b037" w="100" h="100" border="0" alt="Showtime Moulding Gum 125ml" title="Showtime Moulding Gum 125ml">

 

the file oscthumb.php exists in the catalog/ folder

 

in logfiles i can not find anything

 

does this narrow the problem down?

Link to comment
Share on other sites

There is more

if i turn off oscThumbs, all images are displayed correct

if i turn it on with encryption, no images are displayed, they are all red crosses.

if i turn it on without encryption, most images are displayed as red cross, but some are displayed as a gray area with this text in red:

phpThumb() v1.7.9-200805132119

"/home/xxxxxxx/public_html/catalog/images/Diapason actie 10 1 gratis.jpg" does not exist

the original filename of the image is: Diapason actie 10 + 1 gratis.jpg (it has a "+" (PLUS) in the filename).

the image does exist on the location, it is displyaed when ocsThumbs is turned off.

 

Anyone who can help me solve this problem?

Link to comment
Share on other sites

There is more

if i turn off oscThumbs, all images are displayed correct

if i turn it on with encryption, no images are displayed, they are all red crosses.

if i turn it on without encryption, most images are displayed as red cross, but some are displayed as a gray area with this text in red:

phpThumb() v1.7.9-200805132119

"/home/xxxxxxx/public_html/catalog/images/Diapason actie 10 1 gratis.jpg" does not exist

the original filename of the image is: Diapason actie 10 + 1 gratis.jpg (it has a "+" (PLUS) in the filename).

the image does exist on the location, it is displyaed when ocsThumbs is turned off.

 

Anyone who can help me solve this problem?

1 what are your GD library details, as that may be different on your new server

2 check that it is looking to the correct folder, in admin

Phoenix support now at https://phoenixcart.org/forum/
App created for phoenix
TinyMCE editor for admin

 

Link to comment
Share on other sites

My GD Details:

GD Support enabled

GD Version bundled (2.0.34 compatible)

FreeType Support enabled

FreeType Linkage with freetype

FreeType Version 2.2.1

GIF Read Support enabled

GIF Create Support enabled

JPG Support enabled

PNG Support enabled

WBMP Support enabled

XPM Support enabled

XBM Support enabled

 

on my old server the freetype Version was 2.1.9 that is the only difference there

Link to comment
Share on other sites

i can give you the link,

http://shop.flash-world.nl

but i have disabled the phpThumbs in order to have the shop function normal.

so at this moment all the images are shown normaly

You don't have a 'test' shop? Everyone should have a 'test' shop...

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

in the phpthumb.config.php file

(sorry for the format, i am still new to the foum so do not know how to add code in a better format

i tried this on my test server, and it worked

 

// START USER CONFIGURATION SECTION:

// * DocumentRoot configuration

// phpThumb() depends on $_SERVER['DOCUMENT_ROOT'] to resolve path/filenames. This value is usually correct,

// but has been known to be broken on some servers. This value allows you to override the default value.

// Do not modify from the auto-detect default value unless you are having problems.

//$PHPTHUMB_CONFIG['document_root'] = '/home/httpd/httpdocs';

//$PHPTHUMB_CONFIG['document_root'] = 'c:\\webroot\\example.com\\www';

//$PHPTHUMB_CONFIG['document_root'] = $_SERVER['DOCUMENT_ROOT'];

//$PHPTHUMB_CONFIG['document_root'] = realpath((@$_SERVER['DOCUMENT_ROOT'] && file_exists(@$_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'])) ? $_SERVER['DOCUMENT_ROOT'] : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace(DIRECTORY_SEPARATOR, '/', realpath('.'))));

// $PHPTHUMB_CONFIG['document_root'] = realpath((getenv('DOCUMENT_ROOT') && ereg('^'.preg_quote(realpath(getenv('DOCUMENT_ROOT'))), realpath(__FILE__))) ? getenv('DOCUMENT_ROOT') : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace(DIRECTORY_SEPARATOR, '/', dirname(__FILE__))));

 

i changed it to this

(removed the // on some of the options) (all should be on 1 line)

 

// START USER CONFIGURATION SECTION:

// * DocumentRoot configuration

// phpThumb() depends on $_SERVER['DOCUMENT_ROOT'] to resolve path/filenames. This value is usually correct,

// but has been known to be broken on some servers. This value allows you to override the default value.

// Do not modify from the auto-detect default value unless you are having problems.

//$PHPTHUMB_CONFIG['document_root'] = '/home/httpd/httpdocs';

//$PHPTHUMB_CONFIG['document_root'] = 'c:\\webroot\\example.com\\www';

//$PHPTHUMB_CONFIG['document_root'] = $_SERVER['DOCUMENT_ROOT'];$PHPTHUMB_CONFIG['document_root'] = realpath((@$_SERVER['DOCUMENT_ROOT'] && file_exists(@$_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'])) ? $_SERVER['DOCUMENT_ROOT'] : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace(DIRECTORY_SEPARATOR, '/', realpath('.'))));

$PHPTHUMB_CONFIG['document_root'] = realpath((getenv('DOCUMENT_ROOT') && ereg('^'.preg_quote(realpath(getenv('DOCUMENT_ROOT'))), realpath(__FILE__))) ? getenv('DOCUMENT_ROOT') : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace(DIRECTORY_SEPARATOR, '/', dirname(__FILE__))));

$PHPTHUMB_CONFIG['document_root'] = DIR_FS_CATALOG; // oscThumb: added osCommerce directory (i added this bit myyself, i had a problem with this addon, which i later fixed, but found something suggesting to add this line

Phoenix support now at https://phoenixcart.org/forum/
App created for phoenix
TinyMCE editor for admin

 

Link to comment
Share on other sites

I'd be concerned about trying to use file names such as "Diapason actie 10 + 1 gratis.jpg". Even if you're on a Windows server, where blanks may be allowed, the Web doesn't particularly like blanks and special characters in names. Do you have any control over the names? If you do, remove '+' or change it to 'plus', and change blanks to underscores:

"Diapason_actie_10_plus_1_gratis.jpg". A browser sending this name back to the server is less likely to have problems.

Link to comment
Share on other sites

  • 1 year later...

I had similar phpThumb no image showing issues.... Try setting all the JPEG QUALITY settings to 100, then test. Once I did this the missing images began appearing again, then I was able to re-set the quality any other varables without issue. Odd, but worked for me.

 

oscThumb 1.12 with the core phpThumb 1.7.10 update applied, on mysql5/php5 server. 2.2Rc2a

-Dave

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