Results 1 to 3 of 3

Thread: PHP errors when images are missing

  1. #1
    Join Date
    Mar 2009
    Posts
    11

    Default PHP errors when images are missing

    Hi

    We just had a server crash and lots of images has gone missing. The backup was corrupt and the company hosting our web does not have backup...

    so when looking at the website now it is throwing a lot of error message because thumbnails and normal size pics are missing at random.

    Is there anything we can do to unlink missing pictures ?

    Until now I have manually gone in and edited some listings and deleted the missing pictures from the listing... but we have 2500 listings... and pictures are missing from every listing it seems..

    These are the errors being throwed on the site:

    Code:
    Warning: getimagesize(/home/bkkcon5/public_html/realty/images/listing_photos/2178_picture072.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/bkkcon5/public_html/realty/include/class/template/core.inc.php on line 818
    
    Warning: Division by zero in /home/bkkcon5/public_html/realty/include/class/template/core.inc.php on line 832
    
    Warning: getimagesize(/home/bkkcon5/public_html/realty/images/listing_photos/2177_picture028.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/bkkcon5/public_html/realty/include/class/template/core.inc.php on line 818
    
    Warning: Division by zero in /home/bkkcon5/public_html/realty/include/class/template/core.inc.php on line 832
    
    Warning: getimagesize(/home/bkkcon5/public_html/realty/images/listing_photos/2176_sofa.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/bkkcon5/public_html/realty/include/class/template/core.inc.php on line 818
    
    Warning: Division by zero in /home/bkkcon5/public_html/realty/include/class/template/core.inc.php on line 832
    
    Warning: getimagesize(/home/bkkcon5/public_html/realty/images/listing_photos/2176_sideboard.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/bkkcon5/public_html/realty/include/class/template/core.inc.php on line 818
    
    Warning: Division by zero in /home/bkkcon5/public_html/realty/include/class/template/core.inc.php on line 832
    
    Warning: getimagesize(/home/bkkcon5/public_html/realty/images/listing_photos/2176_kitchen.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/bkkcon5/public_html/realty/include/class/template/core.inc.php on line 818
    Thanks

  2. #2
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    48
    Posts
    9,796

    Default Re: PHP errors when images are missing

    If every image is missing you can just clear the listings_images db table. If it's not every image, then you need to go through each listing and delete the ones that are missing.

    You could also write a script that would go through each entry in the db table and check if the files exist. If the don't have it remove the entry from the db.

  3. #3
    Join Date
    Mar 2009
    Posts
    11

    Default Re: PHP errors when images are missing

    Thanks

    Actually what we did was to look for files that didn't exist and replaced it with "no picture" and then rearranged the pictures so that existing pictures came first in order..

Similar Threads

  1. All images missing after repairing corrupt table
    By Damon in forum General Help (CLOSED)
    Replies: 6
    Last Post: 04-18-2008, 09:02 PM
  2. Missing Listing Images
    By song in forum General Help (CLOSED)
    Replies: 2
    Last Post: 02-01-2008, 02:45 PM
  3. Missing images from image editor page
    By jntcomputers in forum General Help (CLOSED)
    Replies: 8
    Last Post: 06-07-2007, 01:16 PM
  4. Errors uploading images
    By Murray in forum General Help (CLOSED)
    Replies: 2
    Last Post: 08-23-2006, 10:08 AM
  5. a few errors after upgrade to 2.05 and something missing?
    By mantaray in forum Installation/Configuration Help (CLOSED)
    Replies: 3
    Last Post: 03-15-2006, 02:52 PM

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
  •