RE: [PHP] Re: how to hide dbconnect file if its in published directory?

2001-07-09 Thread Chadwick, Russell


Have the script dump the envoirnment vars to a file and compare the
variables from a user vs include because some of those variables apache gets
from a browser, off the top of my head REMOTE_ADDR should work, that wont be
set when you include.  So just die() if its set.  - Russ

-Original Message-
From: James, Yz [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: how to hide dbconnect file if its in published
directory?


Hi Noah,

if you make the include file a .php file, then the browser will parse the
code as a blank page whether or not they choose to look at the file, or
try to fopen(etc) it.  Problem solved ;)  At least I think that's
safe-ish...

James.

"Noah Spitzer-Williams" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey guys,
>
> I come for advice once again. Say i have a file dbconnect.inc which
> connects to my database. Now if this file is located in a directory
> accessible for to the web is there anyway that if someone types in that
file
> i can detect it being accessed, instead of included, and redirect them
> elsewhere?
>
> Thanks guys!
>
> - Noah
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: how to hide dbconnect file if its in published directory?

2001-07-09 Thread James, Yz

Hi Noah,

if you make the include file a .php file, then the browser will parse the
code as a blank page whether or not they choose to look at the file, or
try to fopen(etc) it.  Problem solved ;)  At least I think that's
safe-ish...

James.

"Noah Spitzer-Williams" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey guys,
>
> I come for advice once again. Say i have a file dbconnect.inc which
> connects to my database. Now if this file is located in a directory
> accessible for to the web is there anyway that if someone types in that
file
> i can detect it being accessed, instead of included, and redirect them
> elsewhere?
>
> Thanks guys!
>
> - Noah
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]