CMultiFileUpload doesn't walk the talk

I tried to setup a multi-file upload just like in the example, within my view file. However, the file never gets submitted towards $_FILE, as the array is completely empty. Has anyone run into this problem?

I added this widget within an already active CActiveForm (in the _form.php file), is that the problem?

<div class="form">

    <?php // for use of CMultiFileUpload

        echo CHtml::form('', 'post', array('enctype' => 'multipart/form-data'));

        $this->widget('CMultiFileUpload', array(

            'name' => 'files',

            'model' => $model->pictures,


            'max' => '5',


            'denied' => 'Whoops! We weren\'t able to upload your file!',

            'duplicate' => 'Whoops! This was a duplicate file',




Yet, when I run vardump($_FILES)…nothing.

This is really frustrating, to be stuck on something for more than a day, when there are more important things to work on

Try to use CUploadedFile class of YII

Give a glance to the the documentation of php: there are lot of variables that can block you:

upload_max_filesize , post_max_size and so on.

Those can all be edited in .htaccess, so try something like that:

php_value upload_max_filesize 20M

php_value post_max_size 21M

in .htaccess

Okay, thank you all for your help. I have solved this vexing configuration, using the bits and pieces I’ve found in the form, from others, and through the source code, in order to figure it out. The article for uploading multiple images to your application is here:

Handling multiple image uploads

Thanks everyone