CodeIgniter Forums
File upload - file size problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: File upload - file size problem (/showthread.php?tid=50038)



File upload - file size problem - El Forum - 03-12-2012

[eluser]Maxat[/eluser]
Hi,

I need a help with file upload size. Currently I can upload small size files, but when it comes to 5mb or more it doesn't upload anything. Can you please advise what can be done to fix this, cause i have already tried to change php.ini. Didnt help. Below my configurations.

Controller:
Code:
$config['upload_path'] = './reports/';
  $config['allowed_types'] = 'gif|jpg|png|pdf|doc|docx|bmp';
  $config['max_size'] = '0';
  $this->load->library('upload', $config);
  $this->upload->do_upload();

PHP.ini

Code:
; Maximum file size of post data that PHP will accept.
post_max_size = 200M

; Maximum allowed file size for uploaded files.
upload_max_filesize = 200M



File upload - file size problem - El Forum - 03-12-2012

[eluser]Aken[/eluser]
Did you restart your server after making changes to your php.ini file? Most servers require some sort of reinitialization after making those changes, and it can often be overlooked.


File upload - file size problem - El Forum - 03-12-2012

[eluser]Maxat[/eluser]
yes, i restarted every time


File upload - file size problem - El Forum - 03-12-2012

[eluser]Maxat[/eluser]
Already fixed. Had a problem in php.ini file.