Home > PHP & Programming > Quizzes > PHP Programming Basics Practice Test: Website Security using PHP
PHP Programming Basics Practice Test: Website Security using PHP
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 0% Most missed: “Which one of the following statements should be used to disable the use of two c…”
Here are some ways to secure a website using PHP: Input validation: Identify all input sources, such as URLs, cookies, forms, and headers, and validate and sanitize them. Escape and encode output: Prevent cross-site scripting (XSS) attacks by escaping and encoding output before displaying it. Whitelist validation: Only allow known-safe inputs. Set length limits: Set reasonable length limits for input fields. Monitor user input: Log and monitor user input for potential attack attempts. Use secure password hashing: Use a cryptographic algorithm to transform passwords into a different form... Show more
PHP Programming Basics Practice Test: Website Security using PHP
Time left 00:00
10 Questions

1. The developers of PHP deprecated the safe mode feature as of which PHP version.
2. The memory_limit is only applicable if ________ is enabled when you configure PHP.
3. Which directive determines which degree of server details is provided if the ServerSignature directive is enabled?
4. 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?
5. 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?
6. Which one of the following statements should be used to disable just the fopen(), and file() functions?
7. Which one of the following statements should be used to disable the use of two classes administrator and janitor?
8. Which directive should we disable to obscure the fact that PHP is being used on our server?
9. What is the default value of max_execution_time directive? This directive specifies how many seconds a script can execute before being terminated.
10. Which Apache directive outputs Apache’s server version, server name, port and compile-in modules?