JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech IV Year PHP PROGRAMMING Previous Question Paper (December - 2020 - R16)

B.Tech | IV Year | II Semester | R16 | December - 2020

Answer PaperPaper Code: 138GQMaximum Marks: 75Time: 2 Hours

Answer any Five Questions. All Questions Carry Equal Marks.

Main

1

Explain the features and advantages of Apache Web Server.

15 marks

Answer

The Apache HTTP Server is an open-source, cross-platform web server software that plays a fundamental role in the LAMP (Linux, Apache, MySQL, PHP) stack. It is highly regarded for its stability, security, and flexibility in serving web content.

Key Features:

  • Modular Architecture: Apache uses a modular design, allowing administrators to load or unload functionality (such as SSL/TLS, URL rewriting, or authentication) dynamically using modules without recompiling the core server.
  • Cross-Platform Support: It runs seamlessly on various operating systems, including Linux, Unix, Windows, and macOS.
  • Virtual Hosting: Apache supports both IP-based and name-based virtual hosting, enabling a single server instance to host multiple websites or domains simultaneously.
  • Configuration via .htaccess: It allows directory-level configuration using .htaccess files, providing granular control over server settings for specific directories without requiring access to the main server configuration file.
  • Robust Security: It includes built-in features for user authentication, access control, and SSL/TLS encryption, making it suitable for secure web applications.
  • Scalability: Through Multi-Processing Modules (MPMs), Apache can be tuned for different traffic patterns, utilizing either process-based or thread-based request handling.

Advantages:

  • Open Source and Free: Being free to use and distribute, it is highly cost-effective for both small projects and large-scale enterprise deployments.
  • Community Support: Due to its long history and widespread adoption, there is extensive documentation, active community forums, and a vast library of third-party modules available.
  • Compatibility: It is highly compatible with PHP, making it the standard choice for executing PHP-based web applications.
  • Reliability: Apache is battle-tested and known for its ability to handle high traffic loads reliably, maintaining uptime even under complex configurations.
  • Customizability: The ability to tailor the server behavior to specific application needs via its configuration directives makes it highly versatile for developers.
2

Demonstrate all the looping statements in PHP with suitable examples.

15 marks

Answer

PHP provides four primary looping structures used to execute a block of code repeatedly based on specific conditions. These are the while, do-while, for, and foreach loops.

  1. while loop: Executes a block of code as long as the specified condition is true. The condition is checked before the loop body executes.
    $i = 1; while($i <= 5) { echo $i; $i++; }
  2. do-while loop: Similar to the while loop, but it guarantees that the code block executes at least once because the condition is evaluated after the loop body.
    $i = 1; do { echo $i; $i++; } while($i <= 5);
  3. for loop: Used when the number of iterations is known in advance. It combines initialization, condition, and increment/decrement in a single line.
    for($i = 1; $i <= 5; $i++) { echo $i; }
  4. foreach loop: Specifically designed to iterate over arrays or objects. It is the most efficient way to access every element in an array.
    $colors = array('Red', 'Green', 'Blue'); foreach($colors as $value) { echo $value; }
315 marks
a

Explain about Dynamic parameters in PHP functions.

7 marks

Answer

Sign in to view the complete answer paper.

b

Differentiate between call by value and call by reference in PHP.

8 marks

Answer

Sign in to view the complete answer paper.

4

How to search a specific word in PHP file and replace with a new word.

15 marks

Answer

Sign in to view the complete answer paper.

5

Write a PHP script which takes the username, password and e-mail values from as input from user and checks whether the user has filled the textboxes or not. Also, check the e-mail field whether it is valid or not.

15 marks

Answer

Sign in to view the complete answer paper.

6

Explain about session Http management with suitable example.

15 marks

Answer

Sign in to view the complete answer paper.

7

How to destroy cookies and sessions in PHP? Explain in detail.

15 marks

Answer

Sign in to view the complete answer paper.

8

How to create a table in MySQL? Explain the process of connecting PHP with MySQL?

15 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of PHP PROGRAMMING from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech ECE IV Year II Semester, December - 2020, R16.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in PHP PROGRAMMING

Loading Question Papers

Fetching data from database...