Unable to serve files larger than ~40MB

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Unable to serve files larger than ~40MB

Postby BuckoA51 » 15. July 2015 15:42

I'm developing a simple multimedia website using XAMPP in Windows 7. I started off in Wordpress and moved to static HTML and I noticed today while testing that a lot of my mp4 video files were no longer playing. When I looked into this further it turned out that any video file bigger than around 40 megs would not play at all.

Suspecting a problem with the player, I navigated directly to my video folder in the browser, I got the "Index of /win10/video" page where you can click a to open a file directly. Any video I click that's under 40mb plays instantly in my browser, while others that are bigger give me "connection was reset" error. I cannot right click and download the bigger video files either.

I've tried increasing limits in php.ini but it didn't seem to help.

I also found this thread on another forum that seems to indicate the same problem but there was no solution posted - http://webmasters.stackexchange.com/questions/43159/xampp-unable-to-serve-files-larger-than-30mb

Strangely, there's no problem on my Windows 8 box.

Can anyone help please? Thank you.
BuckoA51
 
Posts: 2
Joined: 15. July 2015 15:33
Operating System: Windows 7

Re: Unable to serve files larger than ~40MB

Postby gsmith » 15. July 2015 20:57

For the directory you are storing these files in, add
EnableSendfile On

You can probably do this in an .htaccess file in the directory/folder itself if AllowOverride for the host is FileInfo or All.

This is one of many things that changed with Apache 2.4. In 2.2 EnableSendfile was On by default, in 2.4 the default is Off.

With it off, Apache buffers the entire file in memory before sending it, so every computer has a different limit depending on the amount of memory that is free. One of mine is 116MB and another is 83MB. With EnableSendfile On, the sending of the file is passed over to the OS.
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: Unable to serve files larger than ~40MB

Postby BuckoA51 » 15. July 2015 21:10

Ah, thanks for that. In the end I started fresh with XAMPP 5.5.24 / PHP 5.5.24 and that seems to have cured it, but good to know if I run across the problem again.

I'm not very experienced with htaccess files, could you show me exactly what would need to be in one?

Many thanks for answering my question.
BuckoA51
 
Posts: 2
Joined: 15. July 2015 15:33
Operating System: Windows 7

Re: Unable to serve files larger than ~40MB

Postby gsmith » 16. July 2015 02:16

That is something the docs and a little trial and error can teach you better than I.
http://httpd.apache.org/docs/2.4/howto/htaccess.html
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 127 guests