Symfony2 post-update-cmd gives “An error occurred when generating the bootstrap file”












23















I am currently on Symfony2 2.3.7.
When I run the composer update command. In the post-update-cmd a script is run to update symfony2. But it fails:



Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when generating the bootstrap file.

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]


Any idea why this is happening?
I tried to run:



composer update --no-scripts 


.. and that runs fine. The following is also working fine:



php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php


But everytime I try the normal composer update the post script fails.
Running the update with --verbose gives the following:



Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when generating the bootstrap file.

Exception trace:
() at C:xampphtdocsforvaltningvendorsensiodistribution-bundleSensioBundleDistributionBundleComposerScriptHandler.php:203
SensioBundleDistributionBundleComposerScriptHandler::executeBuildBootstrap() at C:xampphtdocsforvaltningvendorsensiodistribution-bundleSensioBundleDistributionBundleComposerScriptHandler.php:43
SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:165
ComposerEventDispatcherEventDispatcher->executeEventPhpScript() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:138
ComposerEventDispatcherEventDispatcher->doDispatch() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:107
ComposerEventDispatcherEventDispatcher->dispatchCommandEvent() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Installer.php:289
ComposerInstaller->run() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Command/UpdateCommand.php:118
ComposerCommandUpdateCommand->execute() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
SymfonyComponentConsoleCommandCommand->run() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:897
SymfonyComponentConsoleApplication->doRunCommand() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:191
SymfonyComponentConsoleApplication->doRun() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Console/Application.php:117
ComposerConsoleApplication->doRun() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:121
SymfonyComponentConsoleApplication->run() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Console/Application.php:83
ComposerConsoleApplication->run() at phar://C:/ProgramData/Composer/bin/composer.phar/bin/composer:43
require() at C:ProgramDataComposerbincomposer.phar:15

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]


The composer.json contains:



{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The "Symfony Standard Edition" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.9.1",
"dist": {
"url": "http://code.jquery.com/jquery-1.9.1.js",
"type": "file"
}
}
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"knplabs/knp-menu": "2.0.*@dev",
"leafo/lessphp": "0.4.*@dev",
"knplabs/knp-menu-bundle": "2.0.*@dev",
"incenteev/composer-parameter-handler": "~2.0",
"twbs/bootstrap": "2.3.*",
"jquery/jquery": "1.9.*",
"FortAwesome/Font-Awesome": "3.2.1",
"egeloen/ckeditor-bundle": "2.*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"scripts": {
"post-install-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}


}










share|improve this question




















  • 4





    running composer update --verbose should give a full backtrace for the exception, making it easier (or actually possible in your case) to debug that issue

    – Geoffrey Bachelet
    Nov 19 '13 at 9:29











  • Did you tried this ?

    – Brewal
    Nov 19 '13 at 9:30






  • 1





    Also, be sure to run composer --self-update to update it's own binary...

    – Jovan Perovic
    Nov 19 '13 at 9:30











  • Brewal. Yes read the question I clearly state that I had run thoose commands. I have updated the question with the verbose dump.

    – Ronnie Jespersen
    Nov 19 '13 at 9:40











  • Please provide your composer.json file

    – Mantas
    Nov 20 '13 at 8:18
















23















I am currently on Symfony2 2.3.7.
When I run the composer update command. In the post-update-cmd a script is run to update symfony2. But it fails:



Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when generating the bootstrap file.

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]


Any idea why this is happening?
I tried to run:



composer update --no-scripts 


.. and that runs fine. The following is also working fine:



php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php


But everytime I try the normal composer update the post script fails.
Running the update with --verbose gives the following:



Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when generating the bootstrap file.

Exception trace:
() at C:xampphtdocsforvaltningvendorsensiodistribution-bundleSensioBundleDistributionBundleComposerScriptHandler.php:203
SensioBundleDistributionBundleComposerScriptHandler::executeBuildBootstrap() at C:xampphtdocsforvaltningvendorsensiodistribution-bundleSensioBundleDistributionBundleComposerScriptHandler.php:43
SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:165
ComposerEventDispatcherEventDispatcher->executeEventPhpScript() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:138
ComposerEventDispatcherEventDispatcher->doDispatch() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:107
ComposerEventDispatcherEventDispatcher->dispatchCommandEvent() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Installer.php:289
ComposerInstaller->run() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Command/UpdateCommand.php:118
ComposerCommandUpdateCommand->execute() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
SymfonyComponentConsoleCommandCommand->run() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:897
SymfonyComponentConsoleApplication->doRunCommand() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:191
SymfonyComponentConsoleApplication->doRun() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Console/Application.php:117
ComposerConsoleApplication->doRun() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:121
SymfonyComponentConsoleApplication->run() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Console/Application.php:83
ComposerConsoleApplication->run() at phar://C:/ProgramData/Composer/bin/composer.phar/bin/composer:43
require() at C:ProgramDataComposerbincomposer.phar:15

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]


The composer.json contains:



{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The "Symfony Standard Edition" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.9.1",
"dist": {
"url": "http://code.jquery.com/jquery-1.9.1.js",
"type": "file"
}
}
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"knplabs/knp-menu": "2.0.*@dev",
"leafo/lessphp": "0.4.*@dev",
"knplabs/knp-menu-bundle": "2.0.*@dev",
"incenteev/composer-parameter-handler": "~2.0",
"twbs/bootstrap": "2.3.*",
"jquery/jquery": "1.9.*",
"FortAwesome/Font-Awesome": "3.2.1",
"egeloen/ckeditor-bundle": "2.*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"scripts": {
"post-install-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}


}










share|improve this question




















  • 4





    running composer update --verbose should give a full backtrace for the exception, making it easier (or actually possible in your case) to debug that issue

    – Geoffrey Bachelet
    Nov 19 '13 at 9:29











  • Did you tried this ?

    – Brewal
    Nov 19 '13 at 9:30






  • 1





    Also, be sure to run composer --self-update to update it's own binary...

    – Jovan Perovic
    Nov 19 '13 at 9:30











  • Brewal. Yes read the question I clearly state that I had run thoose commands. I have updated the question with the verbose dump.

    – Ronnie Jespersen
    Nov 19 '13 at 9:40











  • Please provide your composer.json file

    – Mantas
    Nov 20 '13 at 8:18














23












23








23


5






I am currently on Symfony2 2.3.7.
When I run the composer update command. In the post-update-cmd a script is run to update symfony2. But it fails:



Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when generating the bootstrap file.

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]


Any idea why this is happening?
I tried to run:



composer update --no-scripts 


.. and that runs fine. The following is also working fine:



php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php


But everytime I try the normal composer update the post script fails.
Running the update with --verbose gives the following:



Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when generating the bootstrap file.

