doutongwei4380 2010-06-07 17:04
浏览 26
已采纳

用于“运行有限”主机的PHP下载脚本(例如hostgator)

I am currently with HostGator on a shared hosting plan. I have a new website I'm trying to setup with a download.php script. The issue I am having is that, while someone is "downloading" a file through the download.php script, it counts as a "process" and my hosting plan limits the processes that can be running at the same time to 25 at present.

My question is, what options do I have?

a). Move to new web hosting that doesn't limit processes running.

b). Change the way files are downloaded.

I would like to choose option b), however it occurs to me that I need to have the file accessed through PHP in order to restrict the number of downloads and to track download statistics, as well as protecting against hotlinking. If there was a way to have the PHP script send them the file so that the process doesn't need to be running the whole time the file is being downloaded, I would eliminate the problem, however to my knowledge that isn't possible.

Should I make the move to a new hosting company? I really enjoy HostGator as they have provided the best hosting experience for me thus far, except for this one issue of course, so I don't want to go on the hunt for another decent shared hosting company that doesn't limit processes running, only to find out there is another restriction or "catch" to the shared hosting deal.

  • 写回答

1条回答 默认 最新

  • douyiqi9640 2010-06-07 17:16
    关注

    I don't know how hostgator defines 'process', but as the download itself will keep an Apache process busy no matter what, I'd say in my definition of process you can't do anything about it, save for queuing downloads until other downloads have finished. You may like hostgator, but the 25 process limit is one of the most ridiculous limits I've stumbled across. Maybe that's the price one pays for 'unlimited disk space', but I my experience, the diskspace I needed was always limited.

    Are you sure the 25 processes are a hard limit? I can only find a 'User may not: 1) Use 25% or more of system resources for longer then 90 seconds', which maybe can be taken care of by optimizing the download script.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于logstash转发日志时发生的部分内容丢失问题
  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?