I'm encountering errors when trying to getimagesize() of a URL to an image. I'm using the thumbnail script from: http://forums.digitalpoint.com/showpost.php?p=329156&postcount=2 The error: image.php function loadImage($path) /* This function loads the image you want to resize. The function will return TRUE on a succes and FALSE on failure */ { if ( $this->image ) { imagedestroy($this->image); } $img_sz = getimagesize($path); //THIS IS LINE 54 FROM THE ERROR switch( $img_sz[2] ){ case 1: $this->image_type = "GIF"; if ( !($this->image = imageCreateFromGif($path)) ) { return FALSE; } else { return TRUE; } break; case 2: $this->image_type = "JPG"; if ( !($this->image = imageCreateFromJpeg($path)) ) { return FALSE; } else { return TRUE; } break; case 3: $this->image_type = "PNG"; if ( !($this->image = imageCreateFromPng($path)) ) { return FALSE; } else { return TRUE; } break; case 4: $this->image_type = "SWF"; if ( !($this->image = imageCreateFromSwf($path)) ) { return FALSE; } else { return TRUE; } break; default: return FALSE; } } PHP:
On a somewhat related note, I've got an issue when it comes to uploading a large image onto the server. Everything seems to work just fine until I try to upload an image larger than about 100KB. I know it's not the MAX_FILE_SIZE, as I've increased that much higher, but every time I try to upload a large image, I get an Internal Server Error 500. You would think it would be a web host problem, but would they really limit form uploads to 100KB? The code works just fine up until an image that size or larger is attempted to be uploaded. Someone else had the same problem as well: http://drupal.org/node/25176