Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 17th, 2005, 06:41 AM
Doug
Guest
 
Posts: n/a
Default Dreamweaver PHP outside document root



I have a website I am trying to develop using PHP and Dreamweaver. I
also have a library of PHP code which includes the username and password
to get in the database.

I would like to put this code outside the document root. (If you are
using Apache, outside of htdocs) The html code can still be in the
document root. But the PHP, I would prefer it not to be. What happens
if some one misconfigures the server, and it no longer recognizes the
..php extension, therefore allowing people to download the script. Or,
if some one figures out the script name and runs the entire .php file?
I don't trust it.

However, the only way dreamweaver will recognize any code as being in
the project, is if it is under the document root. Is there any way
around this?

-d

  #2  
Old July 17th, 2005, 06:41 AM
Matthias Esken
Guest
 
Posts: n/a
Default Re: Dreamweaver PHP outside document root

Doug schrieb:
[color=blue]
> I would like to put this code outside the document root. (If you are
> using Apache, outside of htdocs) The html code can still be in the
> document root. But the PHP, I would prefer it not to be. What happens
> if some one misconfigures the server, and it no longer recognizes the
> .php extension, therefore allowing people to download the script. Or,
> if some one figures out the script name and runs the entire .php file?
> I don't trust it.
>
> However, the only way dreamweaver will recognize any code as being in
> the project, is if it is under the document root. Is there any way
> around this?[/color]

Use .htaccess and deny any external access to the configuration file.

Matthias
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles