PHP upload MAX_FILE_SIZE error 2

file uploadPHP

I am trying to use Zend file transfer to upload a file

in php.ini I set:

upload_max_filesize = 20M

post_max_size = 20M

when I try to upload a 1MB file I get error 2 complaining about max_file_size

I tried setting MAX_FILE_SIZE in html as well

<input type="hidden" name="MAX_FILE_SIZE" value="2097152000000" />

but nothing is working

PHP Variables of the Upload request:

_REQUEST["MAX_FILE_SIZE"]  2097152000000

_REQUEST["PHPSESSID"]   b866b7105cb4747497f8744f56a807a0

_POST["MAX_FILE_SIZE"]  2097152000000

_FILES["userfile"]  

Array
(
    [name] => 1mpImage.jpg
    [type] => 
    [tmp_name] => 
    [error] => 2
    [size] => 
)

any idea?

Best Answer

This question comes up now and again and usually the answer is:

In order for the ini changes to become active your apache server would need to be restarted.

If your on windows then run

apache -k restart

alternatively you can just open up services.msc > find apache web server nad right click restart.