Well hey guys! You know what? I'm pumped that you're learning Symfony, because it's the hardest framework ever! Relax, I'm kidding. Symfony does have a reputation for being tough to learn, but this is a trap! Or at least, it's an outdated idea.

Look: Symfony can be incredibly simple and will put you in a position to write powerful, well-designed code, whether it's for an API or a traditional web app. And when it does get a bit more difficult, it's usually because you're learning best practices and object oriented goodness that's turning you into a better developer.

Symfony Components & Framework

So what is Symfony anyways? First, it's a set of components: meaning PHP libraries. Actually, it's about 30 small libraries. That means that you could use Symfony in your non-Symfony project today by using one of its little libraries. One of my favorites is called Finder: it's really good at searching deep into directories for files.

But Symfony is also a framework where we've taken all of those components and glued them together for so that you can get things done faster. This series is all about doing amazing things with the Symfony framework.

The Symfony Installer

Let's get our first Symfony project rolling. Head over to Symfony.com and click 'Download'. Our first task is to get the Symfony Installer. Depending on your system, this means running commands from one of these boxes. Since I'm on a mac, I'll copy the curl command and paste it into the terminal:

sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony

Copy the second command and run that to adjust some permissions:

sudo chmod a+x /usr/local/bin/symfony

This gives us a new symfony executable:

symfony

But hold on! This is not Symfony, it's the Symfony Installer: a tiny utility that makes it really easy to start new Symfony projects.

Downloading the Project

Let's start one! Run symfony new and then the name of the project. Call the project aqua_note:

symfony new aqua_note

I'll tell you more about it soon. In the background this is downloading a new Symfony project, unzipping it, making sure your system is configured, warning you of any problems and then dropping the new files into this aqua_note directory. Not bad!

Tip

The project name - aqua_note - is only used to determine the directory name: it's not important at all afterwards.

Move into the directory and check it out.

cd aqua_note
ls

This is also not Symfony: it's just a set of files and directories that form a web app that use the Symfony libraries. Those libraries - along with other third-party code - live in the vendor/ directory.

Before I explain the other directories, let's get this thing working! Run:

php bin/console server:run

to start the built in PHP web server. Yes, you can also use Nginx or Apache: but this is much easier for development. When you're done later, just hit ctrl+c to stop the server.

As the comment says here, go to http://localhost:8000 in your browser. And boom! Congrats! This is your first page being executed by the Symfony framework. That's right: this is being rendered dynamically from the files inside of your project. At the bottom, you'll see one of the best features of Symfony: the web debug toolbar. This is full of debugging information - more on that later.

Ok, let's start building our own pages!

