I want know more about download a file when the directory is protected by a http digest authentication.
In fact when I use a PHP script that changes headers to directly download this file, I can download this file without needing to authenticate with HTTP authentication. Why is this? I’m running Apache 2.2 with PHP 5.3 on Debian.
The thing is that the http authentication is set by apache, but the php script can access ANY file on your server, since it’s a local read, not remote.
If you don’t want your script to access the file if not authenticated you should implement the authentication also on the script, not only the files.