Exception trace:
() at C:xampphtdocsforvaltningvendorsensiodistribution-bundleSensioBundleDistributionBundleComposerScriptHandler.php:203
SensioBundleDistributionBundleComposerScriptHandler::executeBuildBootstrap() at C:xampphtdocsforvaltningvendorsensiodistribution-bundleSensioBundleDistributionBundleComposerScriptHandler.php:43
SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:165
ComposerEventDispatcherEventDispatcher->executeEventPhpScript() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:138
ComposerEventDispatcherEventDispatcher->doDispatch() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:107
ComposerEventDispatcherEventDispatcher->dispatchCommandEvent() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Installer.php:289
ComposerInstaller->run() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Command/UpdateCommand.php:118
ComposerCommandUpdateCommand->execute() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
SymfonyComponentConsoleCommandCommand->run() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:897
SymfonyComponentConsoleApplication->doRunCommand() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:191
SymfonyComponentConsoleApplication->doRun() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Console/Application.php:117
ComposerConsoleApplication->doRun() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:121
SymfonyComponentConsoleApplication->run() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Console/Application.php:83
ComposerConsoleApplication->run() at phar://C:/ProgramData/Composer/bin/composer.phar/bin/composer:43
require() at C:ProgramDataComposerbincomposer.phar:15

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]


The composer.json contains:



{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The "Symfony Standard Edition" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.9.1",
"dist": {
"url": "http://code.jquery.com/jquery-1.9.1.js",
"type": "file"
}
}
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"knplabs/knp-menu": "2.0.*@dev",
"leafo/lessphp": "0.4.*@dev",
"knplabs/knp-menu-bundle": "2.0.*@dev",
"incenteev/composer-parameter-handler": "~2.0",
"twbs/bootstrap": "2.3.*",
"jquery/jquery": "1.9.*",
"FortAwesome/Font-Awesome": "3.2.1",
"egeloen/ckeditor-bundle": "2.*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"scripts": {
"post-install-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}


}










share|improve this question
















I am currently on Symfony2 2.3.7.
When I run the composer update command. In the post-update-cmd a script is run to update symfony2. But it fails:



Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when generating the bootstrap file.

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]


Any idea why this is happening?
I tried to run:



composer update --no-scripts 


.. and that runs fine. The following is also working fine:



php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php


But everytime I try the normal composer update the post script fails.
Running the update with --verbose gives the following:



Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when generating the bootstrap file.

Exception trace:
() at C:xampphtdocsforvaltningvendorsensiodistribution-bundleSensioBundleDistributionBundleComposerScriptHandler.php:203
SensioBundleDistributionBundleComposerScriptHandler::executeBuildBootstrap() at C:xampphtdocsforvaltningvendorsensiodistribution-bundleSensioBundleDistributionBundleComposerScriptHandler.php:43
SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:165
ComposerEventDispatcherEventDispatcher->executeEventPhpScript() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:138
ComposerEventDispatcherEventDispatcher->doDispatch() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:107
ComposerEventDispatcherEventDispatcher->dispatchCommandEvent() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Installer.php:289
ComposerInstaller->run() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Command/UpdateCommand.php:118
ComposerCommandUpdateCommand->execute() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
SymfonyComponentConsoleCommandCommand->run() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:897
SymfonyComponentConsoleApplication->doRunCommand() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:191
SymfonyComponentConsoleApplication->doRun() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Console/Application.php:117
ComposerConsoleApplication->doRun() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:121
SymfonyComponentConsoleApplication->run() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Console/Application.php:83
ComposerConsoleApplication->run() at phar://C:/ProgramData/Composer/bin/composer.phar/bin/composer:43
require() at C:ProgramDataComposerbincomposer.phar:15

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]


The composer.json contains:



{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The "Symfony Standard Edition" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.9.1",
"dist": {
"url": "http://code.jquery.com/jquery-1.9.1.js",
"type": "file"
}
}
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"knplabs/knp-menu": "2.0.*@dev",
"leafo/lessphp": "0.4.*@dev",
"knplabs/knp-menu-bundle": "2.0.*@dev",
"incenteev/composer-parameter-handler": "~2.0",
"twbs/bootstrap": "2.3.*",
"jquery/jquery": "1.9.*",
"FortAwesome/Font-Awesome": "3.2.1",
"egeloen/ckeditor-bundle": "2.*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"scripts": {
"post-install-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}


}







php symfony composer-php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 '13 at 8:38







Ronnie Jespersen

















asked Nov 19 '13 at 9:24









Ronnie JespersenRonnie Jespersen

6681718




6681718








  • 4





    running composer update --verbose should give a full backtrace for the exception, making it easier (or actually possible in your case) to debug that issue

    – Geoffrey Bachelet
    Nov 19 '13 at 9:29











  • Did you tried this ?

    – Brewal
    Nov 19 '13 at 9:30






  • 1





    Also, be sure to run composer --self-update to update it's own binary...

    – Jovan Perovic
    Nov 19 '13 at 9:30











  • Brewal. Yes read the question I clearly state that I had run thoose commands. I have updated the question with the verbose dump.

    – Ronnie Jespersen
    Nov 19 '13 at 9:40











  • Please provide your composer.json file

    – Mantas
    Nov 20 '13 at 8:18














  • 4





    running composer update --verbose should give a full backtrace for the exception, making it easier (or actually possible in your case) to debug that issue

    – Geoffrey Bachelet
    Nov 19 '13 at 9:29











  • Did you tried this ?

    – Brewal
    Nov 19 '13 at 9:30






  • 1





    Also, be sure to run composer --self-update to update it's own binary...

    – Jovan Perovic
    Nov 19 '13 at 9:30











  • Brewal. Yes read the question I clearly state that I had run thoose commands. I have updated the question with the verbose dump.

    – Ronnie Jespersen
    Nov 19 '13 at 9:40











  • Please provide your composer.json file

    – Mantas
    Nov 20 '13 at 8:18








4




4





running composer update --verbose should give a full backtrace for the exception, making it easier (or actually possible in your case) to debug that issue

– Geoffrey Bachelet
Nov 19 '13 at 9:29





running composer update --verbose should give a full backtrace for the exception, making it easier (or actually possible in your case) to debug that issue

– Geoffrey Bachelet
Nov 19 '13 at 9:29













Did you tried this ?

– Brewal
Nov 19 '13 at 9:30





Did you tried this ?

– Brewal
Nov 19 '13 at 9:30




1




1





Also, be sure to run composer --self-update to update it's own binary...

– Jovan Perovic
Nov 19 '13 at 9:30





Also, be sure to run composer --self-update to update it's own binary...

– Jovan Perovic
Nov 19 '13 at 9:30













Brewal. Yes read the question I clearly state that I had run thoose commands. I have updated the question with the verbose dump.

– Ronnie Jespersen
Nov 19 '13 at 9:40





Brewal. Yes read the question I clearly state that I had run thoose commands. I have updated the question with the verbose dump.

– Ronnie Jespersen
Nov 19 '13 at 9:40













Please provide your composer.json file

– Mantas
Nov 20 '13 at 8:18





Please provide your composer.json file

– Mantas
Nov 20 '13 at 8:18












11 Answers
11






active

oldest

votes


















25














How to solve install/update Symfony 2 issues



One important Symfony requirement is that the app/cache and app/logs directories must be writable both by the web server and the command line user.



On Linux and macOS systems, if your web server user is different from your command line user, you need to configure permissions properly to avoid issues. There are several ways to achieve that:



The most common solution :



In a terminal execute following commands :



rm -rf bin
rm -rf vendor
composer install
# or if your didn't install composer
php composer.phar install


It should work now! For more informations see Symfony installation.



