473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

What is the point of having a SQL password for a non-root user?

45 32bit
Given that we use code like the following:

Expand|Select|Wrap|Line Numbers
  1.  <?php
  2. session_start();
  3. $DATABASE_HOST = 'localhost';
  4. $DATABASE_USER = 'user';
  5. $DATABASE_PASS = 'password';
  6. $DATABASE_NAME = 'library';
  7.  
What is the point of the password, if we can see the password in the PHP code, considering that its trivial
to download the PHP script from the server? It seems rather pointless to me.
Feb 21 '21 #1

✓ answered by Dormilich

as is the case with javascript
And that's where you're mistaken. PHP code is executed on the server (that's why it's referred to as a server-side language), not on the client/browser.

4 2727
Dormilich
8,658 Expert Mod 8TB
considering that its trivial to download the PHP script from the server?
Well, the point of PHP code is to be executed, not downloaded. Unless of course your web server is misconfigured.
Feb 22 '21 #2
bakertaylor28
45 32bit
But correct me if I'm wrong, but, as is the case with javascript, etc. since the browser must be able to send a GET for the php code, restricting a php directory and then attempting to call the script in a document in a non-restricted directory will cause a 403 response in the server.
Feb 22 '21 #3
Dormilich
8,658 Expert Mod 8TB
as is the case with javascript
And that's where you're mistaken. PHP code is executed on the server (that's why it's referred to as a server-side language), not on the client/browser.
Feb 24 '21 #4
bakertaylor28
45 32bit
That would explain things- Though, I was under the impression that where you use an include in PHP that it was similar to header- in that the client still had to send a "GET" in order to get the include. Though, I can see, after some experimentation of sorts, that with server side languages that this is not the case.
Feb 25 '21 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: CM | last post by:
Hi, There: I am working on a commercial ASP web application which use MS Access 2000 as database. When configuring the database access, I got an error saying that this database is a read-only...
0
by: George Chorny | last post by:
Hello, I'm sure may are familiar with the following error. Getting it while trying to change the password from w/in the db2 client? Running IBM DB 8.2 Fixpack8 SLES8/2.4 moving to SLES9/2.6.5 ...
2
by: aj | last post by:
DB2 WSE 8.1 FP5 Linux Red Hat 2.1 AS I am using a new more secure password for my instance owner account, one which has an exclamation point in it. Using CC, when I try to import or export or...
3
by: jimfortune | last post by:
At what point is a Form added to the Forms collection or a Report added to the Report collection? I.e., listed as currently open. The reason I ask is that I have a subreport for an exclusive...
2
by: underground | last post by:
Hi, everyone I've been trying to figure out a way for a user to update there information. I'm using sections to identify the specific user..Here is the form <? include("include/session.php");...
1
by: shri124 | last post by:
please help me what is the difference between user controls and custom controls?
2
by: afromanam | last post by:
Hello, I need to link some tables (which are in DB1) to another database (DB2). But DB1 is password protected. Please let me say this clearly: 1. DB1 does NOT have a database security...
0
by: Joseph Geretz | last post by:
At what point in the application lifecycle should a filter be applied to the Request / Response objects? Should this be done at the start of each transaction? This would make sense if a new Request...
8
matheussousuke
by: matheussousuke | last post by:
I have a password like this *9W0C5CB2A08313B8A04E63A80F1E6F01F3LK3876 on my database, I'm currenlty working on a script that changes the admin password and send it for the admin e-mail, but...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.