title: image file success upload in localhost, but it can't in server using CI
body: <p>When i try upload image files in localhost it stored on DB and i can read that uploaded images, but when i upload the code to the server via FTP it said error like this: <br></p>
  
  <blockquote>
    <ul>
    <li>This page isn’t working</li>
    <li>blablabal.com is currently unable to handle this request.</li>
    <li>HTTP ERROR 500</li>
    </ul>
  </blockquote>
  
  <p><br><br>
  Is that because my php version in localhost is different with the PHP version on the server?
  <br><br>
  Can someone help me? Thanks mate</p>
  
  <p>My controller<br></p>
  
  <pre><code>&lt;?php
  defined('BASEPATH') OR exit('No direct script access allowed');
  
  class News extends CI_Controller {
  function __construct() {
      parent::__construct();
      $this-&gt;load-&gt;model('news_model');
          $this-&gt;load-&gt;helper(array('form', 'url'));
      $this-&gt;load-&gt;library('session');
  }
  
      public function index()
  {
  $data['datax'] = $this-&gt;news_model-&gt;tampil_data()-&gt;result();
  $data['viewx']="news/content";
  $this-&gt;load-&gt;view('template/header');
  $this-&gt;load-&gt;view('template/main',$data);
    //$this-&gt;load-&gt;view('news/content');
    $this-&gt;load-&gt;view('template/footer');
  }
  
      function tambah(){
  $data['title'] = "Tambah news";
  $data['updateid'] = '';
  $data['update'] = '';
  $data['viewx']="news/form";
  $this-&gt;load-&gt;view('template/header');
  $this-&gt;load-&gt;view('template/main',$data);
    //$this-&gt;load-&gt;view('news/content');
    $this-&gt;load-&gt;view('template/footer');
  
      }
  
      function tambah_aksi(){
          //upload
            // $this-&gt;load-&gt;library('upload');
            $this-&gt;load-&gt;library('upload');
          $nmfile = "file_".time(); //nama file saya beri nama langsung dan diikuti fungsi time
          $config['upload_path'] = './../assets/'; //path folder
          $config['allowed_types'] = 'gif|jpg|png|jpeg|bmp'; //type yang dapat diakses bisa anda sesuaikan
          $config['max_size'] = '2048'; //maksimum besar file 2M
          $config['max_width']  = '1288'; //lebar maksimum 1288 px
          $config['max_height']  = '768'; //tinggi maksimu 768 px
          $config['file_name'] = $nmfile; //nama yang terupload nantinya
          $this-&gt;upload-&gt;initialize($config);
  
          if($_FILES['images']['name'])
          {
              if ($this-&gt;upload-&gt;do_upload('images'))
              {
                  $gbr = $this-&gt;upload-&gt;data();
                 // $data = array(
                 //   'nm_gbr' =&gt;$gbr['file_name'],
                 //   'tipe_gbr' =&gt;$gbr['file_type'],
                  //  'ket_gbr' =&gt;$this-&gt;input-&gt;post('textket')
                  //);
  
                   //akses model untuk menyimpan ke database
                          $data = array();
                          //insert
                          $judul = $this-&gt;input-&gt;post('judul');
                          $news = $this-&gt;input-&gt;post('news');
                          $imagess = $this-&gt;input-&gt;post('images');
                          $data = array(
                          'title' =&gt; $judul,
                              'detail' =&gt; $news,
                              'images' =&gt; $gbr['file_name']
                           );
                          $this-&gt;news_model-&gt;input_data($data,"news");
                  //pesan yang muncul jika berhasil diupload pada session flashdata
                  $this-&gt;session-&gt;set_flashdata("pesan", "&lt;div class=\"col-md-12\"&gt;&lt;div class=\"alert alert-success\" id=\"alert\"&gt;Upload gambar berhasil !!&lt;/div&gt;&lt;/div&gt;");
                  redirect('news/'); //jika berhasil maka akan ditampilkan view vupload
              }else{
                  //pesan yang muncul jika terdapat error dimasukkan pada session flashdata
                  $this-&gt;session-&gt;set_flashdata("pesan", "&lt;div class=\"col-md-12\"&gt;&lt;div class=\"alert alert-danger\" id=\"alert\"&gt;Gagal upload gambar !!&lt;/div&gt;&lt;/div&gt;");
                  redirect('news/tambah'); //jika gagal maka akan ditampilkan form upload
              }
          }
      }
  </code></pre>
  
  <p><br><br></p>
  
  <blockquote>
    <p>i try change my php version and this is what i got</p>
    
    <p>An uncaught Exception was encountered</p>
    
    <p>Type: Error</p>
    
    <p>Message: Call to undefined function finfo_open()</p>
  </blockquote>