Welcome Guest, Not a member yet? Register   Sign In
"Your server does not support the GD function required to process this type of image"
#1

[eluser]inktri[/eluser]
I'm trying to create a thumbnail for every image uploaded. Unfortunately I keep on getting the error: "Your server does not support the GD function required to process this type of image", having tried both "$config['image_library'] = 'GD';" and "$config['image_library'] = 'GD2';".


Quote:gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled


Code:
function do_upload()
    {
        $config['upload_path'] = './photos/';
        $config['allowed_types'] = 'gif|jpg|png';
        $config['max_size']    = '10240';
        
        $this->load->library('upload', $config);
    
        if ( ! $this->upload->do_upload()) {
            $error = array('error' => $this->upload->display_errors());
            
            $this->load->view('upload_form', $error);
        } else {
            $data = array('upload_data' => $this->upload->data());
            
            $d = $this->upload->data();
            
            $new_file_name = 'cow' . strtolower($d['file_ext']);
            rename($d['file_path'].$d['file_name'], $d['file_path'] . $new_file_name);
            
            $this->load->library('image_lib');
            $config['image_library'] = 'GD';
            $config['source_image'] = $d['file_path'] . $new_file_name;
            $config['create_thumb'] = TRUE;
            $config['maintain_ratio'] = TRUE;
            $config['width'] = 75;
            $config['height'] = 50;
            $this->load->library('image_lib', $config);
            $this->image_lib->resize();
            
            echo $this->image_lib->display_errors();
            
            $this->load->view('upload_success', $data);
        }
    }


Anybody know what's wrong? Thanks for the help


Messages In This Thread
"Your server does not support the GD function required to process this type of image" - by El Forum - 04-25-2008, 11:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB