0

i have microsoft windows server iis 7 and i have installed apache2 on it the x-sendfile plugin is installed on apache but when i test it by following code

if (in_array('mod_xsendfile', $modules)) {
// If mod_xsendfile is loaded, use X-Sendfile to deliver.. (optional: I have this as failover to use PHP readfile() if mod_xsendfile is unavailable)
header ('X-Sendfile: ' . $pathToFile);
header ('Content-Type: ' . $documentMIME);
header ('Content-Disposition: attachment; filename="' . $actualFilename . '"');
exit;}

nothing happen !!! what's the problem ?

Komeil Tl
  • 24
  • 7
  • 1
    How is `$modules` populated? You can see if the mod_xsendfile is loaded via phpinfo(); - it's listed under "Loaded modules" if it's present. Have you enabled the x-sendfile in the httpd.conf? `LoadModule xsendfile_module modules/mod_xsendfile.so` and ` XSendFile on ` Both need to be present? – junkfoodjunkie Apr 16 '17 at 07:15
  • thanks , problem solved !!! xD – Komeil Tl Apr 16 '17 at 07:17

1 Answers1

1

This has already been somewhat answered here by the author of mod_xsendfile himself: mod_xsendfile for Win x64?

I'm assuming you are on Windows 64 bit with Windows 7. He stated there was no build for that although others in that thread got it working. I would read through their comments/replies. Install and make sure the httpd file is modified to load it correctly. Good luck.

Community
  • 1
  • 1
Edward B.
  • 437
  • 3
  • 10