If you still have this error : «An error occurred when generating the bootstrap file»

It means that you have file permission issue.
See below procedure for solve the problem ↓



Setting up or Fixing File Permissions :



In a terminal execute following commands :



rm -rf app/cache/*
rm -rf app/logs/*


On macOS systems, the chmod command supports the +a flag to define an ACL. Use the following script to determine your web server user and grant the needed permissions:



HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d  -f1)
sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
sudo chmod +a "$(whoami) allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs


On most Linux and BSD distributions don't support chmod +a, but do support another utility called setfacl. You may need to install setfacl and enable ACL support on your disk partition before using it. Then, use the following script to determine your web server user and grant the needed permissions:



HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d  -f1)
# if this doesn't work, try adding `-n` option
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs


If none of the previous methods work for you



Change the umask so that the cache and log directories are group-writable or world-writable (depending if the web server user and the command line user are in the same group or not). To achieve this, put the following line at the beginning of the app/console, web/app.php and web/app_dev.php files:



umask(0002); // This will let the permissions be 0775
// or
umask(0000); // This will let the permissions be 0777



Note : Changing the umask is not thread-safe, so the ACL methods are recommended when they are available.




For more information see official documentation : Symfony file permissions






share|improve this answer





















  • 1





    I will give it a go :)

    – Ronnie Jespersen
    Feb 27 '14 at 9:15






  • 1





    Sorry I get the same error. The path could not be found and then Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-install-cmd event terminated with an exception

    – Ronnie Jespersen
    Feb 27 '14 at 9:57











  • @Ronnie Jespersen - I edit my answer. Follow the Setting up or Fixing File Permissions procedure for fix your issue.

    – Antoine Subit
    Sep 20 '16 at 10:51













  • yes I see. It's hard for me to say that this is the answer since I no longer on that codebase but I think you clearly state a lot of options to fix the issue. With the current 13 up-votes I hope its people expressing that it solves their issues so I'll accept your answer. Thanks

    – Ronnie Jespersen
    Sep 20 '16 at 11:15











  • You're welcome. I've got the exact same error and I fixed it with this exact procedure.

    – Antoine Subit
    Sep 20 '16 at 11:58



















0














I think remove the folder bundles in the web directory "web/bundles" before running the update. This should solve the assets install problems in post-update-cmd






share|improve this answer
























  • Same error i'm afraid... My web/bundles folder is empty. I tried both install and update but same error.

    – Ronnie Jespersen
    Mar 20 '14 at 22:57



















0














I had the same problem and solved it in two parts. The crux of the problem was bad code on my part that wouldn't specifically apply to someone else, but my method for uncovering the issue might be useful to someone else.



First, I created a temporary file: app/test.php



use DoctrineCommonAnnotationsAnnotationRegistry;
use ComposerAutoloadClassLoader;

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);

/**
* @var ClassLoader $loader
*/
$loader = require __DIR__.'/../vendor/autoload.php';


You'll notice that is a slimmed down version of app/autoload.php



Next in my shell, I simply ran:



php app/test.php


After some trial and error, I discovered that I had an error in a private repo that I had as a requirement in my composer.json file. In my case, and I had a bootstrap file that was calling the very bootstrap.cache.php that we're trying to get composer to create.



Anyway, this method was useful because it output errors that composer install/update would not, even with "--verbose" enabled and temporarily modifying the code to output all errors.






share|improve this answer
























  • Hi @Pivot Thanks for your reply.. my problem is specific to me and none of the other developers in the office. I will try your approach as soon as possible and return with the results :)

    – Ronnie Jespersen
    Mar 31 '14 at 19:26



















0














Try to clean the cache with



php app/console cache:clear


and then try again



composer update





