using imagemagick "The connection was reset"

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
sahel
Posts: 4
Joined: 2012-09-22T07:25:36-07:00
Authentication code: 67789

using imagemagick "The connection was reset"

Post by sahel »

when i try use Imagick class ,mozilla shows "The connection was reset"
my configuration is--
1.windows 7 - 32 bit.
2.php 5.3.5
3.ImageMagick-6.6.4-Q16
4.php_imagick.dll vc6
5.apache 2.0.63 and 2.2.17 tried both
6.in phpinfo page imagick module enabled shows
but when i

//
$im = new imagick('doctest.pdf');
$im->setImageFormat("jpg");
header("Content-Type: image/jpeg");
echo $im;

//or
$im = new imagick('doctest.pdf');

am using above code the browser crashed.
and apache error log shows me
"[notice] Parent: child process exited with status 255 -- Restarting.
[notice] Apache/2.0.63 (Win32) PHP/5.3.5 configured -- resuming normal operations
[notice] Server built: Jan 17 2008 22:58:29
[notice] Parent: Created child process 2276
[notice] Child 2276: Child process is running
[notice] Child 2276: Acquired the start mutex.
[notice] Child 2276: Starting 250 worker threads."

:?
Please give me a solution that what to do.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: using imagemagick "The connection was reset"

Post by Bonzo »

You might get more information on the error using:

Code: Select all

try
{
$im = new imagick('doctest.pdf');
$im->setImageFormat("jpg");
header("Content-Type: image/jpeg");
echo $im;
}

catch (Exception $e) {
    echo 'Caught exception: ',  $e->getMessage(), "\n";
}
Will imagick work on a file other than a pdf?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: using imagemagick "The connection was reset"

Post by anthony »

The read can use ANY image format, not just PDF's.

IM actually doesn't work on PDF's. At least not directly.

It gets the "ghostscript" delegate program/library to convert PDF to either PPM's (multiple images, no alpha) or PNG (single images with alpha), and then reads that.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
sahel
Posts: 4
Joined: 2012-09-22T07:25:36-07:00
Authentication code: 67789

Re: using imagemagick "The connection was reset"

Post by sahel »

hi anthony,
Thanks for reply...
i have installed ghost script,but how to work with it can u explain me or give a suitable link.
please asap :?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: using imagemagick "The connection was reset"

Post by Bonzo »

Have you tried your original code again since installing?

A computer restart would not do any harm either; Imagemagick and pressumably Imagick should automaticaly find GS.
sahel
Posts: 4
Joined: 2012-09-22T07:25:36-07:00
Authentication code: 67789

Re: using imagemagick "The connection was reset"

Post by sahel »

yes ,
but the same problem arise including "'gs' is not recognized as an internal or external command, operable program or batch file." :shock:
sahel
Posts: 4
Joined: 2012-09-22T07:25:36-07:00
Authentication code: 67789

Re: using imagemagick "The connection was reset"

Post by sahel »

finally i solve the problem but
i just able to use exec() function but not Imagick() class.
"the conetion was reset". :o
Post Reply