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 6347357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:11:51+00:00 2026-05-24T21:11:51+00:00

I know this is probably a really simpleton question so apologies but I’m trying

  • 0

I know this is probably a really simpleton question so apologies but I’m trying to learn new things.

I’m playing around with API calls and a tutorial I’m reading is advising that for sensitive info like passwords, username etc I should be “storing these values in a secure location other than your web server document root and setting the file permissions so that only the system user that executes your ecommerce application can access it.”

That all sounds like a spiffing idea, but I’m not completely sure how to go about it. Do I have a php file with for example define(‘PASSWORD’, ‘xxxxxx’); etc in it and then call that from somewhere? If so how and where should I put it?

I know you’re probably wondering why I’m playing around with an API if I don’t know how to do that and indeed it is a strange route that I’ve come down to find myself here, yet here I am, and that is what I don’t know.

any help would be most gratefully received 🙂 Julia

Edit: by the way assume I know nothing – because I really do know very little 😉

  • 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-05-24T21:11:53+00:00Added an answer on May 24, 2026 at 9:11 pm

    What they mean is, it’s ok to put your user/pass in a file that gets included in your app, but that file should be some place other than where your index.php is. For example, given the directory structure:

    /home/alex/site/public/
    /home/alex/site/lib/
    /home/alex/site/data/
    

    In the public dir, I’d put my index.php, my CSS, my JS, and images. And that’s it. The meat of the PHP app would go into the lib dir, and be referenced by the PHP include_path. Extra files like configs might go into the data dir. Then, your vhost document_root points to the public dir. So, a user hitting http://alex.com/index.php gets the right file, but since the data and lib dirs are up a level from the document_root, nobody can grab http://alex.com/data/secret.txt.

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

Sidebar

Related Questions

I know this is probably a really amateur question, but I can't figure this
This is probably a simple question, but I really don't know what I'm doing
I know this question has probably been asked already but I would really like
I know this is probably a really simple question but I'm having a brain
I know this probably really simple but Im not sure what im doing wrong...
I know this is probably really obvious, but I cannot figure out why I
I know this is probably a very simple question but how would I do
I know this question is probably stoopid. But I just don't want to cause
This is probably a really obvious question, but it's driving me nuts. We have
This is probably a completely stupid question, but i'm pretty new at objective-C and

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.