I am using CodeIgnitor and oracle db

at model

function add_new_emp_test( $x, $y)
      // Execute the call to the stored procedure
      $stmt = "BEGIN emp_pkg.add_account(:x1,:y1); END;";
       $lob = oci_new_descriptor($conn, OCI_D_LOB);
       $lob = oci_new_descriptor($conn, OCI_D_LOB);
      $stid = oci_parse($conn, $stmt);
      oci_bind_by_name($stid, ':x1', $x, 100);
      oci_bind_by_name($stid, ':y1', $lob, -1, OCI_B_BLOB);


      $r = oci_execute($stid,OCI_DEFAULT);



        function getdata($username){

      // Execute the call to the stored procedure
      $stmt = "BEGIN emp_pkg.get_sp_account(:x, :rc); END;";

      $stid = @oci_parse($conn, $stmt);

      $refcur = oci_new_cursor($conn);

      $r = @oci_bind_by_name($stid, ':RC', $refcur, -1, OCI_B_CURSOR);

      oci_bind_by_name($stid, ':x', $username ,100);

      $r = @oci_execute($stid);

      // Now treat the ref cursor as a statement resource
      $r = @oci_execute($refcur, OCI_DEFAULT);

      $r = @oci_fetch_all($refcur, $employeerecords, null, null,

      return ($employeerecords);


At controller

public function uploadit(){


    //$this->load->helper(array('form', 'url'));

    echo "s";
    if ($this->upload->do_upload('f1')){
    echo "hhhahahah";
    if (is_readable($config['upload_path'].$_FILES['f1']['name'])){
    echo "haaaaa";
    echo $this->upload->data('file_type'); 

//  $this->students_mod->add_new_emp_test("khalil6666",$_FILES['f1']['tmp_name']);




public function show_upload_page(){


at view 

 <img src="<?php echo 'data:' . 'image/png' . ';base64,' . $datame; ?>" id="profile-picture-mini" alt=""/>

why the image doent appear 

Hi, few questions:

  • the data is correctly inserted in the database?
  • if, in view, you do var_dump($datame); what you get?
  • have you tried to remove the error control operators @ in your getdata() method? In this stage it's more important to get debug information rather than hiding.

thanks for your answer .... I forget to view the image as the following

<img src="data:image/jpeg;base64,<?php echo base64_encode($datame); ?>" width="40" height="40" />

this was the error :)