Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8488687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:36:51+00:00 2026-06-10T21:36:51+00:00

I am using mod_xsendfile on Dreamhost to download large zip files (50mb+) I have

  • 0

I am using mod_xsendfile on Dreamhost to download large zip files (50mb+)

I have mod_xsendfile enabled, and “XSendFile on” in my .htaccess.

When I give the

header('X-Sendfile: "'.$fullPath.'"');

command, using the full path to a file that does exist on the server, I am getting a webpage not found error.

readfile() finds the file just fine and serves it, but the .zip files have gotten too large for php to handle.

Any help you could provide would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:36:52+00:00Added an answer on June 10, 2026 at 9:36 pm

    I had the same problem and was able to solve it, so possibly this solution will work for you.

    First thing to do is to check your Apache error logs (for me, located in /etc/httpd/logs). This is what I found in mine:

    [Wed Sep 05 14:29:02 2012] [error] [client ?.?.?.?] (20023)The given path was above the root path: xsendfile: unable to find file: /path/to/file
    

    The problem was, the file I was looking to serve was located above the DocumentRoot (for me, /var/www/html) as defined in httpd.conf.

    My solution was to create a symlink in the DocumentRoot directory that pointed to the directory which contained the file I want to serve. I used the following command:

    ln -s /path/to/file_dir /path/to/doc_root/file_dir
    

    Then all I had to do was have PHP point xSendFile to the symlink:

    header("X-SendFile: /path/to/doc_root/file_dir/file_name.ext");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using apache2 webserver and I have installed mod_xsendfile I have something like: header('Content-type:
I have an .htaccess file that authenticates users against LDAP using mod_auth_ldap . My
I have a django application using mod_python, fairly typical configuration except that media files
Ive got a php download script using mod_xsendfile which works perfectly to download certian
I'm using mod_xsendfile (v0.12) to serve static files where Django is controlling access to
I'm using mod_rewrite in a ManagedFusion settings file (similar to .htaccess) and I want
I've been using mod_rewrite in my htaccess file to rewrite my urls and I've
I have been using mod_rewrite for a while and love it. However, I am
I'm using mod_rewrite in my .htaccess to change a double directory structure into a
I am trying to cleanup my URL using mod_rewrite. In my URLs I have:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.