Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8645007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:26:16+00:00 2026-06-12T12:26:16+00:00

I have all of my database credentials within an include file that I wanted

  • 0

I have all of my database credentials within an include file that I wanted to place outside of my webroot file.

However, my shared hosting plan does not allow me to place files outside of the webroot. Would I have to look at encrypting my file in some way to make sure my credentials are secure?

I had read a method to produce a kind of fake 404 page, but that doesnt sound very secure to me at all.

I’ve also taken the step of creating a read-only user account so that if my account is compromised then at least nothing can be overwritten or dropped, but I obviously want to be as secure as I can given the limitations.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:26:17+00:00Added an answer on June 12, 2026 at 12:26 pm

    You can’t

    Best what is possible is create php file which will be interpreted by hosting service.

    <?php
    
    $DB_USER = 'your_user';
    $DB_PASS = 'your_pass';
    $DB_INSTANCe= 'your_instance';
    

    When someone will access your file from web browser he won’t see anything. When you need your file just include it.

    You could also add some .htaccess (probably) so no one using web browser will be able to access your file.

    Someone who has read access to the same physical host as you will be sadly able to access this file, and there is no way to prevent that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating and app that will rely on a database, and I have all
I have a database with Points of Interest that all have an address. I
I have all dates stored as timestamps (int) in the database. how can I
Ok, i have a database in which i have all my users registered with
In my MySQL Database all the entries have a rating(an Integer). Now I want
I have an existing mongo database where all documents in a collection have a
I have ListView which is saving all data to database. For adding i have
I'm writing a database of all DVDs I have at home. One of the
We have a database in which all the PKs are GUIDs, and most of
have a database with a list of business leads. They are all given a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.