Website Security - Study Mode

[#1] Which one of the following statements should be used to disable just the fopen(), and file() functions?
Correct Answer

(B) disable_functions = fopen, file

Explanation

Solution: You can set disable_functions equal to a comma-delimited list of function names that you want to disable.

[#2] Which one of the following statements should be used to disable the use of two classes administrator and janitor?
Correct Answer

(A) disable_classes = “administrator, janitor”

Explanation

Solution: There may be classes inside the libraries that you’d rather not make available. You can prevent the use of these classes with the disable_classes directive.

[#3] What is the default value of max_execution_time directive? This directive specifies how many seconds a script can execute before being terminated.
Correct Answer

(C) 30

Explanation

Solution: This can be useful to prevent users’ scripts from consuming too much CPU time. If max_execution_time is set to 0, no time limit will be set.

[#4] The memory_limit is only applicable if _______ is enabled when you configure PHP. Fill in the blank.
Correct Answer

(C) –enable-memory-limit

Explanation

Solution: This directive specifies, in megabytes, how much memory a script can use. Default value: 128M.

[#5] Suppose all web material is located within the directory /home/www. To prevent users from viewing and manipulating files such as /etc/password, which one of the following statements should you use?
Correct Answer

(D) open_basedir = “/home/www/”