0

I am trying to deploy my code on the server.

I followed these steps:

  1. clear cache
  2. update vendor
  3. add configuration of my remote database
  4. change the value of access cache and log

But I'm getting this error:

Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException' with message 'You have requested a non-existent parameter "kernel.debug".' in /home/public_html/demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:106
Stack trace: #0 /home/public_html/demo/app/bootstrap.php.cache(1959): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->get('kernel.debug')
             #1 /home/public_html/demo/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php(85): Symfony\Component\DependencyInjection\Container->getParameter('kernel.debug')
             #2 /home/public_html/demo/app/bootstrap.php.cache(2562): Symfony\Bundle\FrameworkBundle\FrameworkBundle->build(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
             #3 /home/public_html/demo/app/bootstrap.php.cache(2542): Symfony\Component\HttpKernel\Kernel->prepareContainer(Object(Symfony\Component\DependencyInjection\ContainerBuilde in /home/public_html/demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php on line 106
Nic Wortel
  • 11,155
  • 6
  • 60
  • 79
mehdiraddadi
  • 105
  • 1
  • 1
  • 4
  • What version of Symfony are using? – Javad Apr 30 '14 at 16:01
  • the last version 2.4.4 – mehdiraddadi Apr 30 '14 at 17:32
  • Did you follow the documentation [http://symfony.com/doc/current/cookbook/deployment-tools.html] which says **Don't forget that deploying your application also involves updating any dependency (typically via Composer), migrating your database, clearing your cache and other potential things like pushing assets to a CDN (see Common Post-Deployment Tasks).** Furthermore, you may need to update the dependencies before deploy – Javad Apr 30 '14 at 18:02

1 Answers1

1

As you can see, this error is being thrown in bootstrap.php.cache.

Symfony uses a bootstrap file to improve class loading performance, as documented here. However, you presumably copied this file over from your development environment, and it hasn't yet been regenerated for production.

You will need to regenerate this file either by running composer install or by running the build script directly: php ./vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php

Peter
  • 808
  • 7
  • 15
  • I check the existence of the file bootstrap.php.cache there in the app and in the directly \ vendor \ Sensio \ distribution-bundle \ Sensio \ Bundle \ DistributionBundle \ Resources \ bin So all is well I want to know where to copy this file please help me – mehdiraddadi May 02 '14 at 20:21