douqian1835 2011-03-08 22:15
浏览 52
已采纳

使用PostgreSQL附带的Apache / PHP服务器向iOS设备提供视频

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

  • 写回答

3条回答 默认 最新

  • dongxueji2838 2011-03-25 20:43
    关注

    I couldn't figure out how to fix this problem. I had initially used the PostgreSQL/Apache/PHP install package found at the site in my comment on the question because it was a way to install all three and make sure they worked without hassle. Obviously, since the resulting server didn't provide the functionality I needed, I had the option of installing everything from scratch. I used the instructions found here to achieve this result. The instructions are a bit out of date, but the process worked.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)