Laravel- Dompdf Maximum execution time of 60 seconds exceeded

北城以北 提交于 2019-12-01 09:39:08

问题


Here is error when i convert pdf, it's not working since i run my laravel project by "php artisan serve --port=1000". But if i run my laravel project with xampp. it's alright. I don't know why?. Give me explaination and repairs . Thank you

Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)
    Maximum execution time of 60 seconds exceeded

回答1:


Increase Your time limit in your controller file.Below variable to increase your time limit.

 set_time_limit(300);



回答2:


The laravel - dompdf does not work well with php artisan serve. You should use XAMPP or another HTTP server you like.




回答3:


I had the same problem and narrowed it down to linking to an image in my blade file. When I embedded the image instead as per this SO answer, it no longer timed out.




回答4:


Possible causes:

linking to external CSS - you're better off writing your css between style tags in the same file as your html

using blade templating syntax e.g. @sections @roles, etc

linking to external images

Complex table structures/layouts

...from personal experience



来源:https://stackoverflow.com/questions/49421226/laravel-dompdf-maximum-execution-time-of-60-seconds-exceeded

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!