[thelist] PHP: open_basedir path: recursive or not?

Rich Gray richardgray at onetel.co.uk
Tue Jul 30 01:53:01 CDT 2002


Try changing the script to use move_uploaded_file() instead of copy()
HTH
Rich
----- Original Message -----
From: "Stephane Gosselin" <stef at cfusions.com>
To: <thelist at lists.evolt.org>
Sent: Monday, July 29, 2002 15:46
Subject: [thelist] PHP: open_basedir path: recursive or not?

> HI. Any PHP ers out there that could fiure this out, I need a hand.
> A client has a script * not made by me * that copies an uploaded file from
> the /tmp dir to his image folder. The server is now set-up with safe_mode
> on, and things havent worked since. I am stumped as to wether the path in
> the open_basedir directive needs a slash at the end, and also if the
owners
> of the files is an issue with safe mode on, and lastly but not least, if
> the doc_root needs to be set for file copying to be  available on their
> server. Thanks.

What error message does the script output, Stephane?  You should be able to
see what the exact problem is through it.

To go over your answers briefly though:

The path in open_basedir does not require a slash at the end.

The owner of the files is indeed an issue - the files' uid's should be the
same as the uploading scripts, otherwise PHP will complain.

If doc_root is set, PHP won't access files outside this directory and
subdirectories.  If it is not set though, then you can access any part of
the
filesystem.

Regards,
Jackson Yee
jyee at vt.edu
http://www.jacksonyee.com/

--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list