Skip navigation
Uploading files: Up and Running with Symfony2 for PHP (2014)
Uploading files: Up and Running with Symfony2 for PHP (2014)

Join for an in-depth discussion in this video Uploading files, part of Up and Running with Symfony2 for PHP (2014).

Resume Transcript Auto-Scroll
Author
Skill Level Intermediate
2h 4m
Duration
134,437
Views
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 http://php.net/manual/en/timezones.php.
 

Continue Assessment

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

Start Your Free Trial Now

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now