|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-03 21:36 UTC] sniper@php.net
[2006-01-03 21:49 UTC] kirils at r1g dot edu dot lv
[2006-01-03 22:18 UTC] sniper@php.net
[2006-01-11 01:00 UTC] php-bugs at lists dot php dot net
[2008-10-09 00:43 UTC] zackbeatty at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 22:00:01 2025 UTC |
Description: ------------ if safe_mode on, and fopen, imagejpeg (to file) .. wants to write to file that does not exist the file DOES NOT GET CREATED (file/dir permissions OK), but an error gets displayed. Warning: imagepng(): Unable to access img/test.png in /.../t.php on line 4 Warning: imagepng(): Invalid filename 'img/test.png' in /.../t.php on line 4 Reproduce code: --------------- <?php $img = imagecreatefrompng('img/font.png'); imagepng($img,'img/test.png') or die('wtf?'); echo 'test'; ?> Expected result: ---------------- i expect img/test.png to be created and "test" displayed. Actual result: -------------- img/test.png does not get created. imagecreatefrompng() works, but imagepng() fails ,dying with text "wtf?". -- this code circumvents the bug: <?php $img = imagecreatefrompng('img/font.png'); touch('img/test.png'); imagepng($img,'img/test.png') or die('wtf?'); echo 'test'; ?>