I want to know how to secure a php file that has the database connect passwords  (info).   Currently I have just saved the file as connect.php because it is stored locally but now I need to upload the application and make it live.
When a PHP application makes a database connection it of course generally needs to pass a login and password. If I'm using a single, minimum-permission login for my application, then the PHP needs to know that login and password somewhere. What is the best way to secure that password? It seems like just writing it in the PHP code isn't a good idea.
Possible Duplicate:          Both words seem to be used interchangeably. I generally don't differentiate between them and intuitively pick one over the other. Is there a standardized way to distinguish between the two? While learning about Random variables I came across the mean of random variable X.  The definition says that the expected value of random variable E(X) = Mean of Random variable X  I am not able to understand why is that so. Can any one please help me with it Note: This is not the same as , which is about the moderator tool. I am talking about the flag history page that is accessible through the user profile at .  I tend to have a pretty good hit rate for flags, well above 90% helpful on several sites. I also semi-regularly review the flag history page, both to see the status of any outstanding flags as well as see how flags I raised have been handled. Particularly, whenever a flag of mine is declined, I look over the post I raised the flag against with this new information in mind, to try to determine if I should change my flagging behavior in some way to better match the specific site's scope.  However, comment flags are difficult in this regard. Most often, there is only a binary status: helpful or declined. Helpful comment flags nearly always lead to the comment being deleted, so that obviously could present a bit of a problem, but that's not really relevant because a helpful flag means you should just keep doing what you've been doing. Declined comment flags, on the other hand, usually mean the comment is kept. It's the declined comment flags that I want to learn more about. But there's no way to!  All the flag says is which post it was on, how I flagged a comment, that I was the one to raise the flag (which frankly is rather useless information when you are already looking at your own flags summary), when the flag was raised and whether it's pending, helpful or declined. In a very few cases the moderator handling the flag may leave a helpful return comment.  This can get even more confusing if I raise multiple flags in quick succession against comments on the same question including any answers to it, because they basically all get bundled together.  Even in the case of a declined flag where the comment remains, there is no way to find your way back to the specific comment you flagged! Thus it is very difficult to recognize the error of your ways. Because comment flags (with few exceptions) are handled by diamond moderators only, the lack of feedback about which comment's flag was declined means it's easy to keep wasting the moderators' time without even intending to do so.  Hence my feature request: add a link to the specific comment that the specific flag was raised against, ideally only if that comment remains. How should I handle questions which are answered in the comments? Sometimes I have asked a question which got no answers, but is answered in the comments to the question.  How should I handle these questions? I can't accept an answer, so it is never an accepted question.  For example this one:   (ok here the answer in the comments is from me, but nevertheless I also have others of them) Let's consider two statements: Zorn's lemma and theorem about existence of maximal ideals in commutative ring with $1$.  It's easy to prove that Zorn's lemma implies existence of maximal ideals.  I wonder if the converse proposition is true, i. e., does existence of maximal ideals implies Zorn's lemma? My approach was to construct a ring structure on an ordered set which satisfies Zorn's lemma condition such that existence of maximal ideal implies existence of maximal element in the set, but I didn't succeed. How is Faulhaber's formula derived? I have been wanting to understand how to find the sum of this series.   $$1^p + 2^p + 3^p +{\dots} + n^p$$  I am familiar with Gauss' diagonalised adding trick for the sum of the first $n$ natural numbers.  I can prove the formulas for  $$\begin{align}   \sum_{1}^{n} k^2 &amp;= \frac{n(n+1)(2n+1)}{6}\\  \sum_{1}^{n} k^3 &amp;= \frac{n^2(n+1)^2}{4}\\ \sum_{1}^{n} k^4 &amp;= \frac{n(n+1)(2n+1)(3n^2+3n-1)}{30} \\ \end{align}$$  With mathematical induction. But, beyond that even proofs with mathematical induction are difficult.  I'm interested in learning the theory and the proof behind Faulhaber's formula. What is the knowledge required to understand this proof ? How to compute   $$\prod^{\infty}_{n=2} \frac{n^3-1}{n^3+1}\ ?$$   My Working :   $$\prod^{\infty}_{n=2} \frac{n^3-1}{n^3+1}= 1 - \prod^{\infty}_{n=2}\frac{2}{n^3+1} =  1-0 = 1$$  Is it correct declare property as object? "When I grow up, I am going to be a doctor"- Is it correct? When I grow up, I am going to be a doctor.   Is this sentence correct? Personally I think my growing up will happen in future and "I am going to be a doctor" sounds like it is going to happen in next month! But the sentence clearly indicates the speaker is a child. So according to me, "I am going to be a doctor" should be replaced by "I will be a doctor". So I think a more clear sentence would be     When I will grow up, I will be a doctor.   Is my concept correct here? How do I align an image to centre? How do I align an image to centre?  In a beamer presentation I have a 2-3 items on a slide followed by an image. The image is not wide enough to cover whole slide, so it leaves around 30% space from right. How do I adjust it to leave enough space on both sides?  \begin{frame} \frametitle{Outlook} \begin{itemize} \item apps \item apps \item apps \includegraphics[scale=0.3]{P2P}     \end{itemize} \end{frame} Is there any text editor which supports Markdown (Ask Ubuntu's formatting style)? I've been exploring implementing Angular 2.0 in Salesforce custom pages and found that if I set showHeader=true in the VF page, I run into some issues.   It looks like including the header loads "sfdc/main.js", which defines the browser's Map() function without checking if one already exists. This removes some needed prototype functions that are native to ES5/6 such as "set" (needed in Angular 2) and "delete" (needed for an ES6-shim).   I've found that even including an ES5 shim before the ES6 one in attempts to restore some of these prototype methods does not work. If I set showHeader=false, "sfdc/main.js" is not loaded and everything works fine.   Is there a recommended way around this, or is it possible to update "sfdc/main.js" to conditionally define Map() if one does not already exist? It looks like it leaves out quite a few native functions supported in modern browsers.  Thanks I don't know anything about Star Trek except for the fact that it's about spaceships.  In  the person only wanted to watch the TV series. I want to watch every movie and TV series there is about Star Trek but I don't know where to start. I found this page on  which is about a time line. Do I need to watch it in this order? Are the movies and TV series related? Why is "that"/"which" omitted in this sentence? How to install and run CPUSim 4.0.11 on Ubuntu 18.04 LTS? I'm going according to the steps mentioned on the cs colby .  First, I installed java on my system by typing the following commands-  sudo add-apt-repository ppa:linuxuprising/java sudo apt-get update sudo apt-get install oracle-java10-set-default sudo apt install oracle-java10-set-default     Then, according to the instructions, I downloaded the .zip file, extracted it and then in the terminal typed   java -cp .:richtextfx-fat-0.6.10.jar:reactfx-2.0-MR.jar -jar CPUSim-4.0.11.jar   But this didn't work.  of command 1 terminal.  Here is a screenshot of all the files that are there in the CPUSim folder,   On observing the names of the folders present, I thought that the previous command was wrong. So I tried the following ones,  java -cp .:richtextfx-fat-0.6.10.jar:reactfx-2.0-M4.jar -jar CPUSim-4.0.11.jar java -cp .:richtextfx-0.6.10.jar:reactfx-2.0-M4.jar -jar CPUSim-4.0.11.jar   But none of them seems to work. Now when I click on the CPUSim-4.0.11.jar file, nothing happens. I have just switched to Ubuntu from Windows 10, and have a very little knowledge about how things work here. Please tell me how I could install and run CPUSim 4.0.11 on Ubuntu 18.04 LTS. Faction Membership Limits in Fallout 4 Are there any limitations to the faction memberships you can have in Fallout 4?  I'm brand-new to the Fallout universe, and just got to the point of being invited to the Brotherhood of Steel. However, I'm a bit concerned about their politics and how it may affect my standing with other factions I may encounter.  If I join the Brotherhood, will there be other factions that I can't join? Are there any other factions that have such limitations?  Note: I'm still not very far into the game, and not very familiar with the Fallout 4 universe in general, so please make liberal use of spoiler markdown in your answers. Essentially, the only things that need to be un-spoilered are Yes/No answers for the questions asked above. Let G be a group, where $(ab)^3=(a^3)(b^3)$ and $(ab)^5=(a^5)(b^5)$. Prove that $G$ is abelian group.  Thank you in advance. Any help is appreciated. What is the Hilbert curve's equation?! How do they film continuous blood pooling? Any help with this problem is appreciated. It comes up in the context of Lusin's theorem, where it was assumed to be true.     Suppose $E$ is a closed subset of $\mathbb{R}$ and $f:E\rightarrow \mathbb{R}$ is continuous. There exists a continuous function $g: \mathbb{R} \rightarrow \mathbb{R}$ such that $f(x)=g(x)$ for $x \in E$ and $g$ satisfies $$\sup_{x \in \mathbb{R}} |g(x)| \leq \sup_{x \in E} |f(x)|\;.$$