PHP Security | PHP Questions

Que. What is the default value of max_execution_time directive? This directive specifies how many seconds a script can execute before being terminated.
a. 20
b. 30
c. 40
d. 10
Answer: 30


Que. 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?
a. open_dir = “/home/www/”
b. open_basedir = “/home/www/”
c. open_basedir = /home/www/
d. open_dir = /home/www/
Answer: open_basedir = “/home/www/”


Que. The memory_limit is only applicable if _______ is enabled when you configure PHP. Fill in the blank.
a. -memory-limit
b. –enable-memory-limit
c. -enable-memory-limit
d. –enable-limit
Answer: –enable-memory-limit


Que. Which one of the following statements should be used to disable the use of two classes administrator and janitor?
a. disable_classes = “administrator, janitor”
b. disable_class = class “administrator”, class “janitor”
c. disable_classes = class “administrator”, class “janitor”
d. disable_classes = class administrator, class janitor
Answer: disable_classes = “administrator, janitor”


Que. Which one of the following statements should be used to disable just the fopen(), and file() functions?
a. disable_functions = fopen(), file()
b. disable_functions = fopen, file
c. functions_disable = fopen, file
d. functions_disable = fopen(), file()


disable_functions = fopen, file


Comments