upload - why codeigniter do_upload doesn't work on server? -


i have used codeigniter do_upload upload mp3 files on directory on server. codes work on localhost on production server browser keeps waiting server , processing , nothing happens after long time.

$dirpath in following code path of destination directory on server.

    $data['info']=$this->cp_model->getinfo($service_id);     $dirpath = '/var/li/sounds/'.$data['info'][0]->path;       $config = array('allowed_types' => 'mp3' ,                     'upload_path' => $dirpath,                     'overwrite' => false,                     'max_size' => 0,                     );      $this->load->library('upload',$config);     }      if (isset($_post['submit'])) {          $this->upload->do_upload();} 

most don't have write permissions on folder declared on $dirpath. consider uploading mp3 may 4-5 mb server side, can take minutes depending connection.

to find out problem whatsoever, output error checking do_upload() method.

if ( ! $this->upload->do_upload())     {         $error = array('error' => $this->upload->display_errors());         $this->load->view('upload_form', $error);     } 

more information on file uploading class.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -