concerning open_basedir and safe_mode on fileupload
| From: | twistednetadmin | Date: | Wed, 19 Oct 2005 20:46:57 +0000 |
| Subject: | concerning open_basedir and safe_mode on fileupload | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-224350@lists.php.net to get a copy of this message | ||
I am making an imagegallery with fileuploads for the members of the site and
need a little info on how the open_basedir affects the fileupload.
I have read what I have found on it, but I'm not sure what it really does.
The phpinfo file says something like this:
PHP CORE config.
------------------------------------------
open_basedir (local value) /dir1/dir2/yoursite:/dir1/dir2/tempdir (master
value) No value
safe_mode (local value) On (master value) Off
-----------------------------------------
If I understood this correctly this means that I have to upload the
imagefile to $sysfolder="/dir1/dir2/tempdir"
Or would the $sysfolder be the whole value of the (local value):
/dir1/dir2/yoursite:/dir1/dir2/tempdir
And do I then have to move the file to the wanted directory for the uploads
with a php script?
And chmod(). Is this anything to have in mind?
Final question: Wich of the values am I gonna work out from?
My guess is offcourse the (local value), or I wouldn't get the:
*Warning: *copy(): open_basedir restriction in effect.
But I would believe the (master value) WAS the master value...if you get
what I mean?
Most of the time a "mastersomething" usually overrides a
"notmastersomething".... Agree?
Additional info:
The upload is from a form and works perfectly on my own testing server where
both safe_mode and open_basedir is turned of.
Can anyone explain this to me in a nice "master to noob" way? Or is more
information needed?