I am using this code to download with php, small files works, now as big as 1Gb end up coming corrupted.
$arquivo = $_GET['nome']; //nome do Arquivo
$local = $_GET['dir']; //pasta onde está o arquivo
header('Cache-control: private');
header('Content-Type: application/octet-stream');
header('Content-Length: '.filesize($local.$arquivo));
header('Content-Disposition: filename='.$arquivo);
header("Content-Disposition: attachment; filename=".basename($local.$arquivo));
//envia o download
readfile($local.$arquivo);
<a href="download?nome=arquivo.ext&dir=pasta/">Download</a>