Re: Protecting individual files/dirs from access
| From: | Richard Lynch | Date: | Tue, 17 Apr 2007 22:28:28 +0000 |
| Subject: | Re: Protecting individual files/dirs from access | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253149@lists.php.net to get a copy of this message | ||
On Tue, April 17, 2007 9:12 am, tedd wrote:
> I start building from inside httpdocs folder where I place an
> index.php file and then branch out from there. Now, where is "OUTSIDE
> the web-tree"?
Not inside httpdocs folder is OUTSIDE.
If you put a file there, nobody can surf to it.
But PHP can still 'include' it with a good setup of include_path in
.htaccess or even with http://php.net/set_include_path
at the top of
each script if .htaccess is turned off.
>>It's a lot harder to screw up bad enough to configure Apache to start
>>serving up files directly from a "private" directory.
>
> I have a "private" directory, but if I place files in it, I can't
> read them via php -- I get a:
>
> Warning: fopen(): open_basedir restriction in effect.
Get your webhost to give you a directory that's not in httpdocs, but
*IS* in open_basedir restricted list -- Nobody but your webhost can
fix this.
> http://sperling.com/a/pw/girl.jpg
This one I cannot read.
> Now you got me going, how did you get that? Even my php scripts can't
> read it.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?