Full service web hosting, great prices and support. Starts at $1.99/month!
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Error when adding an image to product

  1. #1
    gazzari
    Guest


    Default Error when adding an image to product

    Error when adding an image. Page displays below code

    I also notice that even though I have images set to be 300x300, when I upload 400x400, or any other size, they are not resized for the main image.

    Code:
    Failed:
    
    phpThumb() v1.7.11-201108081537
    (DELETED LINK)
    
    Error messages disabled
    
    phpThumb() v1.7.11-201108081537 in file "phpthumb.class.php" on line 216
    
    setSourceFilename(/home/dprofili/public_html/images/images_big/trailer-sign-2.jpg) set $this->sourceFilename to "/home/dprofili/public_html/images/images_big/trailer-sign-2.jpg" in file "phpthumb.class.php" on line 262
    
                      file_exists() = 0 in file "phpthumb.class.php" on line 1165
    
    file_exists_ignoreopenbasedir() = 0 in file "phpthumb.class.php" on line 1166
    
                          is_file() = 0 in file "phpthumb.class.php" on line 1167
    
                    is_executable() = 0 in file "phpthumb.class.php" on line 1168
    
    using ImageMagick path from `which convert` (/usr/bin/convert) in file "phpthumb.class.php" on line 1188
    
    ImageMagick version checked with "convert --version" in file "phpthumb.class.php" on line 1215
    
    ImageMagick convert --version says "Version: ImageMagick 6.7.6-8 2012-05-02 Q16 http:" in file "phpthumb.class.php" on line 1223
    
    Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 917
    
    $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 923
    
    $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 934
    
    $this->thumbnailQuality set to "99" in file "phpthumb.class.php" on line 951
    
    !$this->config_allow_src_above_docroot therefore setting "/home/dprofili/public_html/images/images_big/trailer-sign-2.jpg" (outside "/usr/local/apache/htdocs") to null in file "phpthumb.class.php" on line 1106
    
    $this->sourceFilename set to "" in file "phpthumb.class.php" on line 852
    
    phpThumb() v1.7.11-201108081537
    (DELETED LINK)
    
    Error messages disabled in file "phpthumb.class.php" on line 3847
    
    setCacheDirectory() starting with config_cache_directory = "cache/" in file "phpthumb.class.php" on line 958
    
    setting config_cache_directory to realpath(cache) = "/home/dprofili/public_html/3dadm/cache" in file "phpthumb.class.php" on line 986
    
    !$this->config_allow_src_above_docroot therefore setting "/home/dprofili/public_html/images/images_big/trailer-sign-2.jpg" (outside "/usr/local/apache/htdocs") to null in file "phpthumb.class.php" on line 1106
    
    SetCacheFilename() _src set from md5($this->sourceFilename) "" = "d41d8cd98f00b204e9800998ecf8427e" in file "phpthumb.class.php" on line 3240
    
    SetCacheFilename() _par set from md5(_w800_dpi150_q99) in file "phpthumb.class.php" on line 3273
    
    starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3035
    
    skipping GetImageSize() because $this->sourceFilename is empty in file "phpthumb.class.php" on line 3047
    
    GetImageSize("") failed in file "phpthumb.class.php" on line 3078
    
    $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1315
    
    ImageMagickThumbnailToGD() aborting because $this->sourceFilename is empty in file "phpthumb.class.php" on line 1359
    
    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3085
    
    SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3014
    
    SetOrientationDependantWidthHeight() setting w="800", h="0" in file "phpthumb.class.php" on line 3030
    
    EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3142
    
    starting SourceImageToGD() in file "phpthumb.class.php" on line 3400
    
    Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3471
    
    $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3523
    
    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3525
    
    phpThumb() v1.7.11-201108081537
    (DELETED LINK)
    
    Error messages disabled in file "phpthumb.class.php" on line 3847
    
    SourceImageToGD() failed in file "phpthumb.class.php" on line 342
    
    Failed:
    
    phpThumb() v1.7.11-201108081537
    (DELETED LINK)
    
    Error messages disabled
    
    phpThumb() v1.7.11-201108081537 in file "phpthumb.class.php" on line 216
    
    setSourceFilename(/home/dprofili/public_html/images/products/trailer-sign-2.jpg) set $this->sourceFilename to "/home/dprofili/public_html/images/products/trailer-sign-2.jpg" in file "phpthumb.class.php" on line 262
    
    Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 917
    
    $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 923
    
    $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 934
    
    $this->thumbnailQuality set to "99" in file "phpthumb.class.php" on line 951
    
    !$this->config_allow_src_above_docroot therefore setting "/home/dprofili/public_html/images/products/trailer-sign-2.jpg" (outside "/usr/local/apache/htdocs") to null in file "phpthumb.class.php" on line 1106
    
    $this->sourceFilename set to "" in file "phpthumb.class.php" on line 852
    
    phpThumb() v1.7.11-201108081537
    (DELETED LINK)
    
    Error messages disabled in file "phpthumb.class.php" on line 3847
    
    setCacheDirectory() starting with config_cache_directory = "cache/" in file "phpthumb.class.php" on line 958
    
    setting config_cache_directory to realpath(cache) = "/home/dprofili/public_html/3dadm/cache" in file "phpthumb.class.php" on line 986
    
    !$this->config_allow_src_above_docroot therefore setting "/home/dprofili/public_html/images/products/trailer-sign-2.jpg" (outside "/usr/local/apache/htdocs") to null in file "phpthumb.class.php" on line 1106
    
    SetCacheFilename() _src set from md5($this->sourceFilename) "" = "d41d8cd98f00b204e9800998ecf8427e" in file "phpthumb.class.php" on line 3240
    
    SetCacheFilename() _par set from md5(_w300_dpi150_q99) in file "phpthumb.class.php" on line 3273
    
    starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3035
    
    skipping GetImageSize() because $this->sourceFilename is empty in file "phpthumb.class.php" on line 3047
    
    GetImageSize("") failed in file "phpthumb.class.php" on line 3078
    
    $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1315
    
    ImageMagickThumbnailToGD() aborting because $this->sourceFilename is empty in file "phpthumb.class.php" on line 1359
    
    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3085
    
    SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3014
    
    SetOrientationDependantWidthHeight() setting w="300", h="0" in file "phpthumb.class.php" on line 3030
    
    EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3142
    
    starting SourceImageToGD() in file "phpthumb.class.php" on line 3400
    
    Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3471
    
    $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3523
    
    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3525
    
    phpThumb() v1.7.11-201108081537
    (DELETED LINK)
    
    Error messages disabled in file "phpthumb.class.php" on line 3847
    
    SourceImageToGD() failed in file "phpthumb.class.php" on line 342
    
    Failed:
    
    phpThumb() v1.7.11-201108081537
    (DELETED LINK)
    
    Error messages disabled
    
    phpThumb() v1.7.11-201108081537 in file "phpthumb.class.php" on line 216
    
    setSourceFilename(/home/dprofili/public_html/images/thumbs/trailer-sign-2.jpg) set $this->sourceFilename to "/home/dprofili/public_html/images/thumbs/trailer-sign-2.jpg" in file "phpthumb.class.php" on line 262
    
    Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 917
    
    $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 923
    
    $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 934
    
    $this->thumbnailQuality set to "99" in file "phpthumb.class.php" on line 951
    
    !$this->config_allow_src_above_docroot therefore setting "/home/dprofili/public_html/images/thumbs/trailer-sign-2.jpg" (outside "/usr/local/apache/htdocs") to null in file "phpthumb.class.php" on line 1106
    
    $this->sourceFilename set to "" in file "phpthumb.class.php" on line 852
    
    phpThumb() v1.7.11-201108081537
    (DELETED LINK)
    
    Error messages disabled in file "phpthumb.class.php" on line 3847
    
    setCacheDirectory() starting with config_cache_directory = "cache/" in file "phpthumb.class.php" on line 958
    
    setting config_cache_directory to realpath(cache) = "/home/dprofili/public_html/3dadm/cache" in file "phpthumb.class.php" on line 986
    
    !$this->config_allow_src_above_docroot therefore setting "/home/dprofili/public_html/images/thumbs/trailer-sign-2.jpg" (outside "/usr/local/apache/htdocs") to null in file "phpthumb.class.php" on line 1106
    
    SetCacheFilename() _src set from md5($this->sourceFilename) "" = "d41d8cd98f00b204e9800998ecf8427e" in file "phpthumb.class.php" on line 3240
    
    SetCacheFilename() _par set from md5(_w120_dpi150_q99) in file "phpthumb.class.php" on line 3273
    
    starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3035
    
    skipping GetImageSize() because $this->sourceFilename is empty in file "phpthumb.class.php" on line 3047
    
    GetImageSize("") failed in file "phpthumb.class.php" on line 3078
    
    $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1315
    
    ImageMagickThumbnailToGD() aborting because $this->sourceFilename is empty in file "phpthumb.class.php" on line 1359
    
    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3085
    
    SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3014
    
    SetOrientationDependantWidthHeight() setting w="120", h="0" in file "phpthumb.class.php" on line 3030
    
    EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3142
    
    starting SourceImageToGD() in file "phpthumb.class.php" on line 3400
    
    Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3471
    
    $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3523
    
    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3525
    
    phpThumb() v1.7.11-201108081537
    (DELETED LINK)
    
    Error messages disabled in file "phpthumb.class.php" on line 3847
    
    SourceImageToGD() failed in file "phpthumb.class.php" on line 342
    Last edited by gazzari; 08-14-2013 at 01:53 PM. Reason: Trouble posting

  2. #2
    osCMax Development Team

    Error when adding an image to product

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,164
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    99


    Lightbulb Re: Error when adding an image to product

    Quote Originally Posted by gazzari View Post
    Code:
    !$this->config_allow_src_above_docroot therefore setting "/home/dprofili/public_html/images/images_big/trailer-sign-2.jpg" (outside "/usr/local/apache/htdocs") to null in file "phpthumb.class.php" on line 1106
    Now that I've deleted all the extraneous rubbish, I think that this is the clue and appears to be due to your server environment.

    [As an aside: there's those crappy defaults that someone in their wisdom cose to change from what I had set..
    Code:
    $this->thumbnailQuality set to "99" in file "phpthumb.class.php" on line 951
    ]

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  3. #3
    osCMax Development Team

    Error when adding an image to product

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,164
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    99


    Default Re: Error when adding an image to product

    It could simply be a permissions problem eg. with the cache directory (does it exist?).

    Save a copy of catalog/ext/phpthumb/phpthumb.class.php to phpthumb.class.php.orig

    A few things to try one at a time..
    Change line 119 & 120:
    PHP Code:
        var $config_prefer_imagemagick                   true;
        var 
    $config_imagemagick_use_thumbnail            true
    to:
    PHP Code:
        var $config_prefer_imagemagick                   false;
        var 
    $config_imagemagick_use_thumbnail            false
    Play around with these settings - lines 142 & 143:
    PHP Code:
        var $config_allow_src_above_docroot              false;
        var 
    $config_allow_src_above_phpthumb             true
    Last edited by ridexbuilder; 08-14-2013 at 02:51 PM. Reason: more info.

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  4. #4
    osCMax Development Team

    Error when adding an image to product

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,164
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    99


    Default Re: Error when adding an image to product

    From the supplied docs:
    Q: I'm getting "<filename> does not exist" when I know the
    file does exist
    A: Check that these two values are present and properly
    configured in phpThumb.config.php (introduced in v1.6.0):
    $PHPTHUMB_CONFIG['allow_src_above_docroot'] (default=false)
    $PHPTHUMB_CONFIG['allow_src_above_phpthumb'] (default=true)
    If your images are outside DOCUMENT_ROOT (this includes if
    you have an image upload form, most likely the images will
    get uploaded to "/tmp/<file>" or similar) then you will have
    to configure 'allow_src_above_docroot' to true.
    Make sure whatever user the webserver is running as has read
    permission to the file/directory you're reading from
    Note: we don't use the config file, so it is configured in the class file (as per previous post), or passed as a runtime parameter.

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  5. #5
    gazzari
    Guest


    Default Re: Error when adding an image to product

    OK, thanks. I will have a look at all the suggestions.
    And thanks for a quick reply.

  6. #6
    gazzari
    Guest


    Default Re: Error when adding an image to product

    Changing
    Code:
    var $config_allow_src_above_docroot = false;

    to true fixed it. Also fixed the large thumbnail issue when I had multiple images
    Last edited by gazzari; 08-15-2013 at 01:30 AM.

  7. #7
    osCMax Development Team

    Error when adding an image to product

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,164
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    99


    Thumbs up Re: Error when adding an image to product

    Quote Originally Posted by gazzari View Post
    Changing
    Code:
    var $config_allow_src_above_docroot = false;

    to true fixed it. Also fixed the large thumbnail issue when I had multiple images
    Thanks for reporting back.
    Having to switch that option to true does suggest a lack of security with the server environment (likely a PHP setting). Are your images being stored in the Apache default docroot? If so, yikes!

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  8. #8
    Senior Member
    Error when adding an image to product


    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    501
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    JRR     $ 180.00
    Rep Power
    76


    Default Re: Error when adding an image to product

    I have trouble from time to time adding another image to a listing. The cure appears to be to re-add the original image(s) as well as the new one(s). Then it works as expected. It is curious that it can't handle images that are already present...or is that covered in the manual? I did just notice that the original image had .png, and the new images were .jpg. I suspect the image handling program can't handle two different suffixes...well, no, that wasn't the case. The problem appears to be related to the original image having to be overwritten otherwise it won't update.
    Last edited by JRR; 05-21-2014 at 12:11 PM.

  9. #9
    wkdwich
    Guest


    Default Re: Error when adding an image to product

    the ownership was wrong for the original and or your permissions on the folder is wrong.. all images related to ONE product should all be JPG or PNG not a mix

  10. #10
    Senior Member
    Error when adding an image to product


    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    501
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    JRR     $ 180.00
    Rep Power
    76


    Default Re: Error when adding an image to product

    Yeah, I know, I just forget to change the suffix from time to time, however that has appears to have nothing to do with the existing issue - the program seems perfectly happy dealing with at least two (PNG/JPG) formats at the same time.

    As for permissions, the folders are all 755 and all the files are 644. Owner is the same (c'est moi) in all cases and isn't NOBODY or similar. If you like I could post the error messages I get if you think I'm missing something (most likely).

    Thanks!

Page 1 of 2 12 LastLast

Similar Threads

  1. Error adding product with image subdir
    By Alta in forum osCmax v2 Installation issues
    Replies: 3
    Last Post: 11-09-2010, 09:17 AM
  2. Product image upload error
    By JewishLumberjack in forum osCommerce 2.2 Discussion
    Replies: 5
    Last Post: 10-20-2010, 03:02 PM
  3. Adding product image to category link
    By ramonjaime in forum osCommerce 2.2 Modification Help
    Replies: 4
    Last Post: 11-21-2002, 06:34 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •