D
D
Dmitry Kulikov2015-03-26 13:18:28
PHP
Dmitry Kulikov, 2015-03-26 13:18:28

What to do if the picture is given with a 500 error?

I found an interesting problem, several pictures disappeared on the site, when I started digging what was the matter, I found out that the pictures are in place, but they come from the server with Status Code: 500 Internal Server Error due to which the browser refuses to embed them in the page, since the pictures are not static , but they are generated according to the size, I remembered that for a long time there was a problem when the picture was given with an error due to the fact that the script could not resize it correctly, turned off the resize and everything seems to be in order, but it was ok with some test pictures, others still go with an error.
Then I tried to force a 200 response
header ("HTTP/1.1 200 Ok");
, but either I didn’t do it right or
the display of the picture also doesn’t work using MagickEchoImageBlob

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FanatPHP, 2015-03-26
@dmitryi_k

Further tried to set compulsorily 200 response
header ("HTTP/1.1 200 Ok");

Hahaha, great solution! Finished joke:
- Doctor, my car is not
moving - What is the reason?
- We've run out of gas!
- And what did you do?
Now to the nooks
If you don't believe me, fix it!
To do this, you must first find out what it is. We read phpfaq.ru/debug#quick and think a lot.

D
David Manzhula, 2015-07-18
@da411d

100% error somewhere in .htaccess

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question