i’ve created a video upload form and it seems that i get a limit error. Is this not hte way to create the form element?
$file = new Zend_Form_Element_File('file');
$file->setLabel('File')
->setRequired(true)
->setDestination('/var/www/tmp')
->addValidator('Size',
false,
array('min' => '10kB', 'max' => '100MB'));
$file->addValidator('Extension', false, 'avi,mov,wmv,mpeg,mp4,flv,mpg');
the error i get when uploading a 3MB file is: File 'file' exceeds the defined ini size.
any ideas how to solve this issue?
This is down to a setting in php.ini
upload_max_filesizenot your validatorYou also want to make sure
post_max_sizeis appropriateAlso note
upload_max_filesizeandpost_max_sizeare of type PHP_INI_PERDIR, which means “Entry can be set in php.ini, .htaccess or httpd.conf”. So you can’t set it in your script..htaccesswill only work if allow by webserver