Join Jon Peck for an in-depth discussion in this video The life cycle of a Symfony request, part of Learning Symfony2 for PHP (2014).
- [Voiceover] In this chapter,…we're going to start writing custom code to build a page…but before we can do that…we need to understand:…How Symfony handles requests from a client?…That way we'll know the why,…not just the how, of Symfony development.…HTTP transactions are made up of two actions:…a request, and a response.…A client, such as a web browser,…sends a request to a server.…A request is literally a plain text message…containing context about what information is desired.…These requests are sent to a server…and the browser waits for the response.…
Once the response is received…the browser renders the response.…On the other side,…the server interprets the request…and builds a response from the context of the request…that's sent back to the client.…The contents of the response can be in any arbitrary formats…such as HTML, XML, JSON, and so forth.…Symfony2 uses the core component HttpFoundation…to handle these requests and build the response.…HttpFoundation is an object-oriented layer…for the HTTP specification…
- Installing Symfony
- Creating a bundle from the console
- Customizing and generating database tables
- Generating controllers
- Creating, editing, and debugging entities
- Displaying and debugging a form
- Rendering content with templates
Skill Level Intermediate
Q: When trying to access the application, I receive an error stating "This script is only accessible from localhost." How can I get around this restriction?
A: The development front controller and configuration scripts are protected by default to only allow access from the localhost. Refer to the video titled “Exploring the Symfony layout” to see how to disable this security.