4

Running php composer.phar with the latest version gives me:

PHP Fatal error:  Cannot redeclare class Symfony\Component\Console\Helper\Helper in phar:/composer.phar/vendor/symfony/console/Symfony/Component/Console/Helper/Helper.php on line 19

What's up? Works fine locally, but on a Linux server.

This happens as soon as I try to run any commands or just the file directly. I can't self-update or anything. I've tried redownloading.

1
  • Are there any differences in the php.ini files on each machine? Commented Oct 16, 2012 at 8:20

1 Answer 1

8

Most likely you have apc.enable_cli set to 1, you can check with php -i | grep apc.

Another way to check everything is fine to run composer is running the installer in check-only mode:

curl -s https://getcomposer.org/installer | php -- --check

APC completely breaks down with PHARs (at least in CLI mode), and it does not provide any caching anyway in CLI since every process is independent, so disabling it makes sense, the flag is just there for debugging purposes AFAIK.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.