Php Website Security(Engineering > Computer Science And Engineering > Php ) Questions and Answers
Question 1. What is the default value of max_execution_time directive? This directive specifies how many seconds a script can execute before being terminated.
30
40
10
20
Explanation:-
Answer: Option A. -> 30
Question 2. Which one of the following statements should be used to disable just the fopen(), and file() functions?
functions_disable = fopen, file
functions_disable = fopen(), file()
disable_functions = fopen, file
disable_functions = fopen(), file()
Explanation:-
Answer: Option C. -> disable_functions = fopen, file
Question 3. The memory_limit is only applicable if _______ is enabled when you configure PHP. Fill in the blank.
–enable-memory-limit
-enable-memory-limit
-memory-limit
–enable-limit
Explanation:-
Answer: Option A. -> –enable-memory-limit
Question 4. Which one of the following statements should be used to disable the use of two classes administrator and janitor?
disable_classes = class administrator, class janitor
disable_class = class “administrator”, class “janitor”
disable_classes = class “administrator”, class “janitor”
disable_classes = “administrator, janitor”
Explanation:-
Answer: Option D. -> disable_classes = “administrator, janitor”
Question 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?
open_dir = “/home/www/”
open_basedir = “/home/www/”
open_basedir = /home/www/
open_dir = /home/www/
Explanation:-
Answer: Option B. -> open_basedir = “/home/www/”
Question 6. Which directive should we disable to obscure the fact that PHP is being used on our server?
info_php
print_php
expose_php
show_php
Explanation:-
Answer: Option C. -> expose_php
Question 7. The developers of PHP deprecated the safe mode feature as of which PHP version.
PHP 5.2.0
PHP 5.3.0
PHP 5.1.0
PHP 5.3.1
Explanation:-
Answer: Option B. -> PHP 5.3.0
Question 8. Which Apache directive outputs Apache’s server version, server name, port and compile-in modules?
ServerDetails
ServerName
ServerSignature
ServerInfo
Explanation:-
Answer: Option C. -> ServerSignature
Question 9. Say I want to change the extension of a PHP file, which of the following statements should I edit to change from .php to .html in the httpd.conf file?
AddType application/x-httpd-php .asp
AddType application/x-httpd-php .php
AddType application/x-httpd-asp .asp
AddType application/x-httpd-asp .php
Explanation:-
Answer: Option B. -> AddType application/x-httpd-php .php
Question 10. Which directive determines which degree of server details is provided if the ServerSignature directive is enabled?