LLLLLLL Posted June 20, 2011 Share Posted June 20, 2011 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 ); Quote Link to comment https://forums.phpfreaks.com/topic/239907-streaming-file-problem/ Share on other sites More sharing options...
fugix Posted June 20, 2011 Share Posted June 20, 2011 He should first check his php.ini file for the MAX_UPLOAD_FILESIZE and/or POST_MAX_SIZE to check and see what they are set to. Quote Link to comment https://forums.phpfreaks.com/topic/239907-streaming-file-problem/#findComment-1232334 Share on other sites More sharing options...
LLLLLLL Posted June 20, 2011 Author Share Posted June 20, 2011 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.... Quote Link to comment https://forums.phpfreaks.com/topic/239907-streaming-file-problem/#findComment-1232385 Share on other sites More sharing options...
LLLLLLL Posted June 23, 2011 Author Share Posted June 23, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/239907-streaming-file-problem/#findComment-1233978 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.