php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36995 when imagepng() and friends fail there is no way to know why
Submitted: 2006-04-06 13:06 UTC Modified: 2006-08-01 22:43 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: tony2001@php.net Assigned: pajoye (profile)
Status: Closed Package: GD related
PHP Version: 5CVS-2006-04-06 (CVS) OS: Linux
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 !
Your email address:
MUST BE VALID
Solve the problem:
22 + 27 = ?
Subscribe to this entry?

 
 [2006-04-06 13:06 UTC] tony2001@php.net
Description:
------------
imagepng()/imagegif()/imagejpeg() function do not report the exact reason why they failed to write to the file.
This makes it difficult to debug, as you know it fails, but it doesn't say why.

Reproduce code:
---------------
<?php

$i=imagecreate(10,10); 
imagepng($i, "/root/test.jpg");

?>

Expected result:
----------------
Warning: imagepng(): Unable to open '/root/test.jpg' for writing : Permission denied in .. on line ..

Actual result:
--------------
Warning: imagepng(): Unable to open '/root/test.jpg' for writing in .. on line ..

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-01 22:42 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Tony requests, Tony adds.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC