ID: 35060 Comment by: no at email dot com Reported By: moron at industrial dot org Status: Open Bug Type: Documentation problem Operating System: FreeBSD (likely all) PHP Version: 4.4.1RC1 New Comment:
See also http://bugs.php.net/bug.php?id=35071 Same issue, but suggestion for bugfix provided by author there. Previous Comments: ------------------------------------------------------------------------ [2005-11-02 19:37:37] neverloop at gmail dot com Changing the way functions work within a minor update (version+=0.0.1) is an irresponsible way of maintaining software. This bug (please don't call it a "feature") caused a lot of trouble on our servers. ------------------------------------------------------------------------ [2005-11-02 17:53:41] moron at industrial dot org Ok. As an aside though, they have been "wrong" for at least two or three years now and I have been using the stated functionality in both PHP 4 and 5 successfully for quite a while so changing this behaviour will affect any application that uses the GD functions under "safe_mode". It's also a bit illogical to have to create the file first, no? Again, if "touch" and "copy" and "move_uploaded_file" and "unlink" all can have access to the file in question (as they should in this scenario), why can't "imagejpeg" do the same "safe_mode" access checks (as it seems to be attempting to do when looking at the source)? The file it wants to create is within the open_basedir limits, it is under a directory with world write permissions and it is owned by the same group as the script running. Cheers ------------------------------------------------------------------------ [2005-11-02 14:19:01] [EMAIL PROTECTED] Docs are wrong. ------------------------------------------------------------------------ [2005-11-01 23:00:10] moron at industrial dot org http://ca.php.net/manual/en/function.imagejpeg.php "imagejpeg() creates the JPEG file in filename from the image image. The image argument is the return from the imagecreatetruecolor() function." This definition conflicts with the newly stated requirement that the file in question already exists. Either the docs are wrong or the safe_mode check is broken. ------------------------------------------------------------------------ [2005-11-01 22:57:10] moron at industrial dot org What is bogus about the bug exactly? If "touch()" can create the file then so should imagejpeg() - is that not the entire point of that function, to create a file? Nothing in the docus that I could see state that the file needs to exist previously. Also, if this is a "feature" can you please explain what that feature is exactly? It does not seem to adhere to any sane permission scheme I can think of, at least as far as running PHP as a module under UNIX style operating systems go. If this "feature" will not be going away, any chance of getting the imagejpeg docs updated to note that the new requirement is that the file in question already exists before it can be written to? Cheers ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/35060 -- Edit this bug report at http://bugs.php.net/?id=35060&edit=1