doukang1962 2016-08-31 03:20
浏览 213
已采纳

TCPDF最大执行时间超过30秒

Can somebody please help me how to fix this error. I have a pdf page and I made a custom page size and made it landscape.

But when I run the page. It has an error saying "Maximum execution time exceeded 30 seconds in tcpdf.php line 18385

It only appears when I uploaded it in the server.

But when I use the program through remote it runs.

What seems to be the problem?

  • 写回答

2条回答 默认 最新

  • douhao5280 2016-08-31 03:55
    关注

    I had this issue as well on some content-heavy PDFs. PHP by default only allows a maximum execution time of 30 seconds.

    You can increase this time in the php.ini file by changing the following line:

    max_execution_time = 30
    

    to

    max_execution_time = 60
    

    or adding this to the top of your script file.

    set_time_limit(60);
    

    60 seconds should be enough time for TCPDF to do what it needs to do but you may need to increase it further. Be careful with increasing it too much, however, as it can cause issues.

    NOTE: If you're reaching the maximum execution time due to an infinite loop, this won't change anything.

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

报告相同问题?

悬赏问题

  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误