php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68223 Linux version 2.6.32-431.29.2.el6.x86_64
Submitted: 2014-10-14 05:58 UTC Modified: 2015-01-18 04:22 UTC
From: Galchonok dot Galka at GMail dot com Assigned:
Status: No Feedback Package: imagick (PECL)
PHP Version: 5.4.33 OS: Linux cent OS
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-10-14 05:58 UTC] Galchonok dot Galka at GMail dot com
Description:
------------
The script should cut one image 10 times and finish the job. 
But the script prematurely exits (1-2 sec), without waiting 30 seconds. 
If you add the set_time_limit (0), then the script will work allotted task (perezhmёt 10 images).

Test script:
---------------
                try
		{
			$name = time() . "-$i.gif";
			$name = $PATH . '/test_img/' . $name;
			$CImagick = new Imagick($PATH . '/1.gif');

			$format = $CImagick->getImageFormat();
			if(isset($animation_formats[$format]))
			{
				$images = $CImagick->coalesceImages();
				do
				{
					$images->resizeImage($w, $h, Imagick::FILTER_LANCZOS, 0.9);
				} while ( $images->nextImage() );
				$images->deconstructImages();
				$images->writeImages($name, true);
			}
			else
			{
				$CImagick->resizeImage($w, $h, Imagick::FILTER_LANCZOS, 0.9);
				$CImagick->writeImage($name);
			}
			$CImagick->clear();
			$CImagick->destroy();

			echo $i . "<br>" . PHP_EOL;
		}
		catch( Exception $e)
		{
			exit($e->getMessage());
		}

full test: http://j2.ru/test.txt

Expected result:
----------------
Start 
0
1
2
3
4
5
6
7
8
9
end

Actual result:
--------------
Start 

Fatal error: Maximum execution time of 30 seconds exceeded in /home/j2/public_html/test.php on line 30

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-04 00:31 UTC] Danack at basereality dot com
Hello,

I'm unable to reproduce your problem. If you're still seeing this issue please could you:

i) Say exactly which version of ImageMagick and Imagick your using.

ii) Say how you're running the test script e.g. through apache or CLI. And actually test through the CLI if you are currently seeing the issue when it's run in Apache.

iii) Find the an appropriate error message. There should be one in the log file or you might be able to get one through strace, but programs don't usually just terminate without giving an error message somewhere.


btw this is almost certainly an issue that is particular to your system rather than a general problem with the library - so without more information we're not likely to be able to help you find what the issue is.
 [2015-01-05 03:03 UTC] danack@php.net
-Status: Open +Status: Feedback
 [2015-01-05 03:03 UTC] danack@php.net
Awaiting feedback.
 [2015-01-05 09:38 UTC] galchonok dot galka at GMail dot com
Hi all.
1) I am use ImageMagick version 3.1.2.
2) error is reproduced through apache or CLI.
3) The program is interrupted anywhere Maximum execution time of 30 sekonds. Enabled error output to the screen.

Error reproduced on Linux CentOS 6.5 and Fedora 20.

Partially solved the problem by setting the team putenv: ("MAGICK_THREAD_LIMIT = 1") and set_time_limit(0).


Sorry for my lousy English :)
 [2015-01-18 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jul 28 18:01:25 2021 UTC