Basically, I would like to send a header X-Sendfile to the browser to send a file, but I don't want to call this if the X-Sendfile is not available or installed on the server. How can I check for this in PHP?? Or if this is impossible to check in PHP, than how to check that it is installed PERIOD? I would rather check for the existence of X-Sendfile in PHP, as it would be easier for me to do so, since this is part of a package that will run on other sites and servers as well... Perhaps if I just use it with the PHP header
function, it will return something if not installed??
Thanks guys :)
[ $(apachectl -M | grep xsendfile_module | wc -l) -eq 1 ] && echo 'installed' || echo 'not-installed'
. If it's installed "installed" will be printed, and otherwise "not-installed" will be printed. – Lavernalaverne