I have a codeigniter application which basically accepts xls
files, parse it and process on the data from the excel file.
Here is the code that I used for uploading the file.
When the form is submitted, the code below is executed. When I submit a file with small size, it is uploaded properly and is also processed. However, if I upload a file with a larger size, it gets uploaded, but isnt processed. I even get redirected to the upload form with the error "You did not select a file to upload."
Is this something which is caused by max_execution_time
?
PS: I have these three lines at the top of the controller
set_time_limit(0);
ini_set('memory_limit', '20000M');
ini_set('max_execution_time', 3000);
UPDATE : The file size I am trying to update is of 1.59 MB
Upload
public function do_upload() {
$config['upload_path'] = './excel_files/';
$config['allowed_types'] = 'xls|xlsx';
$config['max_size'] = 100000;
$this->load->library('upload', $config);
// upload failed, handle properly
if ( ! $this->upload->do_upload('userfile')) {
$error = array('error' => $this->upload->display_errors());
$data = array('subview'=>'admin/upload_form','error'=>$error);
$this->load->view('layout', $data);
}
// upload success, record the file data
else {
$uploadData = $this->upload->data();
$fileData = array(
'name' => $uploadData['orig_name'],
'size' => $uploadData['file_size'],
'stored_name' => $uploadData['file_name'],
);
$this->file_m->insert($fileData);
$this->process($uploadData); // process the uploaded file
}
}