SESSION HANDLING IN PHP MCQ
- When a session ia active, PHP provides a special constant called
- If you want PHP to transparently handle passing session variables for you when cookies are not available, you have to configure
- A special kind of a file that is located in filesystem of your browser and can be read and write from web server, is calls as
- Using $_SESSION, $HTTP_SESSION_VARS functions can be dangerous, so that you can use
- In PHP, cookies are set by using the
- www-authenticate mechanism works only under the
- What kind of session will maintain its identity as long as user stays within a site?
- A period of time during which a particular person, views a number of web pages at a particular machine is called as
- A function that takes no argument s and return a string, which is unique key corresponding to a particular session
- Name, value, expire, patrh, httponly, domain, secure all of these are arguments of
- To initiate a session which function is used?
- If you want to free all variables in a session, which function you can use
- Which PHP function offers to send raw arbitrary HTTP headers?
- PHP is not configured to transparently pass session IDs in the
- $_SESSION array is one of superglobal variables introduced in
- When value of sessionauto_start ( ) function is zero it means that
- Session_unset ( ) takes
- HTTP protocols by which browsers talk to a web server is
- Meaning of superglobal arrays is it can be
- Secure ( ) argument in setcookie function returns result
- In PHP4.1 and later versions, cookies name/value pair are added to the
- Php.ini file can be viewable by calling
- Which two predefined variables are used to retrieve information from forms?
- The attack which involves the insertion of malicious code into a page frequented by other users is known as
- When you use the $_GET variable to collect data, the data is visible to
- When you use the $_POST variable to collect data, the data is visible to
- Which variable is used to collect form data sent with both the GET and POST methods?
- Which one of the following should not be used while sending passwords or other sensitive information?
- Which function is used to remove all HTML tags from a string passed to a form?
- What will be the value of the variable $input in the following PHP code?
- To validate an email address, which flag is to be passed to the function filter_var()?
- How many validation filters like FILTER_VALIDATE_EMAIL are currently available?
- How many predefined variables does PHP use to authenticate a user?
- Which of the following variables does PHP use to authenticate a user?
- Which of the following PHP function is commonly used when handling authentication via PHP?
- Which function is used to verify whether a variable contains a value?
- Which of the following are types of PHP authentication implementation methodologies?
- In which authentication method does changing the username or password can be done only by entering the code and making the manual adjustment
- The authenticationFile.txt, the file which stores username and password should be stored ___ the server document root
- Which function is used to split a string into a series of substrings, with each string boundary is determined by a specific separator?
- In which of the following situations does file-based authentication become inconvenient
- Which is the most powerful authentication method among the four?
- Which directive determines whether PHP scripts on the server can accept file uploads?
- Which of the following directive determines the maximum amount of time that a PHP script will spend attempting to parse input before registering a fatal error?
- What is the default value of max_input_time directive?
- Since which version of PHP was the directive max_file_limit available
- What is the default value of the directive max_file_limit?
- Which directive sets a maximum allowable amount of memory in megabytes that a script can allow?
- If you want to temporarily store uploaded files in the /tmp/phpuploads/ directory, which one of the following statement will you use?
- Which superglobal stores a variety of information pertinent to a file uploaded to the server via a PHP script?
- How many items are available in the $_FILES array?
- Which function is used to determine whether a file was uploaded?
- What is the full form of DNS?
- Which one of the following function checks for the existence of DNS records?
- Which one of the following function is used to return an array consisting of various DNS resource records pertinent to a specific domain?
- Which one of the following function is used to retrieve the MX records for the domain specified by hostname?
- What is the default port number of HTTPs?
- Which one of the following function returns the port number of a specified service?
- Which one of the following statements can be used to establish port 80 connection with www.nachi.com?
- Which one of the following function is used to send an email using PHP script?
- How many configuration directives pertinent to PHP’s mail function are available?
- Which of the following statements is used to add an attachment to the mail?
- Which one of the following is the very first task executed by a session enabled page?
- How many ways can a session data be stored?
- Which directive determines how the session information will be stored?
- Which one of the following is the default PHP session name?
- If session.use_cookie is set to 0, this results in use of
- If the directive session.cookie_lifetime is set to 3600, the cookie will live until
- Neglecting to set which of the following cookie will result in the cookie’s domain being set to the host name of the server which generated it
- What is the default number of seconds that cached session pages are made available before the new pages are created?
- What is the default time(in seconds) for which session data is considered valid?
- Which one of the following function is used to start a session?
- Which function is used to erase all session variables stored in the current session?
- What will the function session_id() return is no parameter is passed?
- Which one of the following statements should you use to set the session username to Nachi?
- What will be the output of the following PHP code? Say your previous session username was nachi
- An attacker somehow obtains an unsuspecting user’s SID and then using it to impersonate the user in order to gain potentially sensitive information. This attack is known as
- Which parameter determines whether the old session file will also be deleted when the session ID is regenerated?
- Which function effectively deletes all sessions that have expired?
- Which function is used to transform PHP’s session-handler behavior into that defined by your custom handler?
- The session_start() function must appear
- What is the return type of session_set_save_handler() function?
- Which one of the following statements should be used to disable just the fopen(), and file() functions?
- Which one of the following statements should be used to disable the use of two classes administrator and janitor?
- What is the default value of max_execution_time directive? This directive specifies how many seconds a script can execute before being terminated
- The memory_limit is only applicable if ___ is enabled when you configure PHP. Fill in the blank
- 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?
- Which Apache directive outputs Apache’s server version, server name, port and compile-in modules?
- Which directive determines which degree of server details is provided if the ServerSignature directive is enabled?
- Which directive should we disable to obscure the fact that PHP is being used on our server?
- 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?
- The developers of PHP deprecated the safe mode feature as of which PHP version
(d).All of them
need an explanation for this answer? contact us directly to get an explanation for this answer