IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Symfony PHP Discussion :

installation de symfony : does not contain valid YAML


Sujet :

Symfony PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    17
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 17
    Par défaut installation de symfony : does not contain valid YAML
    J'ai téléchargé la dernière version de symfony sur le site officiel : https://symfony.com/

    tout s'est bien passé mais j'ai du mal à l'installer.Je précise qu'il s'agit d'une installation sans passer par composer.
    J'ai créé un repertoire de mon projet et je suis sur windows 8.1 et Wampserver fonctionne correctement .Je précise que ma version de php est 5.5.12.
    Je précise que j'ai installé le tout dans un répertoire qui porte le nom de symfony.
    Seulement, quand je lance l'adresse : http://localhost/Symfony/web/config.php j'obtiens une page blanche avec le contenu ci-dessus :



    Symfony
    Search on Symfony website
    Configuration Checker

    This script analyzes your system to check whether is ready to run Symfony applications.
    Recommendations

    To enhance your Symfony experience, it’s recommended that you fix the following:

    1 Set "xdebug.max_nesting_level" to e.g. "250" in php.ini* to stop Xdebug's infinite recursion protection erroneously throwing a fatal error in your project.
    2 In most cases you should be fine, but please verify there is no inconsistencies between data provided by Symfony and the intl extension. See https://github.com/symfony/symfony/issues/15007 for an example of inconsistencies you might run into.
    3 Install and/or enable a PHP accelerator (highly recommended).

    * Changes to the php.ini file must be done in "C:\wamp\bin\apache\apache2.4.9\bin\php.ini".

    Re-check configuration

    Symfony Standard Edition

    Je ne trouve pas le : xdebug.max_nesting_level, dans mon php.ini, comment faire?




    et lorsque je lance cette adresse : http://localhost/symfony/web/app_dev.php/

    j'obtiens :

    Whoops, looks like something went wrong.


    3/3 FileLoaderLoadException in FileLoader.php line 118: The file "C:\wamp\www\symfony\app/config\parameters.yml" does not contain valid YAML in C:\wamp\www\symfony\app/config\parameters.yml (which is being imported from "C:\wamp\www\symfony\app/config\config.yml").

    in FileLoader.php line 118
    at FileLoader->import('parameters.yml', null, false, 'C:\wamp\www\symfony\app/config\config.yml') in YamlFileLoader.php line 105
    at YamlFileLoader->parseImports(array('imports' => array(array('resource' => 'parameters.yml'), array('resource' => 'security.yml'), array('resource' => 'services.yml')), 'parameters' => array('locale' => 'en'), 'framework' => array('secret' => '%secret%', 'router' => array('resource' => '%kernel.root_dir%/config/routing.yml', 'strict_requirements' => null), 'form' => null, 'csrf_protection' => null, 'validation' => array('enable_annotations' => true), 'templating' => array('engines' => array('twig')), 'default_locale' => '%locale%', 'trusted_hosts' => null, 'trusted_proxies' => null, 'session' => array('handler_id' => 'session.handler.native_file', 'save_path' => '%kernel.root_dir%/../var/sessions/%kernel.environment%'), 'fragments' => null, 'http_method_override' => true, 'assets' => null), 'twig' => array('debug' => '%kernel.debug%', 'strict_variables' => '%kernel.debug%'), 'doctrine' => array('dbal' => array('driver' => 'pdo_mysql', 'host' => '%database_host%', 'port' => '%database_port%', 'dbname' => '%database_name%', 'user' => '%database_user%', 'password' => '%database_password%', 'charset' => 'UTF8'), 'orm' => array('auto_generate_proxy_classes' => '%kernel.debug%', 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore', 'auto_mapping' => true)), 'swiftmailer' => array('transport' => '%mailer_transport%', 'host' => '%mailer_host%', 'username' => '%mailer_user%', 'password' => '%mailer_password%', 'spool' => array('type' => 'memory'))), 'C:\wamp\www\symfony\app/config\config.yml') in YamlFileLoader.php line 54
    at YamlFileLoader->load('C:\wamp\www\symfony\app/config\config.yml', null) in FileLoader.php line 103
    at FileLoader->import('config.yml', null, false, 'C:\wamp\www\symfony\app/config/config_dev.yml') in YamlFileLoader.php line 105
    at YamlFileLoader->parseImports(array('imports' => array(array('resource' => 'config.yml')), 'framework' => array('router' => array('resource' => '%kernel.root_dir%/config/routing_dev.yml', 'strict_requirements' => true), 'profiler' => array('only_exceptions' => false)), 'web_profiler' => array('toolbar' => true, 'intercept_redirects' => false), 'monolog' => array('handlers' => array('main' => array('type' => 'stream', 'path' => '%kernel.logs_dir%/%kernel.environment%.log', 'level' => 'debug', 'channels' => array('!event')), 'console' => array('type' => 'console', 'channels' => array('!event', '!doctrine'))))), 'C:\wamp\www\symfony\app/config/config_dev.yml') in YamlFileLoader.php line 54
    at YamlFileLoader->load('C:\wamp\www\symfony\app/config/config_dev.yml', null) in DelegatingLoader.php line 45
    at DelegatingLoader->load('C:\wamp\www\symfony\app/config/config_dev.yml') in AppKernel.php line 48
    at AppKernel->registerContainerConfiguration(object(DelegatingLoader)) in Kernel.php line 563
    at Kernel->buildContainer() in Kernel.php line 476
    at Kernel->initializeContainer() in Kernel.php line 117
    at Kernel->boot() in Kernel.php line 166
    at Kernel->handle(object(Request)) in app_dev.php line 30

    2/3 InvalidArgumentException in YamlFileLoader.php line 339: The file "C:\wamp\www\symfony\app/config\parameters.yml" does not contain valid YAML.

    in YamlFileLoader.php line 339
    at YamlFileLoader->loadFile('C:\wamp\www\symfony\app/config\parameters.yml') in YamlFileLoader.php line 44
    at YamlFileLoader->load('C:\wamp\www\symfony\app/config\parameters.yml', null) in FileLoader.php line 103
    at FileLoader->import('parameters.yml', null, false, 'C:\wamp\www\symfony\app/config\config.yml') in YamlFileLoader.php line 105
    at YamlFileLoader->parseImports(array('imports' => array(array('resource' => 'parameters.yml'), array('resource' => 'security.yml'), array('resource' => 'services.yml')), 'parameters' => array('locale' => 'en'), 'framework' => array('secret' => '%secret%', 'router' => array('resource' => '%kernel.root_dir%/config/routing.yml', 'strict_requirements' => null), 'form' => null, 'csrf_protection' => null, 'validation' => array('enable_annotations' => true), 'templating' => array('engines' => array('twig')), 'default_locale' => '%locale%', 'trusted_hosts' => null, 'trusted_proxies' => null, 'session' => array('handler_id' => 'session.handler.native_file', 'save_path' => '%kernel.root_dir%/../var/sessions/%kernel.environment%'), 'fragments' => null, 'http_method_override' => true, 'assets' => null), 'twig' => array('debug' => '%kernel.debug%', 'strict_variables' => '%kernel.debug%'), 'doctrine' => array('dbal' => array('driver' => 'pdo_mysql', 'host' => '%database_host%', 'port' => '%database_port%', 'dbname' => '%database_name%', 'user' => '%database_user%', 'password' => '%database_password%', 'charset' => 'UTF8'), 'orm' => array('auto_generate_proxy_classes' => '%kernel.debug%', 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore', 'auto_mapping' => true)), 'swiftmailer' => array('transport' => '%mailer_transport%', 'host' => '%mailer_host%', 'username' => '%mailer_user%', 'password' => '%mailer_password%', 'spool' => array('type' => 'memory'))), 'C:\wamp\www\symfony\app/config\config.yml') in YamlFileLoader.php line 54
    at YamlFileLoader->load('C:\wamp\www\symfony\app/config\config.yml', null) in FileLoader.php line 103
    at FileLoader->import('config.yml', null, false, 'C:\wamp\www\symfony\app/config/config_dev.yml') in YamlFileLoader.php line 105
    at YamlFileLoader->parseImports(array('imports' => array(array('resource' => 'config.yml')), 'framework' => array('router' => array('resource' => '%kernel.root_dir%/config/routing_dev.yml', 'strict_requirements' => true), 'profiler' => array('only_exceptions' => false)), 'web_profiler' => array('toolbar' => true, 'intercept_redirects' => false), 'monolog' => array('handlers' => array('main' => array('type' => 'stream', 'path' => '%kernel.logs_dir%/%kernel.environment%.log', 'level' => 'debug', 'channels' => array('!event')), 'console' => array('type' => 'console', 'channels' => array('!event', '!doctrine'))))), 'C:\wamp\www\symfony\app/config/config_dev.yml') in YamlFileLoader.php line 54
    at YamlFileLoader->load('C:\wamp\www\symfony\app/config/config_dev.yml', null) in DelegatingLoader.php line 45
    at DelegatingLoader->load('C:\wamp\www\symfony\app/config/config_dev.yml') in AppKernel.php line 48
    at AppKernel->registerContainerConfiguration(object(DelegatingLoader)) in Kernel.php line 563
    at Kernel->buildContainer() in Kernel.php line 476
    at Kernel->initializeContainer() in Kernel.php line 117
    at Kernel->boot() in Kernel.php line 166
    at Kernel->handle(object(Request)) in app_dev.php line 30

    1/3 ParseException in Parser.php line 296: Unable to parse at line 5 (near " database_port: null").

    in Parser.php line 296
    at Parser->parse('# This file is auto-generated during the composer install parameters: database_host: 127.0.0.1 database_port: null database_name: symfony database_user: root database_password: null mailer_transport: smtp mailer_host: 127.0.0.1 mailer_user: null mailer_password: null secret: 9ab978bc87e8b93eb5b33581c8b7d1e2c0584dd2 ') in YamlFileLoader.php line 337
    at YamlFileLoader->loadFile('C:\wamp\www\symfony\app/config\parameters.yml') in YamlFileLoader.php line 44
    at YamlFileLoader->load('C:\wamp\www\symfony\app/config\parameters.yml', null) in FileLoader.php line 103
    at FileLoader->import('parameters.yml', null, false, 'C:\wamp\www\symfony\app/config\config.yml') in YamlFileLoader.php line 105
    at YamlFileLoader->parseImports(array('imports' => array(array('resource' => 'parameters.yml'), array('resource' => 'security.yml'), array('resource' => 'services.yml')), 'parameters' => array('locale' => 'en'), 'framework' => array('secret' => '%secret%', 'router' => array('resource' => '%kernel.root_dir%/config/routing.yml', 'strict_requirements' => null), 'form' => null, 'csrf_protection' => null, 'validation' => array('enable_annotations' => true), 'templating' => array('engines' => array('twig')), 'default_locale' => '%locale%', 'trusted_hosts' => null, 'trusted_proxies' => null, 'session' => array('handler_id' => 'session.handler.native_file', 'save_path' => '%kernel.root_dir%/../var/sessions/%kernel.environment%'), 'fragments' => null, 'http_method_override' => true, 'assets' => null), 'twig' => array('debug' => '%kernel.debug%', 'strict_variables' => '%kernel.debug%'), 'doctrine' => array('dbal' => array('driver' => 'pdo_mysql', 'host' => '%database_host%', 'port' => '%database_port%', 'dbname' => '%database_name%', 'user' => '%database_user%', 'password' => '%database_password%', 'charset' => 'UTF8'), 'orm' => array('auto_generate_proxy_classes' => '%kernel.debug%', 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore', 'auto_mapping' => true)), 'swiftmailer' => array('transport' => '%mailer_transport%', 'host' => '%mailer_host%', 'username' => '%mailer_user%', 'password' => '%mailer_password%', 'spool' => array('type' => 'memory'))), 'C:\wamp\www\symfony\app/config\config.yml') in YamlFileLoader.php line 54
    at YamlFileLoader->load('C:\wamp\www\symfony\app/config\config.yml', null) in FileLoader.php line 103
    at FileLoader->import('config.yml', null, false, 'C:\wamp\www\symfony\app/config/config_dev.yml') in YamlFileLoader.php line 105
    at YamlFileLoader->parseImports(array('imports' => array(array('resource' => 'config.yml')), 'framework' => array('router' => array('resource' => '%kernel.root_dir%/config/routing_dev.yml', 'strict_requirements' => true), 'profiler' => array('only_exceptions' => false)), 'web_profiler' => array('toolbar' => true, 'intercept_redirects' => false), 'monolog' => array('handlers' => array('main' => array('type' => 'stream', 'path' => '%kernel.logs_dir%/%kernel.environment%.log', 'level' => 'debug', 'channels' => array('!event')), 'console' => array('type' => 'console', 'channels' => array('!event', '!doctrine'))))), 'C:\wamp\www\symfony\app/config/config_dev.yml') in YamlFileLoader.php line 54
    at YamlFileLoader->load('C:\wamp\www\symfony\app/config/config_dev.yml', null) in DelegatingLoader.php line 45
    at DelegatingLoader->load('C:\wamp\www\symfony\app/config/config_dev.yml') in AppKernel.php line 48
    at AppKernel->registerContainerConfiguration(object(DelegatingLoader)) in Kernel.php line 563
    at Kernel->buildContainer() in Kernel.php line 476
    at Kernel->initializeContainer() in Kernel.php line 117
    at Kernel->boot() in Kernel.php line 166
    at Kernel->handle(object(Request)) in app_dev.php line 30


    Comment le résoudre?
    Merci d'avance pour ceux qui voudront m'aider car depuis quelques jours je galère et je ne sais pas comment faire...
    dsl si j'ai posté un long message ,mais c'est dans le but de mettre toutes les infos pour avoir une aide complete

  2. #2
    Membre émérite
    Homme Profil pro
    Développeur Web
    Inscrit en
    Novembre 2013
    Messages
    739
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Novembre 2013
    Messages : 739
    Par défaut
    Bjr, tu as déjà un problème dans C:\wamp\www\symfony\app/config\parameters.yml
    vérifie bien la structure du fichier et si l erreur s'affiche encore ,partage nous son contenu.

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    17
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 17
    Par défaut
    Mon fichier parameteres.yml contient exactement tout ce qui est en bleu,que dois je faire alors?


    # This file is a "template" of what your parameters.yml file should look like
    #
    Set parameters here that may be different on each deployment target of the app,
    e.g. development, staging, production.

    # http://symfony.com/doc/current/best_...iguration.html
    #infrastructure-related-configuration
    parameters:

    database_host: 127.0.0.1
    database_port: ~

    database_name: symfony
    database_user: ~

    database_password: null

    # You should uncomment this if you want use pdo_sqlite

    # database_path: "%kernel.root_dir%/data.db3"

    mailer_transport: smtp

    mailer_host: 127.0.0.1
    mailer_user: ~
    mailer_password: ~

    # A secret key that's used to generate certain security-related tokens
    secret: ThisTokenIsNotSoSecretChangeIt

  4. #4
    Membre émérite
    Homme Profil pro
    Développeur Web
    Inscrit en
    Novembre 2013
    Messages
    739
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Novembre 2013
    Messages : 739
    Par défaut
    ok, appart la ligne "parameters" ,tous les autres doivent être précédés par 4 espaces.
    si tu veux tu peux créer un nouveau projet symfony2 pour voir la bonne structure par défaut pour ce fichier.

  5. #5
    Membre averti
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    17
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 17
    Par défaut
    j'ai rajouté 4espaces devant chaque ligne, ça ne fonctionne toujours pas..........

Discussions similaires

  1. Réponses: 1
    Dernier message: 21/05/2009, 14h23
  2. Gros probleme d'installation de Windows
    Par johndu42 dans le forum Windows XP
    Réponses: 5
    Dernier message: 10/09/2006, 19h00
  3. Gros problème d installation Mandriva 64bits
    Par Cazaux-Moutou-Philippe dans le forum Mandriva / Mageia
    Réponses: 8
    Dernier message: 16/03/2006, 22h11
  4. Réponses: 12
    Dernier message: 23/10/2002, 11h56
  5. probleme d'installation sur d'autres postes
    Par VBkiller dans le forum Composants VCL
    Réponses: 4
    Dernier message: 18/09/2002, 18h14

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo