I have a server with Centos 8.3.21 , PHP 7.4.15 , mySQL 8.0.21 and I have installed on wordpress 5.6.2 the plugin Contact Form 7 vers 5.4 and I have in my /etc/php.ini (only one in the whole server)
post_max_size = 64M
upload_max_filesize = 64M
upload_max_size = 64M
max_file_uploads = 1
memory_limit = 256M
max_execution_time = 300
and into CF7 template I put
[file* file-331 limit:15000kb]
but if I try to upload just an 1.2Mb PDF file it keeps saying "file too large". I tried also to change with limit:15M or limit:15000000 but no results. In WordPress Media Library I can upload without problems also a 2Mb video since it shows close to the button "64Mb max"… Plus, doing an phpinfo(); I see values correctly settled as I said before…
Maybe is there something else I should look at?
Thank you all in advance!
Cheers!
2
Answers
Solved! It was a firewall's rule that blocked the file while passing from outside to the server. Thank you all!
You can put this (any value, any function name) into your
functions.php
file: