php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58033 pingImageFile produces fatal errors
Submitted: 2008-02-08 08:10 UTC Modified: 2009-02-06 16:32 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ian dot tyndall at dataconversions dot biz Assigned:
Status: Suspended Package: imagick (PECL)
PHP Version: 5.2.5 OS: Windows XP 32bit
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
19 - 9 = ?
Subscribe to this entry?

 
 [2008-02-08 08:10 UTC] ian dot tyndall at dataconversions dot biz
Description:
------------
Using pingImageFile produces unexpected results.

My specs:
	ImageMagick version: ImageMagick 6.3.7 01/11/08 Q16
	PHP version: 5.25
	Windows version: XP 32 bit
	Apache version: 2.2.6
	Imagick version: 2.1.0RC3 

Reproduce code:
---------------
<?php
error_reporting(E_ALL);
//$file = 'http://www.imagemagick.org/image/script.png';
$file = 'mast.jpg';
$im = new Imagick();
if(($fh = fopen($file,'r')) === FALSE){
    die('Failed to open file for reading!');
}
$im->pingImageFile($fh);
var_dump($im->getImageGeometry());
?>

Expected result:
----------------
The output of getImageGeometry

Actual result:
--------------
tested with jpg,gif,png -

Local File (same directory as the script) :
	cli - crashes cli
        apache - crashes apache, error log entry: Parent: child process exited with status 3221225477 -- Restarting

Remote File:
	cli & apache -
	PHP Fatal error:  Uncaught exception 'ImagickException' with message 'Can not process empty wand' in C:\\dev\\RT-gallerymgr\\public_html\\magick.php:10\nStack trace:\n#0 C:\\dev\\RT-gallerymgr\\public_html\\magick.php(10): Imagick->getimagegeometry()\n#1 {main}\n  thrown in C:\\dev\\RT-gallerymgr\\public_html\\magick.php on line 10

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-09 10:39 UTC] scottmac@php.net
Can you try the build at http://whisky.macvicar.net/imagick/071130/

It's build with VC6 again 5.2.5 where the build Mikko provides is built with VC8.
 [2008-02-11 08:37 UTC] ian dot tyndall at dataconversions dot biz
Using the build from http://whisky.macvicar.net/imagick/071130/

Produces the same results as Mikko's build, except that it works only in this circumstance:

Using cli with local file.

I did notice that this build reported its version as 2.1.0, where Mikko's build reported its version as 2.1.0-rc3.
 [2008-02-11 11:46 UTC] scottmac@php.net
Can you clarify this for me please, the bug you are reporting is purely to do with local files? But the build I provided is not working?

Mikko's Build
          Local File         Remote File
Apache      Dies                Works
CLI         Dies                Works

My Build
          Local File         Remote File
Apache      Dies                Dies
CLI         Works               Dies

If that's not correct can you tell me which one is experiencing the problem.
 [2008-02-11 11:49 UTC] ian dot tyndall at dataconversions dot biz
Clarification:

Mikko's Build
          Local File         Remote File
Apache      Dies                Dies
CLI         Dies                Dies

Your Build
          Local File         Remote File
Apache      Dies                Dies
CLI         Works               Dies
 [2009-02-06 16:32 UTC] mkoppanen@php.net
Suspending the bug until we get proper Windows builds.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 13:01:28 2024 UTC