dongmei1911 2011-10-26 17:17
浏览 66
已采纳

最大执行时间为30秒,超过了swift邮件程序

I am using swift mailer using this statement:

  require_once 'lib/swift_required.php';

to send email.

It was working fine for many months and now suddenly I start getting this error:

Fatal error: Maximum execution time of 30 seconds exceeded in
 ...\lib\classes\Swift\Transport\StreamBuffer.php on line 271

I don't know why this error suddenly comes up and no emails are being sent. I have done nothing, it just stop suddenly. Also I own the server and I have made no changes to this server.

Actually the file called to send email is by jquery and I see in firebug that it calls the file properly but when it calls the file to send email, it gives this error after some time.

Thanks

  • 写回答

1条回答 默认 最新

  • dongyunque2511 2011-10-26 17:36
    关注

    If you are certain that nothing else has changed, is it possible it now takes longer then 30 seconds to send the email? The 30 second maximum can be adjusted in PHP, either globally in php.ini or per request. While generally not recommended to increase this in a production environment, typically it is ok for back end jobs like sending mails out.

    You can change it by doing: ini_set('max_execution_time', 600);

    Set to 0 for infinite time, although if you have a real problem on the server, your request may not ever complete.

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

报告相同问题?

悬赏问题

  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统