0
votes

I have problem for upload video file with codeigniter 3. We use Linux Server Ubuntu 15.04. This is script controller for upload:

$config['upload_path']      = './uploads/videos/';
$config['allowed_types']    = 'mp4';
$config['max_size']         = 0;
$config['overwrite']        = FALSE;
$config['remove_spaces']    = TRUE;

and configuration php.ini:

post_max_size = 20000M
upload_max_filesize = 20000M

but we still error message:

The uploaded file exceeds the maximum allowed size in your PHP configuration file

1
You don't want to tell us the size of the file you upload?Daniel Alder
hii @DanielAlder size file upload is 500MB, this problem is solved. after we a config file php.ini in directory /etc/php5/apache2/php.inikura
then why did you accept the answer below?Daniel Alder
@DanielAlder we greatly appreciate an given answerkura
But the accepted answer was modifying mimes.php which obviously didn't solve the problem. The correct way would be publishing an own answer about php.ini and what you really changed in it and then accepting that answerDaniel Alder

1 Answers

0
votes

Try this one
Inside the config/mimes.php add the missing file type you are going to uplaod, something like bellow.

    'mpeg'  =>  array('video/mpeg', 'video/quicktime'),
    'mpg'   =>  array('video/mpeg', 'video/quicktime'),
    'mp4'   =>  array('video/mp4', 'video/quicktime'),
    'mpe'   =>  array('video/mpeg', 'video/quicktime'),
    'qt'    =>  'video/quicktime',
    'mov'   =>  array('video/quicktime', 'video/mp4'),
    'avi'   =>  array('video/avi', 'video/x-msvideo'),