Php Exam Questions

Hey,

First time on this forum, so “Hi” everyone. I’m currently studying web development. I’m struggling with a past exam paper and was wondering if anyone can help with the answers to the below questions…

Question - HTTP is a stateless protocol but to get any more than trivial web sites, the state of the interaction between client and server must be remembered between server requests.

(a) Outline how PHP manages sessions.

(b) The PHP session management is not the only solution; ASP.NET passes the state on the get string indicate how this is achieved and whether it can be replicated securely in PHP.

© Coldfusion is an Adobe product used to write complex, Java based, dynamic web sites. It defines 3 levels of “state” variables

  1. Application variables – these have currency over the whole application and store values over the whole application.
  2. Client variables – these store data that relate to the client and used to hold data between sessions.
  3. Session variables that hold data relevant to the session.

How can PHP mirror the use of Application and Client variables 3 levels of state variables.

(d) Evaluate the advantages and disadvantages of the PHP method of session management as opposed to ASP.NET (4 Marks)

Any advice on the above would be much appreciated.

Regards
Stephen

What are you struggling with answering? I feel this is a perfect example of questions that you aren’t supposed to have answered - you’re supposed to find the answers. By comparing and analysing how different systems work, and how they differ is really up to you to explore.

On topic I suggest you look into these questions with a critical mindset. ASP.net and PHP both use cookie based sessions by default, and both support cookieless sessions as well…

I’d also give an extra point if you wrote some thoughts about what the difference is between storing variables in the session in contrast to storing them in cookies. And how passing any kind of valuable data in a get param could be a security problem.

Sponsor our Newsletter | Privacy Policy | Terms of Service