dongzhao4036 2016-08-08 15:45
浏览 10

告诉Apache服务器我的页面正在忙着处理fpdf而不是挂起

I use fpdf to create a pdf document using php. It works but sometimes it can take a long time to produce the finished report and if the time takes over 60 seconds I get the 500 Internal Server Error.

I have spoken my service provider and they have told me that this setting cannot be overridden programatically (such as max_execution_time) and that I need to keep their server aware that the page is still running. They said that a good way to do that is to have progress bar but unfamiliar with fpdf.

This would be a great additional feature as well as solving the problem, however fpdf does not allow any output client side as it will give the error

FPDF error: Some data has already been output, can't send PDF file

So my question is either,

Is there any way you a progress bar can be displayed while an fpdf is being generated? (I have looked at this question progress bar while opening pdf using fpdf but it doesn't seem to address the 'data already outputted' error)

or

If this is not possible is there a way for 'talking' to the Apache server during the process of generating the pdf to let it know the page is still busy working on it?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 数学建模招标中位数问题
    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?
    • ¥15 matlab(相关搜索:紧聚焦)
    • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计