What is a major security concern when implementing the direct post method in payment gateways?

  • Cross-Site Scripting (XSS)
  • Data Interception
  • Man-in-the-Middle Attacks
  • Tokenization
The major security concern when implementing the direct post method is data interception, where sensitive information can be intercepted during transmission. This vulnerability must be addressed to ensure secure payment transactions.

Why is user input validation important in preventing SQL injection?

  • It enhances user experience
  • It ensures the correct syntax of SQL queries
  • It is not important in preventing SQL injection
  • It prevents attackers from accessing the server
User input validation is crucial in preventing SQL injection as it ensures that the input adheres to the expected data format, thereby preventing malicious input that could be used to manipulate SQL queries.

Which OAuth grant type is most suitable for a web application with a server backend?

  • Authorization Code
  • Client Credentials
  • Implicit
  • Resource Owner Password Credentials
The Authorization Code grant type is recommended for web applications with a server backend because it provides an additional layer of security by requiring the exchange of an authorization code for an access token.

To override a built-in Helper in CodeIgniter, place the custom Helper in the ________ directory.

  • Application
  • Custom
  • Override
  • System
To override a built-in Helper, place the custom Helper in the application/helpers directory, which takes precedence over the system directory.

What is the significance of the 'ENVIRONMENT' constant in CodeIgniter's index.php file?

  • Configuring the database connection
  • Defining the application environment
  • Enabling or disabling debugging features
  • Setting the PHP error reporting level
The 'ENVIRONMENT' constant in CodeIgniter's index.php file is used to define the application environment. It allows you to set whether the application is in development, testing, or production mode. This, in turn, determines the level of error reporting and various debugging features.

The principle of ________ in exception handling recommends catching exceptions as close as possible to where they occur.

  • Contiguity
  • Immediacy
  • Locality
  • Proximity
The principle of locality in exception handling recommends catching exceptions as close as possible to where they occur. This practice enhances code readability and simplifies debugging.

Which CodeIgniter configuration option determines the number of items displayed per page in pagination?

  • per_page
  • display_items
  • pagination_limit
  • items_per_page
The correct option is per_page. This configuration option in CodeIgniter specifies the number of items to be displayed per page in pagination. It is used to control the pagination behavior and limit the number of records shown on each page.

________ ensures that migrations are applied in the correct order and keeps track of the current schema state.

  • $this->db->current_schema()
  • $this->db->migrate()
  • $this->db->set_schema_version()
  • $this->db->version()
In CodeIgniter, $this->db->current_schema() ensures that migrations are applied in the correct order and keeps track of the current schema state.

In a scenario where a CodeIgniter application is failing randomly, a unit test should focus on ________ to identify potential issues.

  • CodeIgniter core files
  • External APIs
  • Frequently accessed database queries
  • Random input data
When an application fails randomly, the unit test should focus on external APIs to identify potential issues related to data retrieval or communication problems.

To create a custom library in CodeIgniter, the class file must be placed in the ________ directory.

  • application/config
  • application/core
  • application/helpers
  • application/libraries
In CodeIgniter, custom libraries should be placed in the 'application/libraries' directory. This is the default location where CodeIgniter looks for user-created libraries. Placing it elsewhere may lead to issues in loading the library.