title: Symfony 2.7: The 127.0.0.1 page isn’t working 127.0.0.1 is currently unable to handle this request
body: <p>The form is displayed with different roles and permissions except that the server can not Symfony 2.7 processed the request (I do not know why !!). </p>
  
  <blockquote>
    <p>The 127.0.0.1 page isn’t working
    127.0.0.1 is currently unable to handle this request. HTTP ERROR 500</p>
  </blockquote>
  
  <p>even though I used the command:</p>
  
  <pre><code>php app/console cache:clear --env=prod
  </code></pre>
  
  <p>here are my formType:</p>
  
  <pre><code>Class RoleType{
  public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
  
            -&gt;add('groups', 'entity',array(
                                              'class' =&gt; 'GroupsBundle:Roles',
                                              'property' =&gt; 'name_role',
                                               'required' =&gt; false,
                                               'placeholder' =&gt; 'Choisir le role du votre groupe'
                                           )
             )
  
  
             -&gt;add('permissions_role','entity',array(
                     'class' =&gt; 'GroupsBundle:Permissions',
                     'property' =&gt; 'name_permissions',
                     'multiple' =&gt; true,
                     'expanded' =&gt; true,
                     'required' =&gt; true
                 )
                 )
   ;
  }
  }
  
  Class GroupType{
  
  
  
  class GroupsType extends AbstractType
  {
      /**
       * @param FormBuilderInterface $builder
       * @param array $options
       */
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
              -&gt;add('image', new ImagesType())
              -&gt;add('name_groups','text',array('required' =&gt; true, 'attr' =&gt; array('placeholder' =&gt; 'Nom du groupe')))
              -&gt;add('role', new RolesType())
          ;
      }
  }
  </code></pre>
  
  <p>Here the code of controller:</p>
  
  <pre><code>public function createAction(Request $request)
      {
          $entity = new Groups();
          $form = $this-&gt;createCreateForm($entity);
          $form-&gt;handleRequest($request);
  
  
          if ($form-&gt;isValid()) {
              $em = $this-&gt;getDoctrine()-&gt;getManager();
              //$em-&gt;getReference('MemberShipManagement\GroupsBundle\Entity\Groups',$entity.getId());
              $em-&gt;persist($entity);
              $em-&gt;flush();
  
              return $this-&gt;redirect($this-&gt;generateUrl('groups_show', array('id' =&gt; $entity-&gt;getId())));
          }
  
          return $this-&gt;render('GroupsBundle:Groups:new.html.twig', array(
              'entity' =&gt; $entity,
              'form'   =&gt; $form-&gt;createView(),
          ));
      }
  </code></pre>
  
  <p>thank you to solve the problem</p>
  
  <p>*Dev.log</p>
  
  <pre><code>[2016-07-12 00:23:49] doctrine.DEBUG: SELECT p0_.id_per AS id_per0, p0_.nom_permisions AS nom_permisions1 FROM permissions p0_ [] []
  [2016-07-12 00:23:49] doctrine.DEBUG: SELECT r0_.id AS id0, r0_.nom_roles AS nom_roles1 FROM roles r0_ WHERE r0_.id IN (?) [["0"]] []
  [2016-07-12 01:51:58] php.DEBUG: fsockopen(): unable to connect to 127.0.0.1:8000 (Connection refused) {"type":2,"file":"/home/syrine01/Desktop/Project_Console/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php","line":59,"l
  evel":28928} []
  WARNING - Translation not found. 
  Context: {"id":"Image","domain":"messages","locale":"fr"}
  WARNING - Translation not found. 
  Context: {"id":"File","domain":"messages","locale":"fr"}
  WARNING - Translation not found. 
  Context: {"id":"Name groups","domain":"messages","locale":"fr"}
  WARNING - Translation not found. 
  Context: {"id":"Nom du groupe","domain":"messages","locale":"fr"}
  WARNING - Translation not found. 
  Context: {"id":"Role","domain":"messages","locale":"fr"}
  WARNING - Translation not found. 
  Context: {"id":"Groups","domain":"messages","locale":"fr"}
  WARNING - Translation not found. 
  Context: {"id":"Choisir le role du votre groupe","domain":"messages","locale":"fr"}
  WARNING - Translation not found. 
  Context: {"id":"Permissions role","domain":"messages","locale":"fr"}
  WARNING - Translation not found.
  INFO - Matched route "groups_new". 
  Context: {"route_parameters":{"_controller":"MemberShipManagement\\GroupsBundle\\Controller\\GroupsController::newAction","_route":"groups_new"},"request_uri":"http://127.0.0.1:8000/groups/new"}
  DEPRECATED - The Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter class is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.  +
  INFO - Populated the TokenStorage with an anonymous Token.
  DEPRECATED - MemberShipManagement\GroupsBundle\Form\GroupsType: The FormTypeInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeInterface with Symfony 3.0.  +
  DEPRECATED - MemberShipManagement\GroupsBundle\Form\ImagesType: The FormTypeInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeInterface with Symfony 3.0.  +
  DEPRECATED - MemberShipManagement\GroupsBundle\Form\RolesType: The FormTypeInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeInterface with Symfony 3.0.  +
  DEPRECATED - The "property" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_label" instead. 
  </code></pre>
  
  <p>I have not done the translation of my website</p>
  
  <p>the Config databse is:</p>
  
  <pre><code>doctrine:
      dbal:
            driver:   pdo_mysql
            host:     "%database_host%"
            port:     "%database_port%"
            dbname:   "%database_name%"
            user:     "%database_user%"
            password: "%database_password%"
            charset:  UTF8
            unix_socket: /tmp/mysql.sock
  
  //parameters
  parameters:
      database_host: 127.0.0.1
      database_port: null
      database_name: symfony
      database_user: root
      database_password: root
      mailer_transport: smtp
      mailer_host: 127.0.0.1
      mailer_user: null
      mailer_password: null
  </code></pre>
  
  <p>with this command I find my server encountered a problem</p>
  
  <pre><code> sudo php app/console server:start -vvv
  </code></pre>
  
  <blockquote>
    <p>[2016-07-12 06:02:10] php.DEBUG: fsockopen(): unable to connect to
    127.0.0.1:8000 (Connection refused) {"type":2,"file":"/home/Cros/Desktop/Project_Console/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php","line":59,"level":28928}</p>
  </blockquote>