Hi! I have recently made a "clean" installation of 3.1.2 and started to convert over work from an older version (I cannot find the version as I have took over a project). Everything has been running smooth the past few weeks but I cannot seem to use
do_upload which is resulting in a 'IIS HTTP 500.0 Error' with FastCgiModule being the Module.
The coding is the exact same, so I'm unsure if the problem could be within another file. However, I have put the code below just to make sure there is nothing wrong with it:
PHP Code:
public function bulk_product_upload_file()
{
$location_of_bulk_product_files = LOCATION TO FOLDER;
if ($this->is_post()):
if (is_uploaded_file($_FILES['userfile']['tmp_name'])):
$date_for_file = date("dmyHis");
$config['upload_path'] = $location_of_bulk_product_files; //upload directory
$config['allowed_types'] = 'xlsx'; // allowed file types
$config['max_size'] = '100';
$config['overwrite'] = TRUE;
$config['remove_space'] = TRUE;
$config['file_name'] = $date_for_file;
$this->load->library('upload', $config);
if($this->upload->do_upload()):
// also tried if($this->upload->do_upload('userfile')): that doesn't work
//file upload success
else:
//file upload failed
endif;
else:
$this->session->set_flashdata('message_error','Please select a file to upload.');
redirect('main/create_bulk_product');
endif;
else:
$this->session->set_flashdata('message_error','Sorry! Something went wrong, please try again.');
redirect('main/create_bulk_product');
endif;
}
Does anybody have any suggestions to what could be the problem?