|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-09-12 13:41 UTC] mkoppanen@php.net
[2007-09-14 09:23 UTC] neil at scare dot me dot uk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 13:00:01 2025 UTC |
Description: ------------ Sometimes Apache resets the connection with the browser when a PDF document is loaded into Imagick. I haven't found a way to reproduce it every time, but reloading the script below a few times usually triggers it. This seems to occur with any PDF, but not with other filetypes. Versions 2.0.0RC2 and CVS exhibit the problem. Apache 2.2.4 with PHP 5.2.3 Reproduce code: --------------- <?php header('Content-type: image/jpeg'); $img = new Imagick; $img->setResolution(288, 288); $img->readImage('map.pdf'); $img->setImageFormat('JPEG'); $img->resampleImage(144, 144, imagick::FILTER_LANCZOS, 1); print $img; Expected result: ---------------- map.pdf should be loaded and the first page output as a JPEG after being resized. Actual result: -------------- Apache resets the connection with the browser but the process doesn't die. gs continues to process the PDF document and the script performs the conversion to JPEG, but obviously nothing can be sent to the browser. Nothing is recorded in any error logs. Any further attempts to load a PDF with Imagick immediately trigger the bug. Restarting Apache fixes it temporarily.