Search code examples
phptmp

echo $_FILES['data-file']['tmp_name']; die; file name is not printed if size more then 128M in PHP


I try to upload file of 300 MB. but not uploaded and now display any error. variables value in php.ini file is

post_max_size 800M
upload_max_filesize 750M
memory_limit 2048M
max_execution_time  17100
max_input_time 17100

if i try to print tmp name of file by echo $_FILES['data-file']['tmp_name']; die; Nothing display page redirecto to home. but for less then 128M it show /tmp/phpShle like that.


Solution

  • My proble is solved. I need to set these variable on modsec2.user.conf file

    SecRequestBodyLimit 1073741824
    SecRequestBodyNoFilesLimit 1073741824
    

    This is a apache server file. and error was shown on Apache error log.