share|improve this answer































    0














    I had the very same problem. Even calling



    composer create-project symfony/framework-standard-edition path/ "2.3.*"


    in an empty directory failed.



    After all I rebooted and everything is fine again.






    share|improve this answer

































      0














      this could also caused by an error in some controller, if your code is not clear then you can't update the composer . hope this help






      share|improve this answer































        0














        I came across the same problem running composer.phar install with Symfony3 on Mac OS (Mavericks) with MAMP: script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception.



        Solved by updating the PHP version from 5.4 to 5.6. As Symfony runs inside MAMP, I forgot that my system default PHP version is not supported by Symfony3. After the PHP upgrade, the composer run with success.






        share|improve this answer































          0














          I ran into the same problem trying to use Symfony 3 on a Bluehost, shared hosting, server.
          I first had to find and use the php 5.4 client in order to get composer to run, then I got the same error you did.
          Check the docs here.




          PHP needs to be a minimum version of PHP 5.5.9




          So you are using a php client that composer supports, and Symfony does not.
          Bluehost provides the php client v5.6.24 accessible at /usr/php/56/bin/php.



          So, using that php executable:



          /usr/php/56/bin/php ~/my/path/to/composer.phar install


          I successfully ran "composer install" and all of the post-install-cmd's completed with no errors.
          This is also the way to call bin/console or in your case app/console commands.
          i.e.



          ## Symfony 2
          /usr/php/56/bin/php app/console cache:clear -e prod

          ## Symfony 3
          /usr/php/56/bin/php bin/console cache:clear -e prod





          share|improve this answer
























          • It's been a long time since I had this problem so I have no way of verifying, but it sounds like that might have been the problem. Though i'm pretty sure the require "php": ">=5.3.3" was from their documentation meaning I would have the minimum required version of PHP needed to run the scripts.

            – Ronnie Jespersen
            Sep 5 '16 at 14:13



















          0














          I solved this by updating your composer.json to match the php version you have on your machine



          "config" : {
          "bin-dir" : "bin",
          "platform" : {
          "php" : "7.0.21" //Update this same as your $> php -v
          }
          },





          share|improve this answer































            0














            In my case I had no permissions errors. It had to do with a require() for disabled PHP functions in the pnctl-event-loop-emitter library. The composer autoloader was failing hard and crashed the script. The solution was to enable pcntl_ functions in php.ini.



            The offending file was vendor/composer/../gos/pnctl-event-loop-emitter/src/functions.php



            ; This directive allows you to disable certain functions for security reasons.^M
            ; It receives a comma-delimited list of function names. This directive is^M
            ; *NOT* affected by whether Safe Mode is turned On or Off.^M
            ; http://php.net/disable-functions^M
            ; disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
            disable_functions =





            share|improve this answer

































              -1














              I saw this error too. In my case the error stopped when I disabled the APC extension in php.ini.






              share|improve this answer























                Your Answer






                StackExchange.ifUsing("editor", function () {
                StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                StackExchange.snippets.init();
                });
                });
                }, "code-snippets");

                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "1"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f20067622%2fsymfony2-post-update-cmd-gives-an-error-occurred-when-generating-the-bootstrap%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                11 Answers
                11






                active

                oldest

                votes








                11 Answers
                11






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                25














                How to solve install/update Symfony 2 issues



                One important Symfony requirement is that the app/cache and app/logs directories must be writable both by the web server and the command line user.



                On Linux and macOS systems, if your web server user is different from your command line user, you need to configure permissions properly to avoid issues. There are several ways to achieve that:



                The most common solution :



                In a terminal execute following commands :



                rm -rf bin
                rm -rf vendor
                composer install
                # or if your didn't install composer
                php composer.phar install


                It should work now! For more informations see Symfony installation.



                If you still have this error : «An error occurred when generating the bootstrap file»

                It means that you have file permission issue.
                See below procedure for solve the problem ↓



                Setting up or Fixing File Permissions :



                In a terminal execute following commands :



                rm -rf app/cache/*
                rm -rf app/logs/*


                On macOS systems, the chmod command supports the +a flag to define an ACL. Use the following script to determine your web server user and grant the needed permissions:



                HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d  -f1)
                sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
                sudo chmod +a "$(whoami) allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs


                On most Linux and BSD distributions don't support chmod +a, but do support another utility called setfacl. You may need to install setfacl and enable ACL support on your disk partition before using it. Then, use the following script to determine your web server user and grant the needed permissions:



                HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d  -f1)
                # if this doesn't work, try adding `-n` option
                sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs
                sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs


                If none of the previous methods work for you



                Change the umask so that the cache and log directories are group-writable or world-writable (depending if the web server user and the command line user are in the same group or not). To achieve this, put the following line at the beginning of the app/console, web/app.php and web/app_dev.php files:



                umask(0002); // This will let the permissions be 0775
                // or
                umask(0000); // This will let the permissions be 0777



                Note : Changing the umask is not thread-safe, so the ACL methods are recommended when they are available.




                For more information see official documentation : Symfony file permissions






                share|improve this answer





















                • 1





                  I will give it a go :)

                  – Ronnie Jespersen
                  Feb 27 '14 at 9:15






                • 1





                  Sorry I get the same error. The path could not be found and then Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-install-cmd event terminated with an exception

                  – Ronnie Jespersen
                  Feb 27 '14 at 9:57











                • @Ronnie Jespersen - I edit my answer. Follow the Setting up or Fixing File Permissions procedure for fix your issue.

                  – Antoine Subit
                  Sep 20 '16 at 10:51













                • yes I see. It's hard for me to say that this is the answer since I no longer on that codebase but I think you clearly state a lot of options to fix the issue. With the current 13 up-votes I hope its people expressing that it solves their issues so I'll accept your answer. Thanks

                  – Ronnie Jespersen
                  Sep 20 '16 at 11:15











                • You're welcome. I've got the exact same error and I fixed it with this exact procedure.

                  – Antoine Subit
                  Sep 20 '16 at 11:58
















                25














                How to solve install/update Symfony 2 issues



                One important Symfony requirement is that the app/cache and app/logs directories must be writable both by the web server and the command line user.



                On Linux and macOS systems, if your web server user is different from your command line user, you need to configure permissions properly to avoid issues. There are several ways to achieve that:



                The most common solution :



                In a terminal execute following commands :



                rm -rf bin
                rm -rf vendor
                composer install
                # or if your didn't install composer
                php composer.phar install


                It should work now! For more informations see Symfony installation.



                If you still have this error : «An error occurred when generating the bootstrap file»

                It means that you have file permission issue.
                See below procedure for solve the problem ↓



                Setting up or Fixing File Permissions :



                In a terminal execute following commands :



                rm -rf app/cache/*
                rm -rf app/logs/*


                On macOS systems, the chmod command supports the +a flag to define an ACL. Use the following script to determine your web server user and grant the needed permissions:



                HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d  -f1)
                sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
                sudo chmod +a "$(whoami) allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs


                On most Linux and BSD distributions don't support chmod +a, but do support another utility called setfacl. You may need to install setfacl and enable ACL support on your disk partition before using it. Then, use the following script to determine your web server user and grant the needed permissions:



                HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d  -f1)
                # if this doesn't work, try adding `-n` option
                sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs
                sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs


                If none of the previous methods work for you



                Change the umask so that the cache and log directories are group-writable or world-writable (depending if the web server user and the command line user are in the same group or not). To achieve this, put the following line at the beginning of the app/console, web/app.php and web/app_dev.php files:



                umask(0002); // This will let the permissions be 0775
                // or
                umask(0000); // This will let the permissions be 0777



                Note : Changing the umask is not thread-safe, so the ACL methods are recommended when they are available.




                For more information see official documentation : Symfony file permissions






                share|improve this answer





















                • 1





                  I will give it a go :)

                  – Ronnie Jespersen
                  Feb 27 '14 at 9:15






                • 1





                  Sorry I get the same error. The path could not be found and then Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-install-cmd event terminated with an exception

                  – Ronnie Jespersen
                  Feb 27 '14 at 9:57











                • @Ronnie Jespersen - I edit my answer. Follow the Setting up or Fixing File Permissions procedure for fix your issue.

                  – Antoine Subit
                  Sep 20 '16 at 10:51













                • yes I see. It's hard for me to say that this is the answer since I no longer on that codebase but I think you clearly state a lot of options to fix the issue. With the current 13 up-votes I hope its people expressing that it solves their issues so I'll accept your answer. Thanks

                  – Ronnie Jespersen
                  Sep 20 '16 at 11:15











                • You're welcome. I've got the exact same error and I fixed it with this exact procedure.

                  – Antoine Subit
                  Sep 20 '16 at 11:58














                25












                25








                25







                How to solve install/update Symfony 2 issues



                One important Symfony requirement is that the app/cache and app/logs directories must be writable both by the web server and the command line user.



                On Linux and macOS systems, if your web server user is different from your command line user, you need to configure permissions properly to avoid issues. There are several ways to achieve that:



                The most common solution :



                In a terminal execute following commands :



                rm -rf bin
                rm -rf vendor
                composer install
                # or if your didn't install composer
                php composer.phar install


                It should work now! For more informations see Symfony installation.



                If you still have this error : «An error occurred when generating the bootstrap file»

                It means that you have file permission issue.
                See below procedure for solve the problem ↓



                Setting up or Fixing File Permissions :



                In a terminal execute following commands :



                rm -rf app/cache/*
                rm -rf app/logs/*


                On macOS systems, the chmod command supports the +a flag to define an ACL. Use the following script to determine your web server user and grant the needed permissions:



                HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d  -f1)
                sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
                sudo chmod +a "$(whoami) allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs


                On most Linux and BSD distributions don't support chmod +a, but do support another utility called setfacl. You may need to install setfacl and enable ACL support on your disk partition before using it. Then, use the following script to determine your web server user and grant the needed permissions:



                HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d  -f1)
                # if this doesn't work, try adding `-n` option
                sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs
                sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs


                If none of the previous methods work for you



                Change the umask so that the cache and log directories are group-writable or world-writable (depending if the web server user and the command line user are in the same group or not). To achieve this, put the following line at the beginning of the app/console, web/app.php and web/app_dev.php files:



                umask(0002); // This will let the permissions be 0775
                // or
                umask(0000); // This will let the permissions be 0777



                Note : Changing the umask is not thread-safe, so the ACL methods are recommended when they are available.




                For more information see official documentation : Symfony file permissions






                share|improve this answer















                How to solve install/update Symfony 2 issues



                One important Symfony requirement is that the app/cache and app/logs directories must be writable both by the web server and the command line user.



                On Linux and macOS systems, if your web server user is different from your command line user, you need to configure permissions properly to avoid issues. There are several ways to achieve that:



                The most common solution :



                In a terminal execute following commands :



                rm -rf bin
                rm -rf vendor
                composer install
                # or if your didn't install composer
                php composer.phar install


                It should work now! For more informations see Symfony installation.



                If you still have this error : «An error occurred when generating the bootstrap file»

                It means that you have file permission issue.
                See below procedure for solve the problem ↓



                Setting up or Fixing File Permissions :



                In a terminal execute following commands :



                rm -rf app/cache/*
                rm -rf app/logs/*


                On macOS systems, the chmod command supports the +a flag to define an ACL. Use the following script to determine your web server user and grant the needed permissions:



                HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d  -f1)
                sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
                sudo chmod +a "$(whoami) allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs


                On most Linux and BSD distributions don't support chmod +a, but do support another utility called setfacl. You may need to install setfacl and enable ACL support on your disk partition before using it. Then, use the following script to determine your web server user and grant the needed permissions:



                HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d  -f1)
                # if this doesn't work, try adding `-n` option
                sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs
                sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs


                If none of the previous methods work for you



                Change the umask so that the cache and log directories are group-writable or world-writable (depending if the web server user and the command line user are in the same group or not). To achieve this, put the following line at the beginning of the app/console, web/app.php and web/app_dev.php files:



                umask(0002); // This will let the permissions be 0775
                // or
                umask(0000); // This will let the permissions be 0777



                Note : Changing the umask is not thread-safe, so the ACL methods are recommended when they are available.




                For more information see official documentation : Symfony file permissions







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Sep 6 '17 at 7:30

























                answered Feb 27 '14 at 8:53









                Antoine SubitAntoine Subit

                6,37322946




                6,37322946








                • 1





                  I will give it a go :)

                  – Ronnie Jespersen
                  Feb 27 '14 at 9:15






                • 1





                  Sorry I get the same error. The path could not be found and then Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-install-cmd event terminated with an exception

                  – Ronnie Jespersen
                  Feb 27 '14 at 9:57











                • @Ronnie Jespersen - I edit my answer. Follow the Setting up or Fixing File Permissions procedure for fix your issue.

                  – Antoine Subit
                  Sep 20 '16 at 10:51













                • yes I see. It's hard for me to say that this is the answer since I no longer on that codebase but I think you clearly state a lot of options to fix the issue. With the current 13 up-votes I hope its people expressing that it solves their issues so I'll accept your answer. Thanks

                  – Ronnie Jespersen
                  Sep 20 '16 at 11:15











                • You're welcome. I've got the exact same error and I fixed it with this exact procedure.

                  – Antoine Subit
                  Sep 20 '16 at 11:58














                • 1





                  I will give it a go :)

                  – Ronnie Jespersen
                  Feb 27 '14 at 9:15






                • 1





                  Sorry I get the same error. The path could not be found and then Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-install-cmd event terminated with an exception

                  – Ronnie Jespersen
                  Feb 27 '14 at 9:57











                • @Ronnie Jespersen - I edit my answer. Follow the Setting up or Fixing File Permissions procedure for fix your issue.

                  – Antoine Subit
                  Sep 20 '16 at 10:51













                • yes I see. It's hard for me to say that this is the answer since I no longer on that codebase but I think you clearly state a lot of options to fix the issue. With the current 13 up-votes I hope its people expressing that it solves their issues so I'll accept your answer. Thanks

                  – Ronnie Jespersen
                  Sep 20 '16 at 11:15











                • You're welcome. I've got the exact same error and I fixed it with this exact procedure.

                  – Antoine Subit
                  Sep 20 '16 at 11:58








                1




                1





                I will give it a go :)

                – Ronnie Jespersen
                Feb 27 '14 at 9:15





                I will give it a go :)

                – Ronnie Jespersen
                Feb 27 '14 at 9:15




                1




                1





                Sorry I get the same error. The path could not be found and then Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-install-cmd event terminated with an exception

                – Ronnie Jespersen
                Feb 27 '14 at 9:57





                Sorry I get the same error. The path could not be found and then Script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-install-cmd event terminated with an exception

                – Ronnie Jespersen
                Feb 27 '14 at 9:57













                @Ronnie Jespersen - I edit my answer. Follow the Setting up or Fixing File Permissions procedure for fix your issue.

                – Antoine Subit
                Sep 20 '16 at 10:51







                @Ronnie Jespersen - I edit my answer. Follow the Setting up or Fixing File Permissions procedure for fix your issue.

                – Antoine Subit
                Sep 20 '16 at 10:51















                yes I see. It's hard for me to say that this is the answer since I no longer on that codebase but I think you clearly state a lot of options to fix the issue. With the current 13 up-votes I hope its people expressing that it solves their issues so I'll accept your answer. Thanks

                – Ronnie Jespersen
                Sep 20 '16 at 11:15





                yes I see. It's hard for me to say that this is the answer since I no longer on that codebase but I think you clearly state a lot of options to fix the issue. With the current 13 up-votes I hope its people expressing that it solves their issues so I'll accept your answer. Thanks

                – Ronnie Jespersen
                Sep 20 '16 at 11:15













                You're welcome. I've got the exact same error and I fixed it with this exact procedure.

                – Antoine Subit
                Sep 20 '16 at 11:58





                You're welcome. I've got the exact same error and I fixed it with this exact procedure.

                – Antoine Subit
                Sep 20 '16 at 11:58













                0














                I think remove the folder bundles in the web directory "web/bundles" before running the update. This should solve the assets install problems in post-update-cmd






                share|improve this answer
























                • Same error i'm afraid... My web/bundles folder is empty. I tried both install and update but same error.

                  – Ronnie Jespersen
                  Mar 20 '14 at 22:57
















                0














                I think remove the folder bundles in the web directory "web/bundles" before running the update. This should solve the assets install problems in post-update-cmd






                share|improve this answer
























                • Same error i'm afraid... My web/bundles folder is empty. I tried both install and update but same error.

                  – Ronnie Jespersen
                  Mar 20 '14 at 22:57














                0












                0








                0







                I think remove the folder bundles in the web directory "web/bundles" before running the update. This should solve the assets install problems in post-update-cmd






                share|improve this answer













                I think remove the folder bundles in the web directory "web/bundles" before running the update. This should solve the assets install problems in post-update-cmd







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 20 '14 at 22:01









                Safwan BakaisSafwan Bakais

                9110




                9110













                • Same error i'm afraid... My web/bundles folder is empty. I tried both install and update but same error.

                  – Ronnie Jespersen
                  Mar 20 '14 at 22:57



















                • Same error i'm afraid... My web/bundles folder is empty. I tried both install and update but same error.

                  – Ronnie Jespersen
                  Mar 20 '14 at 22:57

















                Same error i'm afraid... My web/bundles folder is empty. I tried both install and update but same error.

                – Ronnie Jespersen
                Mar 20 '14 at 22:57





                Same error i'm afraid... My web/bundles folder is empty. I tried both install and update but same error.

                – Ronnie Jespersen
                Mar 20 '14 at 22:57











                0














                I had the same problem and solved it in two parts. The crux of the problem was bad code on my part that wouldn't specifically apply to someone else, but my method for uncovering the issue might be useful to someone else.



                First, I created a temporary file: app/test.php



                use DoctrineCommonAnnotationsAnnotationRegistry;
                use ComposerAutoloadClassLoader;

                error_reporting(E_ALL | E_STRICT);
                ini_set('display_errors', 1);

                /**
                * @var ClassLoader $loader
                */
                $loader = require __DIR__.'/../vendor/autoload.php';


                You'll notice that is a slimmed down version of app/autoload.php



                Next in my shell, I simply ran:



                php app/test.php


                After some trial and error, I discovered that I had an error in a private repo that I had as a requirement in my composer.json file. In my case, and I had a bootstrap file that was calling the very bootstrap.cache.php that we're trying to get composer to create.



                Anyway, this method was useful because it output errors that composer install/update would not, even with "--verbose" enabled and temporarily modifying the code to output all errors.






                share|improve this answer
























                • Hi @Pivot Thanks for your reply.. my problem is specific to me and none of the other developers in the office. I will try your approach as soon as possible and return with the results :)

                  – Ronnie Jespersen
                  Mar 31 '14 at 19:26
















                0














                I had the same problem and solved it in two parts. The crux of the problem was bad code on my part that wouldn't specifically apply to someone else, but my method for uncovering the issue might be useful to someone else.



                First, I created a temporary file: app/test.php



                use DoctrineCommonAnnotationsAnnotationRegistry;
                use ComposerAutoloadClassLoader;

                error_reporting(E_ALL | E_STRICT);
                ini_set('display_errors', 1);

                /**
                * @var ClassLoader $loader
                */
                $loader = require __DIR__.'/../vendor/autoload.php';


                You'll notice that is a slimmed down version of app/autoload.php



                Next in my shell, I simply ran:



                php app/test.php


                After some trial and error, I discovered that I had an error in a private repo that I had as a requirement in my composer.json file. In my case, and I had a bootstrap file that was calling the very bootstrap.cache.php that we're trying to get composer to create.



                Anyway, this method was useful because it output errors that composer install/update would not, even with "--verbose" enabled and temporarily modifying the code to output all errors.






                share|improve this answer
























                • Hi @Pivot Thanks for your reply.. my problem is specific to me and none of the other developers in the office. I will try your approach as soon as possible and return with the results :)

                  – Ronnie Jespersen
                  Mar 31 '14 at 19:26














                0












                0








                0







                I had the same problem and solved it in two parts. The crux of the problem was bad code on my part that wouldn't specifically apply to someone else, but my method for uncovering the issue might be useful to someone else.



                First, I created a temporary file: app/test.php



                use DoctrineCommonAnnotationsAnnotationRegistry;
                use ComposerAutoloadClassLoader;

                error_reporting(E_ALL | E_STRICT);
                ini_set('display_errors', 1);

                /**
                * @var ClassLoader $loader
                */
                $loader = require __DIR__.'/../vendor/autoload.php';


                You'll notice that is a slimmed down version of app/autoload.php



                Next in my shell, I simply ran:



                php app/test.php


                After some trial and error, I discovered that I had an error in a private repo that I had as a requirement in my composer.json file. In my case, and I had a bootstrap file that was calling the very bootstrap.cache.php that we're trying to get composer to create.



                Anyway, this method was useful because it output errors that composer install/update would not, even with "--verbose" enabled and temporarily modifying the code to output all errors.






                share|improve this answer













                I had the same problem and solved it in two parts. The crux of the problem was bad code on my part that wouldn't specifically apply to someone else, but my method for uncovering the issue might be useful to someone else.



                First, I created a temporary file: app/test.php



                use DoctrineCommonAnnotationsAnnotationRegistry;
                use ComposerAutoloadClassLoader;

                error_reporting(E_ALL | E_STRICT);
                ini_set('display_errors', 1);

                /**
                * @var ClassLoader $loader
                */
                $loader = require __DIR__.'/../vendor/autoload.php';


                You'll notice that is a slimmed down version of app/autoload.php



                Next in my shell, I simply ran:



                php app/test.php


                After some trial and error, I discovered that I had an error in a private repo that I had as a requirement in my composer.json file. In my case, and I had a bootstrap file that was calling the very bootstrap.cache.php that we're trying to get composer to create.



                Anyway, this method was useful because it output errors that composer install/update would not, even with "--verbose" enabled and temporarily modifying the code to output all errors.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 31 '14 at 19:21









                mattcrowemattcrowe

                1941113




                1941113













                • Hi @Pivot Thanks for your reply.. my problem is specific to me and none of the other developers in the office. I will try your approach as soon as possible and return with the results :)

                  – Ronnie Jespersen
                  Mar 31 '14 at 19:26



















                • Hi @Pivot Thanks for your reply.. my problem is specific to me and none of the other developers in the office. I will try your approach as soon as possible and return with the results :)

                  – Ronnie Jespersen
                  Mar 31 '14 at 19:26

















                Hi @Pivot Thanks for your reply.. my problem is specific to me and none of the other developers in the office. I will try your approach as soon as possible and return with the results :)

                – Ronnie Jespersen
                Mar 31 '14 at 19:26





                Hi @Pivot Thanks for your reply.. my problem is specific to me and none of the other developers in the office. I will try your approach as soon as possible and return with the results :)

                – Ronnie Jespersen
                Mar 31 '14 at 19:26











                0














                Try to clean the cache with



                php app/console cache:clear


                and then try again



                composer update





                share|improve this answer




























                  0














                  Try to clean the cache with



                  php app/console cache:clear


                  and then try again



                  composer update





                  share|improve this answer


























                    0












                    0








                    0







                    Try to clean the cache with



                    php app/console cache:clear


                    and then try again



                    composer update





                    share|improve this answer













                    Try to clean the cache with



                    php app/console cache:clear


                    and then try again



                    composer update






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 26 '14 at 11:22









                    iosesioses

                    4871611




                    4871611























                        0














                        I had the very same problem. Even calling



                        composer create-project symfony/framework-standard-edition path/ "2.3.*"


                        in an empty directory failed.



                        After all I rebooted and everything is fine again.






                        share|improve this answer






























                          0














                          I had the very same problem. Even calling



                          composer create-project symfony/framework-standard-edition path/ "2.3.*"


                          in an empty directory failed.



                          After all I rebooted and everything is fine again.






                          share|improve this answer




























                            0












                            0








                            0







                            I had the very same problem. Even calling



                            composer create-project symfony/framework-standard-edition path/ "2.3.*"


                            in an empty directory failed.



                            After all I rebooted and everything is fine again.






                            share|improve this answer















                            I had the very same problem. Even calling



                            composer create-project symfony/framework-standard-edition path/ "2.3.*"


                            in an empty directory failed.



                            After all I rebooted and everything is fine again.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Dec 2 '14 at 13:31

























                            answered Nov 28 '14 at 6:23









                            BetaRideBetaRide

                            8,8491965129




                            8,8491965129























                                0














                                this could also caused by an error in some controller, if your code is not clear then you can't update the composer . hope this help






                                share|improve this answer




























                                  0














                                  this could also caused by an error in some controller, if your code is not clear then you can't update the composer . hope this help






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    this could also caused by an error in some controller, if your code is not clear then you can't update the composer . hope this help






                                    share|improve this answer













                                    this could also caused by an error in some controller, if your code is not clear then you can't update the composer . hope this help







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered May 14 '15 at 11:59









                                    ADA15ADA15

                                    6213




                                    6213























                                        0














                                        I came across the same problem running composer.phar install with Symfony3 on Mac OS (Mavericks) with MAMP: script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception.



                                        Solved by updating the PHP version from 5.4 to 5.6. As Symfony runs inside MAMP, I forgot that my system default PHP version is not supported by Symfony3. After the PHP upgrade, the composer run with success.






                                        share|improve this answer




























                                          0














                                          I came across the same problem running composer.phar install with Symfony3 on Mac OS (Mavericks) with MAMP: script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception.



                                          Solved by updating the PHP version from 5.4 to 5.6. As Symfony runs inside MAMP, I forgot that my system default PHP version is not supported by Symfony3. After the PHP upgrade, the composer run with success.






                                          share|improve this answer


























                                            0












                                            0








                                            0







                                            I came across the same problem running composer.phar install with Symfony3 on Mac OS (Mavericks) with MAMP: script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception.



                                            Solved by updating the PHP version from 5.4 to 5.6. As Symfony runs inside MAMP, I forgot that my system default PHP version is not supported by Symfony3. After the PHP upgrade, the composer run with success.






                                            share|improve this answer













                                            I came across the same problem running composer.phar install with Symfony3 on Mac OS (Mavericks) with MAMP: script SensioBundleDistributionBundleComposerScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception.



                                            Solved by updating the PHP version from 5.4 to 5.6. As Symfony runs inside MAMP, I forgot that my system default PHP version is not supported by Symfony3. After the PHP upgrade, the composer run with success.







                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Mar 16 '16 at 22:30









                                            user2048759user2048759

                                            11




                                            11























                                                0














                                                I ran into the same problem trying to use Symfony 3 on a Bluehost, shared hosting, server.
                                                I first had to find and use the php 5.4 client in order to get composer to run, then I got the same error you did.
                                                Check the docs here.




                                                PHP needs to be a minimum version of PHP 5.5.9




                                                So you are using a php client that composer supports, and Symfony does not.
                                                Bluehost provides the php client v5.6.24 accessible at /usr/php/56/bin/php.



                                                So, using that php executable:



                                                /usr/php/56/bin/php ~/my/path/to/composer.phar install


                                                I successfully ran "composer install" and all of the post-install-cmd's completed with no errors.
                                                This is also the way to call bin/console or in your case app/console commands.
                                                i.e.



                                                ## Symfony 2
                                                /usr/php/56/bin/php app/console cache:clear -e prod

                                                ## Symfony 3
                                                /usr/php/56/bin/php bin/console cache:clear -e prod





                                                share|improve this answer
























                                                • It's been a long time since I had this problem so I have no way of verifying, but it sounds like that might have been the problem. Though i'm pretty sure the require "php": ">=5.3.3" was from their documentation meaning I would have the minimum required version of PHP needed to run the scripts.

                                                  – Ronnie Jespersen
                                                  Sep 5 '16 at 14:13
















                                                0














                                                I ran into the same problem trying to use Symfony 3 on a Bluehost, shared hosting, server.
                                                I first had to find and use the php 5.4 client in order to get composer to run, then I got the same error you did.
                                                Check the docs here.




                                                PHP needs to be a minimum version of PHP 5.5.9




                                                So you are using a php client that composer supports, and Symfony does not.
                                                Bluehost provides the php client v5.6.24 accessible at /usr/php/56/bin/php.



                                                So, using that php executable:



                                                /usr/php/56/bin/php ~/my/path/to/composer.phar install


                                                I successfully ran "composer install" and all of the post-install-cmd's completed with no errors.
                                                This is also the way to call bin/console or in your case app/console commands.
                                                i.e.



                                                ## Symfony 2
                                                /usr/php/56/bin/php app/console cache:clear -e prod

                                                ## Symfony 3
                                                /usr/php/56/bin/php bin/console cache:clear -e prod





                                                share|improve this answer
























                                                • It's been a long time since I had this problem so I have no way of verifying, but it sounds like that might have been the problem. Though i'm pretty sure the require "php": ">=5.3.3" was from their documentation meaning I would have the minimum required version of PHP needed to run the scripts.

                                                  – Ronnie Jespersen
                                                  Sep 5 '16 at 14:13














                                                0












                                                0








                                                0







                                                I ran into the same problem trying to use Symfony 3 on a Bluehost, shared hosting, server.
                                                I first had to find and use the php 5.4 client in order to get composer to run, then I got the same error you did.
                                                Check the docs here.




                                                PHP needs to be a minimum version of PHP 5.5.9




                                                So you are using a php client that composer supports, and Symfony does not.
                                                Bluehost provides the php client v5.6.24 accessible at /usr/php/56/bin/php.



                                                So, using that php executable:



                                                /usr/php/56/bin/php ~/my/path/to/composer.phar install


                                                I successfully ran "composer install" and all of the post-install-cmd's completed with no errors.
                                                This is also the way to call bin/console or in your case app/console commands.
                                                i.e.



                                                ## Symfony 2
                                                /usr/php/56/bin/php app/console cache:clear -e prod

                                                ## Symfony 3
                                                /usr/php/56/bin/php bin/console cache:clear -e prod





                                                share|improve this answer













                                                I ran into the same problem trying to use Symfony 3 on a Bluehost, shared hosting, server.
                                                I first had to find and use the php 5.4 client in order to get composer to run, then I got the same error you did.
                                                Check the docs here.




                                                PHP needs to be a minimum version of PHP 5.5.9




                                                So you are using a php client that composer supports, and Symfony does not.
                                                Bluehost provides the php client v5.6.24 accessible at /usr/php/56/bin/php.



                                                So, using that php executable:



                                                /usr/php/56/bin/php ~/my/path/to/composer.phar install


                                                I successfully ran "composer install" and all of the post-install-cmd's completed with no errors.
                                                This is also the way to call bin/console or in your case app/console commands.
                                                i.e.



                                                ## Symfony 2
                                                /usr/php/56/bin/php app/console cache:clear -e prod

                                                ## Symfony 3
                                                /usr/php/56/bin/php bin/console cache:clear -e prod






                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Sep 5 '16 at 4:14









                                                Arleigh HixArleigh Hix

                                                934413




                                                934413













                                                • It's been a long time since I had this problem so I have no way of verifying, but it sounds like that might have been the problem. Though i'm pretty sure the require "php": ">=5.3.3" was from their documentation meaning I would have the minimum required version of PHP needed to run the scripts.

                                                  – Ronnie Jespersen
                                                  Sep 5 '16 at 14:13



















                                                • It's been a long time since I had this problem so I have no way of verifying, but it sounds like that might have been the problem. Though i'm pretty sure the require "php": ">=5.3.3" was from their documentation meaning I would have the minimum required version of PHP needed to run the scripts.

                                                  – Ronnie Jespersen
                                                  Sep 5 '16 at 14:13

















                                                It's been a long time since I had this problem so I have no way of verifying, but it sounds like that might have been the problem. Though i'm pretty sure the require "php": ">=5.3.3" was from their documentation meaning I would have the minimum required version of PHP needed to run the scripts.

                                                – Ronnie Jespersen
                                                Sep 5 '16 at 14:13





                                                It's been a long time since I had this problem so I have no way of verifying, but it sounds like that might have been the problem. Though i'm pretty sure the require "php": ">=5.3.3" was from their documentation meaning I would have the minimum required version of PHP needed to run the scripts.

                                                – Ronnie Jespersen
                                                Sep 5 '16 at 14:13











                                                0














                                                I solved this by updating your composer.json to match the php version you have on your machine



                                                "config" : {
                                                "bin-dir" : "bin",
                                                "platform" : {
                                                "php" : "7.0.21" //Update this same as your $> php -v
                                                }
                                                },





                                                share|improve this answer




























                                                  0














                                                  I solved this by updating your composer.json to match the php version you have on your machine



                                                  "config" : {
                                                  "bin-dir" : "bin",
                                                  "platform" : {
                                                  "php" : "7.0.21" //Update this same as your $> php -v
                                                  }
                                                  },





                                                  share|improve this answer


























                                                    0












                                                    0








                                                    0







                                                    I solved this by updating your composer.json to match the php version you have on your machine



                                                    "config" : {
                                                    "bin-dir" : "bin",
                                                    "platform" : {
                                                    "php" : "7.0.21" //Update this same as your $> php -v
                                                    }
                                                    },





                                                    share|improve this answer













                                                    I solved this by updating your composer.json to match the php version you have on your machine



                                                    "config" : {
                                                    "bin-dir" : "bin",
                                                    "platform" : {
                                                    "php" : "7.0.21" //Update this same as your $> php -v
                                                    }
                                                    },






                                                    share|improve this answer












                                                    share|improve this answer



                                                    share|improve this answer










                                                    answered Sep 11 '17 at 11:44









                                                    Roel BRoel B

                                                    11




                                                    11























                                                        0














                                                        In my case I had no permissions errors. It had to do with a require() for disabled PHP functions in the pnctl-event-loop-emitter library. The composer autoloader was failing hard and crashed the script. The solution was to enable pcntl_ functions in php.ini.



                                                        The offending file was vendor/composer/../gos/pnctl-event-loop-emitter/src/functions.php



                                                        ; This directive allows you to disable certain functions for security reasons.^M
                                                        ; It receives a comma-delimited list of function names. This directive is^M
                                                        ; *NOT* affected by whether Safe Mode is turned On or Off.^M
                                                        ; http://php.net/disable-functions^M
                                                        ; disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
                                                        disable_functions =





                                                        share|improve this answer






























                                                          0














                                                          In my case I had no permissions errors. It had to do with a require() for disabled PHP functions in the pnctl-event-loop-emitter library. The composer autoloader was failing hard and crashed the script. The solution was to enable pcntl_ functions in php.ini.



                                                          The offending file was vendor/composer/../gos/pnctl-event-loop-emitter/src/functions.php



                                                          ; This directive allows you to disable certain functions for security reasons.^M
                                                          ; It receives a comma-delimited list of function names. This directive is^M
                                                          ; *NOT* affected by whether Safe Mode is turned On or Off.^M
                                                          ; http://php.net/disable-functions^M
                                                          ; disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
                                                          disable_functions =





                                                          share|improve this answer




























                                                            0












                                                            0








                                                            0







                                                            In my case I had no permissions errors. It had to do with a require() for disabled PHP functions in the pnctl-event-loop-emitter library. The composer autoloader was failing hard and crashed the script. The solution was to enable pcntl_ functions in php.ini.



                                                            The offending file was vendor/composer/../gos/pnctl-event-loop-emitter/src/functions.php



                                                            ; This directive allows you to disable certain functions for security reasons.^M
                                                            ; It receives a comma-delimited list of function names. This directive is^M
                                                            ; *NOT* affected by whether Safe Mode is turned On or Off.^M
                                                            ; http://php.net/disable-functions^M
                                                            ; disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
                                                            disable_functions =





                                                            share|improve this answer















                                                            In my case I had no permissions errors. It had to do with a require() for disabled PHP functions in the pnctl-event-loop-emitter library. The composer autoloader was failing hard and crashed the script. The solution was to enable pcntl_ functions in php.ini.



                                                            The offending file was vendor/composer/../gos/pnctl-event-loop-emitter/src/functions.php



                                                            ; This directive allows you to disable certain functions for security reasons.^M
                                                            ; It receives a comma-delimited list of function names. This directive is^M
                                                            ; *NOT* affected by whether Safe Mode is turned On or Off.^M
                                                            ; http://php.net/disable-functions^M
                                                            ; disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
                                                            disable_functions =






                                                            share|improve this answer














                                                            share|improve this answer



                                                            share|improve this answer








                                                            edited Jan 3 at 7:51









                                                            J. Ghyllebert

                                                            1,58412333




                                                            1,58412333










                                                            answered Jan 3 at 6:31









                                                            Ryan SundbergRyan Sundberg

                                                            1




                                                            1























                                                                -1














                                                                I saw this error too. In my case the error stopped when I disabled the APC extension in php.ini.






                                                                share|improve this answer




























                                                                  -1














                                                                  I saw this error too. In my case the error stopped when I disabled the APC extension in php.ini.






                                                                  share|improve this answer


























                                                                    -1












                                                                    -1








                                                                    -1







                                                                    I saw this error too. In my case the error stopped when I disabled the APC extension in php.ini.






                                                                    share|improve this answer













                                                                    I saw this error too. In my case the error stopped when I disabled the APC extension in php.ini.







                                                                    share|improve this answer












                                                                    share|improve this answer



                                                                    share|improve this answer










                                                                    answered Dec 30 '14 at 0:41









                                                                    user2701551user2701551

                                                                    91




                                                                    91






























                                                                        draft saved

                                                                        draft discarded




















































                                                                        Thanks for contributing an answer to Stack Overflow!


                                                                        • Please be sure to answer the question. Provide details and share your research!

                                                                        But avoid



                                                                        • Asking for help, clarification, or responding to other answers.

                                                                        • Making statements based on opinion; back them up with references or personal experience.


                                                                        To learn more, see our tips on writing great answers.




                                                                        draft saved


                                                                        draft discarded














                                                                        StackExchange.ready(
                                                                        function () {
                                                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f20067622%2fsymfony2-post-update-cmd-gives-an-error-occurred-when-generating-the-bootstrap%23new-answer', 'question_page');
                                                                        }
                                                                        );

                                                                        Post as a guest















                                                                        Required, but never shown





















































                                                                        Required, but never shown














                                                                        Required, but never shown












                                                                        Required, but never shown







                                                                        Required, but never shown

































                                                                        Required, but never shown














                                                                        Required, but never shown












                                                                        Required, but never shown







                                                                        Required, but never shown







                                                                        Popular posts from this blog

                                                                        Mossoró

                                                                        Error while reading .h5 file using the rhdf5 package in R

                                                                        Pushsharp Apns notification error: 'InvalidToken'