Skip navigation

Exploring the Symfony layout

Exploring the Symfony layout: Learning Symfony2 for PHP (2014)
Exploring the Symfony layout: Learning Symfony2 for PHP (2014)

Join for an in-depth discussion in this video Exploring the Symfony layout, part of Learning Symfony2 for PHP (2014).

Resume Transcript Auto-Scroll
Skill Level Intermediate
2h 4m
Show More Show Less

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.

Q: I specified the wrong database credentials and got an "Access denied for user" error from doctrine. How can I fix the database configuration?

A: The most likely cause is a typo or misconfiguration in the Symfony parameters file, which you can find at ./symfony/app/config/parameters.yml. This file is typically generated during installation using an interactive wizard.
Symfony requires read and write access to a MySQL database, and needs to know how to connect to the database. Therefore, you'll need to specify a username, password, port (if nonstandard), host, and database name. The credentials to your individual development environment are likely different than the ones used in the course; please use your best judgment in determining the correct values. After making a change, verify the configuration by using a web browser to navigate to /symfony/web/config.php, then click “Configure your Symfony Application online” at the bottom of the page.

Q: How can I configure PHP's time zone?

A: You'll need to edit PHP's configuration to specify a time zone. The Up and Running with Linux for PHP Developers PHP configuration can be modified by editing the custom configuration:
sudoedit /etc/php5/mods-available/custom.ini
If you have a different development environment, determine the location of your php.ini configuration file.  Specify a date.timezone, such as:
date.timezone = America/Los_Angeles
Then restart the server using:
sudo service apache2 restart
A full list of supported timezones can be found at

Continue Assessment

You started this assessment previously and didn't complete it. You can pick up where you left off, or start over.

Start My Free Month

Start your free month on LinkedIn Learning, which now features 100% of courses. Develop in-demand skills with access to thousands of expert-led courses on business, tech and creative topics.

Start My Free Month