Help - Search - Members - Calendar
Full Version: getimage error
Hostony Board > General Support > PHP/MySQL
mysteryminds
getimagesize() cannot open error

Anyone come across this kinda errors.

It was working fine this morning and all of sudden stopped working. I dont have any idea why its not working now.

In my local machine its working 100% perfect. Not here why?
Lehrer
Dear customer, please study this link:

Possible solution

It might be useful for you.
mysteryminds
CODE
   function setFile($filename)
   {
       if (!$imagesize = getimagesize($filename)) {
           $this->_errors[] = 'Cannot open "'.$filename.'" for reading.'; (I think the error is coming from this line)
           return false;
       }
       
       // Create Image from file by type, get and set size
       list($width,$height,$type) = $imagesize;
       switch ($type) {
           case 1:
           case 2:
           case 3:
               $imagefunction = "imagecreatefrom".$this->_imageTypes[$type];
               
               if (!function_exists($imagefunction) || !$this->_image = $imagefunction($filename)) {
                   $this->_errors[] = 'Unable to create images from '.$this->_imageTypes[$type].';
                   return false;
               }
               
               $this->_imageHeight = $height;
               $this->_imageWidth  = $width;
               
               break;
           default:
               $this->_errors[] = 'Cannot determine image type of "'.$filename.'".';
               return false;
       }
       
       return true;
   }
   


Thats the function which is calling by my script.
Thanks admin the link you have provided is of no use as I'm not using the function call that way
I get error and damn thing was working just 40 hrs ago for months and all of sudden stopped working.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here