Dublicate error happened in chrome, opera, safari and only works on firefox. Here's the header:
| Header
    | Forcing a download using readfile()
    |----------------
    */
    header('Content-Description: File Transfer');
    header('Content-Type: ' . $file_mime_type);
    header('Content-Disposition: attachment; filename=' . $file);
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    header('Content-Length: ' . $file_size);
    ob_clean();
    flush();
    readfile($file_path);
    exit;
I've tried to put double quotes and works but adds to file name - for e.g. -'filename.pdf'
header("Content-Disposition: attachment; filename= . '$file'");
 
    