Search code examples
symfonypear

Symfony Missing sf folder


This question is not really related to programming, but I dont know where else I should ask it.

I just installed Symfony on Xampp for windows, now I struggle getting it to work because it is missing the project/web/sf folder and I can't find anything about it on the internet.

The missing of this folder causes me to lose the css files and images ect.

I installed Symfony via Pear and then just got a clean project using symfony generate:project projectname

[edit]: this is how my homepage looks after loading; Homepage

[edit 2]: Printscreen of version number seen on web/app_dev.php (which is one of the few pages working correctly)

Prtscreen 2


Solution

  • It looks like from your "3 methods of installing" you have mixed multiple versions of Symfony into one installation. The symfony_data/web/sf problem is unique to Symfony 1.x only. Symfony2 does not use the web/sf structure, and instead utilizes web/bundles/framework for framework assets.

    This makes sense since the PEAR channel isn't supported for Symfony anymore (see the big red header?) Plus, you can only get Symfony 2.x by explicitly using pear install symfony2 (not pear install symfony). You may be using the old PEAR channel located here (see how they're all 1.x versions?) and symfony-project.com redirects to symfony.com/legacy

    So now when you access app.php you get Symfony 1.x, and when you access app_dev.php you get the newest version of Symfony ~2.5. This makes things very confusing for both you and us.

    What's the fix?

    Start over. Remove the project folder and its contents entirely. Then follow these installation instructions (I've condensed them for you):

    1. Start in your desired project folder.
    2. curl -s https://getcomposer.org/installer | php
    3. php composer.phar create-project symfony/framework-standard-edition ./ '2.5.*'
    4. php composer.phar install