ExamVeda
Login
Home
11
How many predefined variables does PHP use to authenticate a user?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
12
Which of the following variables does PHP use to authenticate a user?
1. $_SERVER[‘PHP_AUTH_USER’].
2. $_SERVER[‘PHP_AUTH_USERS’].
3. $_SERVER[‘PHP_AUTH_PU’].
4. $_SERVER[‘PHP_AUTH_PW’].
Discuss
Answer & Solution
Answer: Option C
Solution:
$_SERVER[‘PHP_AUTH_USER’] and $_SERVER[‘PHP_AUTH_PW’] store the username and password values, respectively.
13
Which of the following PHP function is commonly used when handling authentication via PHP?
1. header()
2. footer()
3. inset()
4. isset()
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
14
Which function is used to verify whether a variable contains a value?
Discuss
Answer & Solution
Answer: Option D
Solution:
The isset() function determines whether a variable has been assigned a value. Its prototype follows: boolean isset(mixed var [,mixed var [,…]]).
15
Which of the following are types of PHP authentication implementation methodologies?
1. Hard-coding a login pair directly into the script
2. File-based authentication
3. Data-based authentication
4. PEAR’S HTTP authentication
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
16
In which authentication method does changing the username or password can be done only by entering the code and making the manual adjustment.
Discuss
Answer & Solution
Answer: Option A
Solution:
This is one of the drawbacks of Hard-coding a login pair directly into the script.
17
The authentication File.txt, the file which stores username and password should be stored ________ the server document root.
Discuss
Answer & Solution
Answer: Option B
Solution:
f it is not stored outside, the attacker could discover the file through brute force guessing.
18
Which function is used to split a string into a series of substrings, with each string boundary is determined by a specific separator?
Discuss
Answer & Solution
Answer: Option C
Solution:
Although they are similar function, you should use explode() instead of split().In fact split() function has been deprecated altogether.
19
In which of the following situations does file-based authentication become inconvenient.
1. small list
2. large number of user
3. users are being regularly added
4. static authentication
Discuss
Answer & Solution
Answer: Option C
Solution:
Such requirements are better satisfied by implementing a database based solution.
20
Which is the most powerful authentication method among the four?
Discuss
Answer & Solution
Answer: Option C
Solution:
It not only enhances administrative convenience and scalability, but also can be integrated into a larger database infrastructure.