Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2008
    Location
    Toronto, Ontario, Canada
    Posts
    29
    Plugin Contributions
    0

    Default image_manipulator.php - Problem

    I have a strange kind of problem with error debugging utility. When i enabled the Debug Error Logging Utility for debugging, some files in /cache folder as as expected (small size), but others have a very large size (around 1.5GB each). This has probably something to do with the image manipulation class that we are using. But not sure why some uploads are okay, and others generate this BIG file. Image files upload so far are of a max 6MB.

    Any help would be appreciated.

    Regards
    Farhan Sabir
    (Attached Image)

    Top few lines from "head myDEBUG-1279693042.log":
    [21-Jul-2010 02:17:22] PHP Warning: Division by zero in /var/www/vhosts/<sitename>.com/httpdocs/includes/classes/image_manipulator.php on line 73
    [21-Jul-2010 02:17:22] PHP Warning: fopen(images/uploads/framedImage481559.jpg) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 127
    [21-Jul-2010 02:17:22] PHP Warning: feof(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 130
    [21-Jul-2010 02:17:22] PHP Warning: fread(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 131
    [21-Jul-2010 02:17:22] PHP Warning: feof(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 130
    [21-Jul-2010 02:17:22] PHP Warning: fread(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 131
    [21-Jul-2010 02:17:22] PHP Warning: feof(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 130
    [21-Jul-2010 02:17:22] PHP Warning: fread(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 131
    [21-Jul-2010 02:17:22] PHP Warning: feof(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 130
    [21-Jul-2010 02:17:22] PHP Warning: fread(): supplied argument is not a valid stream resource in /var/www/vhosts/<sitename>.com/httpdocs/image_updater.php on line 131


    The image updater lines 127-134 are:
    PHP Code:
    $hndl fopen($outputImage"r"); 
    $isize=sizeof($outputImage); 
    $imgdata="";
      while(!
    feof($hndl)){
        
    $imgdata.=fread($hndl,$isize);
      }; 
    header("Content-type: $contenttype"); 
    echo 
    $imgdata
    image_manipulator.php on line 69-77:
    PHP Code:
            function pictureResizer($inputImage$inputImageHeightInInch$inputImageWidthInInch$outputImage$pxWidth$pxHeight)
            {
                if (
    $pxHeight==0) {
                    
    $dim=$this->getXYDimensions($inputImage);
                    
    $pxHeight=$dim[0]*$pxWidth/$dim[1];
                }
                
    shell_exec("/usr/local/bin/convert ".$inputImage." -resize ".$pxWidth."x".$pxHeight."! ".$outputImage." ");
        
            } 
    Attached Images Attached Images  

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: image_manipulator.php - Problem

    The problem is with your image_manipulator addon, and nothing at all with the debug-logging utility.
    The debug-logging utility is merely logging the errors that are happening in your PHP scripts.
    When you fix your image_manipulator problem, the debug logs will stop generating reports about the errors related to those problems.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v155 problem with admin/users.php and admin/profiles.php??
    By carlwhat in forum Upgrading to 1.5.x
    Replies: 5
    Last Post: 29 Mar 2016, 08:52 PM
  2. Replies: 4
    Last Post: 17 Jul 2015, 04:44 AM
  3. v150 Character Set Problem – PHP warning in general.php
    By jaygee in forum Upgrading to 1.5.x
    Replies: 3
    Last Post: 26 May 2012, 02:21 PM
  4. Having problem with order.php and checkout_process.php with OLD Zen Cart v1.2.3
    By wolfbane01 in forum Managing Customers and Orders
    Replies: 0
    Last Post: 28 Jul 2010, 01:56 AM
  5. php 5 problem
    By Chrome Orange in forum General Questions
    Replies: 7
    Last Post: 19 Feb 2007, 07:47 PM

Posting Permissions

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