LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-08-2010, 08:03 AM   #1
charu
Member
 
Registered: Nov 2010
Posts: 35

Rep: Reputation: 0
Safest place to put database connection file


When connecting to a database in a php script, where would be the safest place to store the connect.php file. I am thinking it should not be in public_html, but is it safe in sub folders or is there a method people generally use to keep such files secure and inaccessible.

The file I mean is one including the database name, user and password etc.
 
Old 12-08-2010, 08:04 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,817

Rep: Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610
Completely outside of your webroot, so above public_html. Though I'm not sure if the other files will then be able to access it. Try it!
 
Old 12-08-2010, 12:56 PM   #3
charu
Member
 
Registered: Nov 2010
Posts: 35

Original Poster
Rep: Reputation: 0
Thanks, I have put it in the directory "above" public_html. It is working ok from there and I assume that it is completely inaccessible to anyone except account ftp user from there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The .c file of kernel source code where TCP connection takes place. indrajeetmopari Linux - Kernel 2 02-12-2008 06:52 PM
rhel put kerberos headers in wrong place Ratclaws Linux - Enterprise 0 12-09-2005 11:57 AM
Best place to put new programs. swamprat Linux - Newbie 5 10-04-2005 08:45 PM
best-practice place to put shared directories funaroma Linux - Newbie 1 11-30-2004 03:50 PM
what is the standard place to put sourcefiles and where install? ldp Debian 5 05-14-2004 10:36 AM


All times are GMT -5. The time now is 10:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration