title: 2174 error on upload image base64 in php
body: <p>hi use the following code as below</p>
  
  <pre><code>if($data['photo']!='')
  {
      define("UPLOAD_DIR", "admin/alumni_image/");
      $photo = $data['photo'];// THIS IS YOUR BASE64 ENCODED STRING
      $photo = str_replace('data:image/png;base64,', '', $photo);
      $photo = str_replace(' ', '+', $photo);
      $data = base64_decode($photo);
      $time =microtime(true);
      $micro_time=sprintf("%06d",($time - floor($time)) * 1000000);
      $date=new DateTime( date('Y-m-d H:i:s.'.$micro_time,$time) );
      $currentDatetime=$date-&gt;format("Y-m-d H:i:s.u"); 
      $file = UPLOAD_DIR . md5($currentDatetime) . '.png';
      $array=explode("/",$file);
      $photoName=$array[2];
      $success = file_put_contents($file, $data);
  
      echo $success;
      $query_photo = "update alumni set photo = '".$photoName."' where alumni_id = '".$insert_id."'";
      $query_run=  mysql_query($query_photo);
  }
  </code></pre>
  
  <p>but I got error 2174. I increase the  size of php configuration file like</p>
  
  <pre><code>ini_set('post_max_size', '64M');
  ini_set('upload_max_filesize', '64M');  
  </code></pre>