|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-16 20:32 UTC] tony2001@php.net
[2005-11-16 20:39 UTC] php at lucard dot nl
[2005-11-16 21:19 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Description: ------------ When you create an image with imagepng or imagejpeg it fails. Displaying the error message: Warning: imagepng(): Unable to access test.png in /opt/guide/mydomain/HTML3/test/1.php on line 6 Warning: imagepng(): Invalid filename 'test.png' in /opt/guide/mydomain/HTML3/test/1.php on line 6 The rights on the directory are open ( 777 ), with other functions we are able to write to the directory. configline: ./configure' '--prefix=/usr/local/php4' '--with-apxs2=/usr/local/apache2/bin/apxs' '--disable-cgi' '--enable-safe-mode' '--with-openssl=/usr/local/ssl' '--with-pear' '--with-zlib' '--with-gettext' '--with-iconv=/usr' '--with-iconv-dir=/usr' '--enable-bcmath' '--enable-sockets' '--enable-calendar' '--enable-mbstring=all' '--enable-mbregex' '--with-curl=/usr/local' '--enable-dba' '--enable-dbase' '--with-dom=/usr/local' '--with-dom-xslt=/usr/local' '--with-dom-exslt=/usr/local' '--with-xmlrpc' '--enable-ftp' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-imap=../imap-2004g' '--with-imap-ssl=/usr/local/ssl' '--with-ldap' '--with-mcrypt=/usr/local' '--with-mime-magic' '--with-mhash=/usr/local' '--with-mysql=/usr/local/mysql' '--with-pgsql=/usr/local/pgsql' '--with-pdflib=/usr/local' '--with-swf=../swf/dist/' '--enable-wddx' '--enable-xslt' '--with-xslt-sablot=/usr/local' '--with-expat' '--with-expat-dir=/usr/local' '--enable-exif' '--with-bz2' '--with-zip' '--enable-memory-limit' Reproduce code: --------------- error_reporting(E_ALL); $destImage = imageCreateTrueColor(100, 200); // the code works if we remove the comment before the touch //touch("test.png"); imagepng($destImage,"test.png"); Expected result: ---------------- Nothing, the image should have been created in the current directory. It works if we create the file first with the touch! Actual result: -------------- Warning: imagepng(): Unable to access test.png in /opt/guide/mydomain/HTML3/test/1.php on line 6 Warning: imagepng(): Invalid filename 'test.png' in /opt/guide/mydomain/HTML3/test/1.php on line 6