Jump to content

Recommended Posts

I sell shopping cart software that allows digital downloads of files. It always works, for everyone. Until now.

 

This guy has a 56MB file for customers to download. It fails on his server. But on my server, that same file is downloaded without issue. I think maybe there's some file size limit on his server or something. Any thoughts?

 

This is the code that "downloads" the file to a customer's browser:

 

// Set headers and stream the file to the client browser. the attachment
// filename is only the filename, but readfile must be the full path.
header( "Content-Description: File Transfer" );
header( "Content-Type: application/force-download");
header( "Content-Length: " . filesize( $filename ) );
header( "Content-Disposition: attachment; filename=" . $dp->filename );
readfile( $filename );

Link to comment
https://forums.phpfreaks.com/topic/239907-streaming-file-problem/
Share on other sites

The chat session guy from this webhost is pretty much useless. Someone suggested that I cannot stream files from folders that don't have a URL. That's not right because there are no other sites that require this.

 

Again, is there a possible server setting for something like this?

 

Thanks again....

I have more information about this:

  • Large files can be streamed from public (URL-able) directories
  • Large files cannot be streamed from private directories
  • Other files can be streamed from either/or

 

So is there a combination of settings here?

 

Note that the server is using CGI.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.