RE: [PHP] Security of PHP code
| From: | Rasmus Lerdorf | Date: | Wed, 04 Jul 2001 13:50:23 +0000 |
| Subject: | RE: [PHP] Security of PHP code | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-56167@lists.php.net to get a copy of this message | ||
The right way to fix this is to add a rule to your Apache configuration
that looks like this:
<Files ~ "\.inc$">
Order allow,deny
Deny from all
</Files>
That will simply prevent any direct access at all to your .inc files.
Making the .inc files simply be parsed by PHP could still be a problem as
they could be called out of context.
-Rasmus
On Wed, 4 Jul 2001, Adrian Ciutureanu wrote:
> Here is something that happend to me: I forgot to tell Apache that .inc
> files must be parsed by PHP. All works fine if you include a .inc file,
> but if somebody guess .inc file name, he can see the content of that
> file!
>
> > -----Original Message-----
> > From: David A Dickson [mailto:daviddickson@lycos.com]
> > Sent: 4 iulie 2001 16:43
> > To: php-general
> > Subject: [PHP] Security of PHP code
> >
> >
> > Is it possible for others to view the php code for pages I
> > have written? I thought I heard someone say before that they
> > could write a simple script to accomplish this. If anyone
> > knows of any tacticts people might use to attack my code
> > please post them hee.
> >
> > : David A. Dickson
> > : daviddickson@lycos.com
> >
> >
> >
> >
> > Get 250 color business cards for FREE!
> > http://businesscards.lycos.com/vp/fastpath/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail:
> > php-list-admin@lists.php.net
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>