开发者

dynamically generating images in PHP sometimes isn't working

开发者 https://www.devze.com 2022-12-20 23:49 出处:网络
I have a page that needs to load several dynamically generated images. Everything works fine 90% of the time, but sometimes some of the images are not generated (I just get the missing image icon inst

I have a page that needs to load several dynamically generated images. Everything works fine 90% of the time, but sometimes some of the images are not generated (I just get the missing image icon inste开发者_如何学Pythonad). Since most of the times it works, and the missing images are not always the same, I think that maybe it has something to do with the server not having enough resources. Are there any ways I can prevent this from happening (and make sure the images get generated)?


I would try upping the memory limits and timeouts of PHP and restart your web server. In particular, look at memory_limit and max_execution_time.

Also in that configuration file, look at output_buffering, which controls how much of the output can be built up in memory before sending. This can sometimes affect how much can be output before the headers.

I assume you've already looked at your log files, but I would recommend writing out debugging around the image generation statements to see if they're returning or not.

0

精彩评论

暂无评论...
验证码 换一张
取 消