I am developing a system in which a server will serve a video to a device (iDevice or otherwise) and then ask the user to rate the video. I had decided to use PostgreSQL for my database, and let it install an Apache and PHP server to work against (as found here http://www.enterprisedb.com/products-services-training/pgdownload).
It seems, however, that this server isn't configured quite like a typical Apache/PHP install. When an iDevice attempts to download a video from the server, the iDevice gives this error:
Cannot play movie—The server is not correctly configured
I've done some research, and learned that iDevices require byte-range request functionality, so I checked my server's access logs and found this:
xx.xx.xx.xx - - [08/Mar/2011:11:45:56 -0700] "GET temp.mp4 HTTP/1.1" 206 2
xx.xx.xx.xx - - [08/Mar/2011:11:45:56 -0700] "GET temp.mp4 HTTP/1.1" 200 17760579
(where "17760579" was the exact size in bytes of the particular file)
They should look something like this:
xx.xx.xx.xx - - [07/Mar/2011:18:04:11 -0700] "GET temp.mp4 HTTP/1.1" 206 2
xx.xx.xx.xx - - [07/Mar/2011:18:04:11 -0700] "GET temp.mp4 HTTP/1.1" 206 25947357
xx.xx.xx.xx - - [07/Mar/2011:18:04:11 -0700] "GET temp.mp4 HTTP/1.1" 206 60637
xx.xx.xx.xx - - [07/Mar/2011:18:04:11 -0700] "GET temp.mp4 HTTP/1.1" 206 25880928
So, I know that my server isn't dealing with some byte-range requests properly. However, using curl to check for this functionality returns a proper result:
curl --range 0-99 http://url/temp.mp4 -o /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 100 0 100 0 0 8574 0 --:--:-- --:--:-- --:--:-- 10000
I've ensured that the video MIME types are properly configured.
I'm not sure where to go from here. Something, somewhere, is misconfigured in this server.
Update: Here are appropriate version numbers:
Server version: Apache/2.2.16 (Unix)
Server built: Oct 7 2010 00:26:09
PHP version 5.3.3
PostgreSQL 9.0.2 on x86_64-apple-darwin