Note that there are some explanatory texts on larger screens.

plurals
  1. POServing video to iOS devices using the Apache/PHP server included with PostgreSQL
    text
    copied!<p>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 <a href="http://www.enterprisedb.com/products-services-training/pgdownload" rel="nofollow">http://www.enterprisedb.com/products-services-training/pgdownload</a>). </p> <p>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:</p> <blockquote> <p>Cannot play movie—The server is not correctly configured</p> </blockquote> <p>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:</p> <blockquote> <p>xx.xx.xx.xx - - [08/Mar/2011:11:45:56 -0700] "GET temp.mp4 HTTP/1.1" 206 2<br> xx.xx.xx.xx - - [08/Mar/2011:11:45:56 -0700] "GET temp.mp4 HTTP/1.1" 200 17760579</p> </blockquote> <p>(where "17760579" was the exact size in bytes of the particular file)<br> They should look something like this:</p> <blockquote> <p>xx.xx.xx.xx - - [07/Mar/2011:18:04:11 -0700] "GET temp.mp4 HTTP/1.1" 206 2<br> xx.xx.xx.xx - - [07/Mar/2011:18:04:11 -0700] "GET temp.mp4 HTTP/1.1" 206 25947357<br> xx.xx.xx.xx - - [07/Mar/2011:18:04:11 -0700] "GET temp.mp4 HTTP/1.1" 206 60637<br> xx.xx.xx.xx - - [07/Mar/2011:18:04:11 -0700] "GET temp.mp4 HTTP/1.1" 206 25880928</p> </blockquote> <p>So, I know that my server isn't dealing with some byte-range requests properly. However, using <strong>curl</strong> to check for this functionality returns a proper result:</p> <pre><code>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 </code></pre> <p>I've ensured that the video MIME types are properly configured. </p> <p>I'm not sure where to go from here. Something, somewhere, is misconfigured in this server.</p> <p>Update: Here are appropriate version numbers:</p> <blockquote> <p>Server version: Apache/2.2.16 (Unix)<br> Server built: Oct 7 2010 00:26:09<br> PHP version 5.3.3<br> PostgreSQL 9.0.2 on x86_64-apple-darwin</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload