V
V
Vasya Surname2016-10-04 01:12:13
PHP
Vasya Surname, 2016-10-04 01:12:13

Why does the browser get an ERR_CONNECTION_RESET error when using Imagick?

I can't solve the riddle for two days and two nights.
When writing such a line
$image = new Imagick('1.jpg');
, an error occurs ERR_CONNECTION_RESET
if I write simply
$image = new Imagick();
Then everything works, I can even create an image. What could be wrong? Why does not want to work with the finished image?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Kalibrov, 2016-10-04
@rework

What version of PHP do you have? Try installing an older version of Imagick.

R
RPG, 2016-10-04
@RPG

It looks like the script is crashing. There can be several reasons:
- there is simply not enough memory for the interpreter - try increasing the RAM limit for php. I bet on this option if the 1.jpg file is quite large (in pixels), let's say it's a photograph. Try to open a small picture - if it works - the reason is lack of memory
- errors at the jpeg / imagemagick library level - in this case, you need to update them or roll back the update, if it happened
- the machine ran out of resources and the script was nailed by timeout. Unscrupulous hosters host thousands of sites on virtual servers, so the server can simply be overloaded

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question