Leave a comment!

  • 2016-11-17 Victor Bocharsky

    Great! Happy coding! :)

    Cheers!

  • 2016-11-17 Nobuyuki Fujioka

    Hi, Victor

    Thank you very much. With the reinstall command you gave me, there is no more issue.

    Kind regards,
    Noby

  • 2016-11-17 Victor Bocharsky

    Hey, it's the well known issue, just try to install intl extension from source: brew reinstall --build-from-source php70-intl . Here's a link for more info: https://github.com/Homebrew/ho...

    Cheers!

  • 2016-11-17 Nobuyuki Fujioka

    Hi, Ryan

    Everything is working except for I get these errors.
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php70-intl/intl.so' - dlopen(/usr/local/opt/php70-intl/intl.so, 9): Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.57.dylib
    Referenced from: /usr/local/opt/php70-intl/intl.so
    Reason: image not found in Unknown on line 0

    Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php70-intl/intl.so' - dlopen(/usr/local/opt/php70-intl/intl.so, 9): Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.57.dylib
    Referenced from: /usr/local/opt/php70-intl/intl.so
    Reason: image not found in Unknown on line 0
    PHP 7.0.12 (cli) (built: Oct 14 2016 09:55:03) ( NTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.12, Copyright (c) 1999-2016, by Zend Technologies

    They are already installed.

    Any suggestion to make these errors go away?

    Thank you,
    Noby

  • 2016-11-04 weaverryan

    Sweet! Keep up the good work!

  • 2016-11-04 Nobuyuki Fujioka

    Yo Ryan!

    Thank you very much. It is now working with php7. all installed.

    Cheers,
    Noby

  • 2016-11-04 weaverryan

    Yo Noby!

    Ah, great! So, change both of those commands to be homebrew/php/php70-intl and homebrew/php/php70-opcache - each version of PHP has its own package name for the extensions. So, I think when you ran these commands, you basically installed php 5.6, and so then it told you to "unlink" (basically, stop using) PHP 7 and use php 5.6 instead. That's not a big deal, but if you want to use php 7, then I would re-install it via brew :).

    About the date.timezone warning, this is a classic first-time setup thing in PHP! It's annoying, but easy to fix:

    1) Locate your php.ini file. You can do this by running this command:


    php --ini

    Look for the path next to "Loaded Configuration File" - mine is /usr/local/etc/php/5.6/php.ini

    2) Open this file, find the date.timezone setting, uncomment it (remove the ; at the beginning if there is one) and set it to your timezone, or UTC. Examples:


    date.timezone = America/New_York
    ; or
    date.timezone = UTC

    Here's the list of valid timezones: http://php.net/manual/en/timez...

    3) If you have the bin/console server:run command running, press cmd+c to stop it, then run the command again. This basically "restarts" your web server :).

    Cheers!

  • 2016-11-04 Nobuyuki Fujioka

    Hi, Weaverryan
    Thank you for your explanation.
    1. I have PHP70 in brew.
    I tried below.
    brew install homebrew/php/php56-intl
    brew install homebrew/php/php56-opcache
    But, they did not let me and told me to
    brew unlink php70
    So, I did. But, now I get the below error.
    [Symfony\Component\Debug\Exception\ContextErrorException]
    Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezon
    e setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you m
    ost likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezon
    e.

    Now I canot run the server anymore...
    What is the issue now? Your help is highly appreciated.

    2. I signed up for your course. So, I guess I will learn how to connect it with database soon.

    Regards,
    Noby

  • 2016-11-04 weaverryan

    Hey Nobuyuki!

    Yea, good questions!

    1) So, both the intl extension and a PHP accelerator (you should use opcache) are both good ideas :). *How* you install those... depends on how you installed PHP. I recommend installing PHP in a Mac with Homebrew. In that case, installing these extensions (once php is installed) is really easy! (The exact command will vary based on what version of PHP you choose to install):

    brew install homebrew/php/php56-intl
    brew install homebrew/php/php56-opcache

    Let me know if that helps! It won't kill you not to have them... well, probably not :). Opcache just makes things run faster (yay!) and intl is used inside certain parts of the form component for internationalization (so, if you don't use that functionality you're ok, but if you do, you'll need it).

    2) There is no database automatically created when you create your app. This is true for both the Symfony installer and installing via Composer. Symfony *does* come with some configuration (in app/config/parameters.yml) to connect to a database... but it's your responsible to create it (I usually do this through Symfony, with bin/console doctrine:database:create). When you install via Composer, what you're seeing is *not* Symfony trying to create your database. Instead, it is simply asking you what database configuration you'd like. It uses this information to create the parameters.yml file. More info here: http://knpuniversity.com/scree...

    Let me know if that helps! And welcome :)

  • 2016-11-03 Nobuyuki Fujioka

    Hi,

    I have below questions regarding the installation - I am on Mac. and Installation is done by the symfony installer.

    1. when I create a new symfony app, everything works fine, but when I go to localhost:8000/config.php, I get recommendations as below.

    To enhance your Symfony experience, it’s recommended that you fix the following:
    intl extension should be available
    Install and enable the intl extension (used for validators).
    a PHP accelerator should be installed
    Install and/or enable a PHP accelerator (highly recommended).

    Why do I get these? and is it important to fix these issues?

    2. The installer does not ask about database (as opposed to installing it via composer).
    Is a database automatically created when I create an app?

    Thank you for your help.

  • 2016-11-02 Victor Bocharsky

    Yes, this is it! You got it right ;)

  • 2016-11-01 Terry Caliendo

    Thanks Guys... Just to be fully clear, is this is what Victor is suggesting I do?

    class MySpecialUtilities
    {

    private $requestStack;

    public function __construct(RequestStack $requestStack){

    $this->requestStack = $requestStack;
    }

    public function SpecialService()
    {
    $request = $this->requestStack->getCurrentRequest();
    $session = $request->getSession();
    /// start using $request here...
    }

    }

  • 2016-11-01 weaverryan

    Great job Terry! Victor is right about storing the $requestStack - the reasons are subtle so don't over-think that part.

    Overall, being in the framework is great... because you don't have to setup stuff your self! About your question:

    > What is Symfony doing differently when it creates the Request object?

    Actually, not much. In fact, the Request object is created in your web/app_dev.php (or web/app.php) file... which is technically your's to edit. And you'll see that it is created the same way you did, with createFromGlobals. The Session is created as a normal service by Symfony (i.e. just like the templating service, logger service, etc). Then, via an event listener (https://knpuniversity.com/scre..., when your app boots, it sets the Session on the Request. This whole setup is quite rare in Symfony: usually Symfony just has services, I can't think of another time that one is added to another like this via a listener.

    Keep up the good work!

  • 2016-11-01 Victor Bocharsky

    Hey Terry,

    You better store whole RequestStack object to the $requestStack property in a constructor and postpone getting current request inside methods - otherwise it could cause some errors.

    Cheers!

  • 2016-10-31 Terry Caliendo

    Also, before your reply as I was trying to understand, I created the request object

    $request = Request::createFromGlobals();

    I was not able to get the session from this request object.


    $session=$request->getSession();

    It returned Null, which I see in the documentation that it can return a "SessionInterface" or Null.

    "createFromGlobals" documentation says it creates the Request object from PHP's superglobals. PHP's superglobals contains stuff like $_REQUEST and $_SERVER which should have the information to set up the session.

    So when Symfony sets up the Request object it contains a session that you can retrieve, but when using the code above it does not include as session and returns Null.

    What is Symphony doing differently when it creates the Request object?

  • 2016-10-31 Terry Caliendo

    Thanks for clearing that up! That helps!

    Also I I ended up needing the request in a service as well. I found this article which is old but seems to indicate to inject the @request_stack as the request object isn't a "service": http://symfony.com/blog/new-in...

    Services YML:
    ============

        app.MySpecialUtilities:
    class: AppBundle\Service\MySpecialUtilities
    arguments: ['@request_stack']

    MySpecialUtilities
    ================

    class MySpecialUtilities
    {

    private $request;
    private $session;

    public function __construct(RequestStack $requeststack){

    $this->request = $requeststack->getCurrentRequest();
    $this->session = $this->request->getSession();}

    public function SpecialService()
    {my special code here}

    }

    Is this how you would suggest I do this?

  • 2016-10-31 Victor Bocharsky

    Ah, that was in Components section. Check this one https://symfony.com/doc/curren... .

    Well, you can get Session object from Request, but I think better to inject the `session` service into your custom service if you don't use Request in it at all.

    I just use pre and code tags: check this docs page Syntax highlighting

    Cheers!

  • 2016-10-31 weaverryan

    Oh, and about the pretty code (I made your original comment pretty), you need to surround your code with:

    <code><pre>
    echo 'cool'!
    </code></pre>

    It's kind of a pain to type, but it looks great (escaped the tags above you so you could actually see the raw HTML) :).

  • 2016-10-31 weaverryan

    Hey Terry!

    Ok, you're tripping up over something that's (unfortunately) a bit common :). Symfony is 2 things. First, it's a bunch of small libraries (called components). You can use each of these components from outside of a Symfony project. Second, Symfony is a framework: where it takes all of those libraries and glues them together for you.

    What you're reading is in the *components* section of the docs, where it's basically teaching you how you would use Symfony's session if you were installing it manually outside of a Symfony project. I know it's confusing - we have the challenge on the docs of talking to 2 different audiences: those using the Symfony framework, and those using the components standalone. As a rule of thumb, stay out of the components docs. Or, at least, realize that they will tell you how to instantiate certain objects that Symfony simply sets up for you when you're in the framework.

    Specifically in this case, Symfony sets up the Session object *for* you, so you never need to create it new. Instead, you just need to go find it. As Victor's code shows, there are actually 2 different ways to get the Session: there is a service called session, or, if you have the Request object, you can call $request->getSession(). If you need to access the session from a service, I would inject the @session service into its constructor (just like you would with any other service).

    Other than finding out *where* the Session lives, we don't talk about it much because it's super easy :). It basically has get/set/remove methods - it's kind of a glorified array: just get/set stuff on it and it works.

    Let me know if this clears it all up! I can totally understand why it was confusing :).

    Cheers!

  • 2016-10-31 Terry Caliendo

    Thanks for the response. I'm still a bit confused... I thought I was using symfony's built-in service, per this documentation. https://symfony.com/doc/curren...

    Is what you are doing the same thing, but just a short cut from inside the controller?

    I forgot to add that I need access to the session from outside the controller in a Service. Is that when I'd use this line: $session = $request->getSession();

    Thanks,
    tc

    Also... how did you get that code you pasted to show up so nicely?!

  • 2016-10-31 Victor Bocharsky

    Hey Terry,

    Better do not handle session manually - Symfony has built-in service for it. To get it in your controller just do:


    class DefaultController extends Controller
    {
    public function indexAction(Request $request)
    {
    $session = $this->get('session');
    // or get session object from current request
    $session = $request->getSession();

    dump($session->get('name'));
    $session->set('name', 'Drak');
    }
    }

    It should work well!

    Cheers!

  • 2016-10-31 Terry Caliendo

    I'm also a little confused on the session type above and the session available in a request (ie forms). Are they tied together? Or are they separate?

  • 2016-10-31 Terry Caliendo

    Not sure where to ask this but do you have a tutorial on sessions in symfony? Specifically I'm annoyed that, from a controller, I have to call two lines to set/get a variable:


    $session = new Session();
    $session->set('name', 'Drak');

    It doesn't work for me if I leave out the first line as I get an error that $session is an undefined variable.

    It looks like I can set up a constructor in each controller that sets a property for the controller to access?


    private $session;
    public function __construct(){
    $this->session = new Session();
    }

    Then in my controller:


    /**
    * @Route("/", name="homepage")
    */
    public function homeAction()
    {
    echo $this->session->get('name');
    }

    Is this poor coding? (are we not supposed to use constructors in controller classes for some reason?)

    Also Is there any way to set up a global variable that's accessible to all my controllers so I don't have to do this work in all of them?

  • 2016-09-21 weaverryan

    Hi Pablo!

    Well, I'm happy you got it working, even if it meant leaving Windows aside for now :). Keep asking questions as you go through stuff - we're happy to help, and these conversations help others.

    Cheers!

  • 2016-09-20 Pablo Aguirre

    Hi weaverryan,

    Thanks a lot for your response. I've installed Git, with Bash, but without a different result.
    I will stick to Ubuntu and maybe Mac, so I'll leave Windows out of scope for now.

    It's very funny to see the a huge marketing text convincing people to move to this philosophy, with a lack of instructions to get it installed on a major OS.
    I'm used to deal with terminals, last year I did it a lot with Apache Cordova, but with my 37yo I still surprise myself everytime using a terminal after years of OSs hiding them under GUIs :)

    Kind regards,
    Pablo.

  • 2016-09-19 weaverryan

    Hi Pablo!

    Windows is always a *little* bit different, but it shouldn't be *too* different actually in this case :). Here are a few tips:

    1) You *will* need to find a terminal and use it - that's just part of programming in Symfony. If you don't have a terminal you like already, I recommend installing git - which has nothing to do with terminals, but comes with a great "git bash" utility after you install it. Another good one is of course cygwin

    2) The installation instructions for installing the Symfony installer are just a little bit different on Windows, but you can find them here: (click "install the Symfony installer" to reveal them): http://symfony.com/download

    3) After that, it should be more or less the same: you'll run "symfony new aqua_note" to download the Symfony project, and can start the built-in web server with the same comment.

    Let me know if this helps, or if you have any other questions!

    Cheers!

  • 2016-09-18 Pablo Aguirre

    Hello everybody. Is there a set of steps to install Symfony on Windows? Do you know where to find detailed information on Windows setup? Thanks in advance.

  • 2016-06-26 weaverryan

    Nice solution Alex! I believe this is correct!

    Symfony *does* check for missing extensions like this. After initially installing Symfony (via the symfony new command), you *should* have seen a warning about this in your console. But, it's easy to miss, and I didn't mention to look for any warnings.

    So, good question - and thanks for the fast answer Alex Bielik!

  • 2016-06-26 Alex Bielik

    Hi, I was having the same issue. Figured out that PHP xml parser should be installed to fix this:
    sudo apt-get install php-xml

  • 2016-06-24 lolero

    I followed all the instructions but when I install a symfony project and try to run the php bin/console commands I get a fatal error:

    PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "DOMDocument" from the global namespace.
    Did you forget a "use" statement? in project_folder/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52

    Any idea how to fix this?

  • 2016-06-22 Victor Bocharsky

    Ah, that explains everything! The problem not in your environment but location. Well, we can't help you with it. :( We use Vimeo API for each our screencast.

    I only can advise you to check the "Unlimited Free VPN - Hola" - it's a name of nice Google Chrome extension. I use it sometimes when have a problem with DNS. IIRC, Hola provide VPN without any advertising and has a several servers around the world.

    Cheers!

  • 2016-06-22 Henri Tompodung

    Hi Victor!

    Because in Indonesia, the Minister of Communication and Information block vimeo. But don't worry, i can use http://unblocksites.co/ :)

    Thanks anyway...

    [FYI]
    My browser: Chrome, FireFox, Opera
    My OS: Linux Zorin

  • 2016-06-22 Victor Bocharsky

    Hey, Henry!

    Hm, you definitely have problem with your browser. Could you provide us a bit more about your environment? What browser and OS do you use? Could you make a screenshot of problem with video loading?

    Right now, I can only suggest you to open KnpUniversity website in "Incognito window" which available in Google Chrome out-of-the-box. Did it help you?

    Cheers!

  • 2016-06-22 Henri Tompodung

    Hi weaverryan..

    I must use http://unblocksites.co/ for watch the video :)

  • 2016-06-14 weaverryan

    Wow, cool man! Thanks for sharing - that's awesome!

  • 2016-06-14 Bruce Carvalho

    Nice realy nice! I set up a docker container with symfony ready to use, just need to pull like below:
    docker pull brucepc/symfony
    the workdir is /var/www so you can use do create your first project like below:
    docker run --rm -v [my_localdir]:/var/www -it brucepc/symfony symfony new aqua_note

  • 2016-06-11 weaverryan

    Yes! Go team!

  • 2016-06-10 Kristen Cabrera

    Bless you all! It works! Thanks so much!

  • 2016-06-09 Victor Bocharsky

    Hey Kristen!

    Ah, Ryan added very explicit and nice answer but he made a typo in 3rd command. It should be:
    sudo mv symfony.phar /usr/local/bin/symfony

    Otherwise you have `symfony.phar` file instead of `symfony` in `/usr/local/bin/` directory. So if you failed only with 4th command, then the correct command list is:

    sudo rm -rf /usr/local/bin/symfony
    cd /path/to/directory/that/holds/the/symfony.phar/download
    sudo mv symfony.phar /usr/local/bin/symfony
    sudo chmod a+x /usr/local/bin/symfony
    symfony

    Cheers!

  • 2016-06-09 Kristen Cabrera

    Hi! I appreciate all your help, but after i write

    sudo chmod a+x /usr/local/bin/symfony

    it says
    chmod: /usr/local/bin/symfony: No such file or directory

  • 2016-06-08 weaverryan

    Hey Kristen!

    Ah, the second error - "Permission denied" helps! I have a few questions/ideas

    1) Do you have a file located at /usr/local/bin/symfony ? Your error suggests that you may have this. If you do, is it a directory? And if it is a directory, does it have a symfony file inside? If you have a "symfony" directory, I think something messed up originally during setup for some reason. If this is your situation, try this. The second command (cd) should move you into the directory where the symfony.phar file was downloaded to (when you clicked the link that Victor Bocharsky sent).


    sudo rm -rf /usr/local/bin/symfony
    cd /path/to/directory/that/holds/the/symfony.phar/download
    sudo mv symfony.phar /usr/local/bin
    sudo chmod a+x /usr/local/bin/symfony
    symfony

    2) If the above situation is not true (you do not have a /usr/local/bin/symfony directory), then I would try the mv command you tried above, but with "sudo" in front of it.

    Overall, I think there may have been a network error when your first downloaded the symfony.phar file, and this caused the remainder of the process to mess some things up. If we clean things up, we should be good again. Either way, let us know what you find out and we'll fix this :).

    Cheers!

  • 2016-06-08 Kristen Cabrera

    It says: mv: symfony.phar: No such file or directory or mv: rename symfony.phar to /usr/local/bin/symfony/symfony.phar: Permission denied

  • 2016-06-08 Victor Bocharsky

    Hey Kristen!

    It's weird. Could you try to download this installer manually? Use this link https://symfony.com/installer to download it and then move downloaded `symfony.phar` file to the `/usr/local/bin/symfony` and set permissions with `sudo chmod a+x /usr/local/bin/symfony`.

    Cheers

  • 2016-06-07 Kristen Cabrera

    Hi, Unfortunately I got the same error again. :(

  • 2016-05-31 weaverryan

    Hey Kristen!

    Try it again and let me know if you have issues. It looks like the installer failed to download. Symfony.com *did* have some downtime a few days ago - it could just have been bad timing.

    Cheers!

  • 2016-05-31 weaverryan

    Hi Henri!

    Hmm, it must have been a momentary problem with our video host (Vimeo). If you keep having issues, let me know!

    Cheers!

  • 2016-05-28 Kristen Cabrera

    I keep getting curl: (23) Failed writing body (0 != 15930) and then chmod: /usr/local/bin/symfony: No such file or directory

  • 2016-05-26 Henri Tompodung

    Hi all.. Why the video could not be loaded?

  • 2016-05-11 weaverryan

    Hi Alex!

    Ah, thanks very much for the feedback! There's a few interesting things here:

    A) You were correct to install php-cli. This actually should have been enough to use the symfony command (the symfony command, even though it doesn't end in ".php" is actually a php file). Basically, as long as you can type "php" from the command line, the symfony installer will fire. But, installing LAMP is fine too of course :)

    B) The problem with DomDocument is very interesting! After you use the Symfony installer to download Symfony, it checks your system setup and reports any problems. At this point, it *should* have reported that you were missing this extension - here's the code that runs that: https://github.com/sensiolabs/.... But, perhaps this just wasn't very obvious and you missed it?

    C) Overall, you're right about having some more setup things. There are just so many systems and ways to install php. And *most* of them come with everything you need... but not always - like in your case :). And yes, that can be very frustrating. So, it's something we're thinking about - but we also need to make sure it actually covers people's cases and stays up to date. But anyways, I hear you :). We *are* (in the very short-term) planning on updating the README files that come with the code downloads to be very specific to the setup you need - that might help bridge a lot of the issues.

    Anyways, thanks for sharing - and I hope you can go on from here and get to learning some more interesting things :).

  • 2016-05-08 Alex Bielik

    Had some troubles getting it working.

    You see I'm a Windows 10 user, however I can't help myself but have a linux working

    environment. So I went through the trouble and installed 16.04 LTS Ubuntu on a VM

    via virtualbox (bridged it for it to be actually accessible via the host as well).

    Everything went OK up to the "symfony" command. However it failed to be executed and

    it stated that "'php' is not recognized as an internal or external

    command". So, it actually expects PHP to be present in the system before hand in some

    way. I've actually tried to install PHP-cli but that didn't help. So I had to INSTALL A

    LAMP server so there is actually a php being present and processed by some kind of a

    web-server somewhere. Only then was I able to run "Symfony" executable properly.

    But that's not the only thing which generated a certain amount of frustration on my behalf.

    My attempts to launch the server failed miserably with the following error:

    PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\..

    Error: Fatal error: Class 'DOMDocument' not found in /var/www/html/vendor/s

    ymfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52

    This issue can be solved by installing the php-xml parser:

    sudo apt-get install php-xml

    Hope, that would save some time and..frustration I guess for all those future symfony

    travelers..unless you want to get an arrow in the knee like I did.

    P.S. Weaverryan: it would've been great if there was some kind of a FAQ section with all of this

    or if you guys would mention all this stuff in the prerequisites section of some kind or something

    like that. There are also other courses which would greatly benefit with some additional info

    (e.g. the behat courses). Don't get me wrong, I highly expect your work you guys been doing, but

    sometimes those unexpected issues come out of nowhere. Considering, I'm more of a noob-saibot (in a bad way)

    rather than a problem-solver, this kinda frustrates me. :)

  • 2016-03-03 weaverryan

    Ah, that makes sense! I'm glad we got it sorted out :)

  • 2016-03-01 Favian Ioel P

    hi , thanks for the help , it's working - This is what got me confused , i stoped the server before i checked the localhost :)) " When you're done later, just hit ctrl+c to stop the server."

  • 2016-02-29 weaverryan

    Hmm, that seems to me like the built-in web server isn't running! Did you run the "bin/console server:run" command? And if so, did it show any errors? If you're inside of a VM, you'll need to run "bin/console server:run 0.0.0.0:8000", and then use your VM's ip address to access the site (e.g. 192.168.1.100:8000).

    Let me know if that helps!

  • 2016-02-27 Favian Ioel P

    i have an issue , after the install wen i go to localhost:8000 the browser says " This webpage is not available ".
    what's wrong ?

  • 2016-01-26 weaverryan

    Hey there!

    If you're using Windows (it looks like you are), then some command line items will be slightly different. Specifically, downloading the installer is a little different. The Windows instructions can be found here: http://symfony.com/doc/current....

    Based on your comfort level, you might look into using a UNIX-like terminal in Windows - it'll give you console coloration, auto-complete, and you'll be able to use commands that are a lot more similar to tutorials. For example, if you have git already installed, it comes with a nice "Git bash" you can use for a UNIX-like terminal.

    I hope that helps!

  • 2016-01-26 Lino

    I keep getting "'sudo' is not recognized as an internal or external command, operable program or batch file."
    What am i doing wrong?