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 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么