php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51913 Loading image from non-system drive crashes PHP
Submitted: 2010-05-26 03:03 UTC Modified: 2010-05-27 03:24 UTC
From: sharkstudio at mail dot ru Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.3.2 OS: Windows 7 x64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sharkstudio at mail dot ru
New email:
PHP Version: OS:

 

 [2010-05-26 03:03 UTC] sharkstudio at mail dot ru
Description:
------------
My script that uses Imagick extension and has perfectly worked for a couple of years crashes after update PHP 5.1.x on WinXP to PHP 5.3.2 on Win7. 
I found that it crashes silently at the point where I am trying to use image from my D: drive.
I easily reproduced the crash in a separate script with one line only:
<?php $im = new Imagick('D:\image.jpg');?>
If I change it to  <?php $im = new Imagick('C:\image.jpg');?> - it works.

GD's imagecreatefromjpeg() crashes as well, but it troughs an error: 'imagecreatefromjpeg() JPEG library reports unrecoverable error' .

I tried to load the same image from C: drive and it works as it should.
I tried to do "fopen" from D: drive and it works.

The bug appears on Windows 7 environment only. The PHP installed on C: drive.

P.S. sorry, if my English is not very clear.

Test script:
---------------
<?php $im = new imagecreatefromjpeg('D:\image.jpg'); // crashes?>
<?php $im = new imagecreatefromjpeg('C:\image.jpg'); // works?>


Expected result:
----------------
First line crashes.
Second line works.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-26 05:08 UTC] sharkstudio at mail dot ru
Tried file_get_contents() 
works without any problem.
 [2010-05-26 11:18 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2010-05-26 11:18 UTC] pajoye@php.net
Works just fine here. Also it should 'c:\\image.jpeg'. What are the recoverable errors you get with gd? (which are not crashes btw)
 [2010-05-27 02:22 UTC] sharkstudio at mail dot ru
Apparently it was a bug with imagick extension compiled in VC6. Updated everything to VC9 version it solved problem.
 [2010-05-27 03:24 UTC] pajoye@php.net
-Status: Feedback +Status: Bogus
 [2010-05-27 03:24 UTC] pajoye@php.net
.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 13:01:33 2025 UTC