need help - fatal error

Discussion in 'PHP' started by pasfile, May 31, 2007.

  1. #1
    Ive just moved my site to a new server and when i try to manually upload a thumbnail to my video site i get this error message:

    anyone help me out?
    cheers

    function createThumb($name, $maxW, $maxH, $image_path, $thumb_path, $outname){	
    		global $db;
    		$ext = substr($name,strrpos($name,".") + 1);
    		switch(strtolower($ext)){
    			case "jpg":
    			case "jpeg":
    				$img = imagecreatefromjpeg($image_path . $name);
    				$size = ResizeMath($maxW, $maxH, $img);
    				//if(getSetting("thumb_keepprop",$db) == "0"){
    					$size[0] = $maxW;
    					$size[1] = $maxH;			
    				//}
    Code (markup):

     
    pasfile, May 31, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Seems like GD isn't installed or loaded. Try adding this at the top of your page:
    
    dl('gd.so');
    
    // Or this if you're on a windows server:
    dl('php_gd.dll');
    
    PHP:
    EDIT:

    It might as well be php_gd2.dll. (With a 2)
     
    nico_swd, May 31, 2007 IP
    pasfile likes this.
  3. mrmonster

    mrmonster Active Member

    Messages:
    374
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #3
    GD library is not installed on your new server, its the library that allows you to work with graphics.

    The admin of the server will have to recompile PHP with GD enabled.
     
    mrmonster, May 31, 2007 IP
  4. pasfile

    pasfile Active Member

    Messages:
    603
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    60
    #4
    ok guys, thanks for the help
     
    pasfile, May 31, 2007 IP