#35060 [Opn->Bgs]: problematic safe_mode restriction in GD library
| From: | sniper@php.net | Date: | Wed, 02 Nov 2005 21:29:09 +0000 |
| Subject: | #35060 [Opn->Bgs]: problematic safe_mode restriction in GD library | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969370754@lists.php.net to get a copy of this message | ||
ID: 35060
Updated by: sniper@php.net
Reported By: moron at industrial dot org
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: FreeBSD (likely all)
PHP Version: 4.4.1RC1
New Comment:
Bogusing this in favor of the much better bug #35071 report.
Previous Comments:
------------------------------------------------------------------------
[2005-11-02 21:48:04] no at email dot com
See also http://bugs.php.net/bug.php?id=35071
Same issue, but suggestion for bugfix provided by author there.
------------------------------------------------------------------------
[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] sniper@php.net
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.
------------------------------------------------------------------------
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