Note that there are some explanatory texts on larger screens.

plurals
  1. POCodeIgniter upload file error: you did not select a file to upload
    primarykey
    data
    text
    <p>This question has been asked before, but not with this exact issue. I have an upload system that works great (I'm uploading CSV and parsing them). However, if a file size is over 5Mb it gives me the error: you did not select a file to upload </p> <p>If it is under, the file uploads and parses just fine.</p> <p>I've set my php.ini setting first to 128M and just now to 99999999999999999999 I've also set my CI config maz_size to 9999999999 (I was using more realistic numbers, but I wanted to be sure) I've restarted apache with each ini change but still ths problem remains.</p> <p>I've seen that the error: you did not select a file to upload is shown when there's a file size issue but I don't know where else to check this.</p> <p>Finally, if I echo phpinfo(), I can confirm that max upload is 999999999999999</p> <p>Pulling my hair out...</p> <p>What else could it be?</p> <p>/// update: code addition I've got two methods of parsing the csv, either line by line or dumping the whole file direct into the DB and sort it out later. both of these work, and are selected by a config setting. that's what the line: $this->config->item('import_type') is for. Any ideas are welcome!</p> <pre><code> public function upload() { $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'txt|csv|xls|xlsx'; $config['max_size'] = '999999999999999999999'; $this-&gt;load-&gt;library('upload', $config); if ( ! $this-&gt;upload-&gt;do_upload()) { $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors()); $this-&gt;load-&gt;view('feed_form', $error); } else { $data = array('upload_data' =&gt; $this-&gt;upload-&gt;data()); if ($this-&gt;config-&gt;item('import_type') == 'db') { $result = $this-&gt;model_feed-&gt;capture_file($this-&gt;input-&gt;post('feed_name'), $data['upload_data']['full_path']); } else { $result = $this-&gt;capture_feeds($this-&gt;input-&gt;post('feed_name'), $data['upload_data']['full_path']); } if ($result) { $this-&gt;load-&gt;view('feed_upload_success', $data); } else { $this-&gt;load-&gt;view('feed_form', array('error' =&gt; 'The file you supplied does not match the data structure we were expecting.' )); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload