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

Jackson Yee jyee at vt.edu
Mon Jul 29 18:42:01 CDT 2002


----- 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/




More information about the thelist mailing list