1
I have a PHP file download system with login and session expiration in 30 minutes, at first I imagined that it was some logic error, but the system user is only dropped unexpectedly when he downloads several files in a short time. If the user downloads in a cadenced way, one file after another the same problem does not occur. Performing tests I realized that the same only occurs when files of larger sizes (above 40MB).
download php.
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename="'.$novoNome.'"');
header('Content-Type: application/octet-stream');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($arquivoLocal));
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Expires: 0');
header('Connection: close');
readfile($arquivoLocal);
exit;
?>
<script type="text/javascript">
window.close();
</script>
I have already made some changes below:
Upload_max_filesize - 1500 M
Max_input_time - 1000
Memory_limit - 640M
Max_execution_time - 1800
Post_max_size - 2000 M
source: https://stackoverflow.com/questions/6527811/how-to-download-large-files-through-php-script
Has anyone been through this problem? Do you know any configuration to solve this problem or any solution to this problem?
OBS: I have access to the server and can make changes to apache and php.ini