Skip to content

Fatal error: Uncaught Error: Class 'Cli' not found in /mnt/www/bin/magento:31 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mrtuvn opened this issue Feb 13, 2017 · 6 comments

Comments

@mrtuvn
Copy link

mrtuvn commented Feb 13, 2017

Got this error when run php bin/magento inside container
How to fix it? I am using ubuntu 16.10 Composer created project successful

errors

@maxbucknell
Copy link
Contributor

How did you connect to the container? There are a few compatibility issues between alpine Linux and Magento 2, but I don't think that's what this is.

By the way. When you run Composer, you only have to say "composer", not "php composer". You have an error in your composer update line.

@mrtuvn
Copy link
Author

mrtuvn commented Feb 13, 2017

i connect to container by bin/rd run then i run "composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition ." After that if i try to run php bin/magento then it show error not found

@maxbucknell
Copy link
Contributor

Please exit servers/appserver/etc/php.ini to remove the line about auto_prepend_file and try again.

@mrtuvn
Copy link
Author

mrtuvn commented Feb 13, 2017

ok it works

@maxbucknell
Copy link
Contributor

maxbucknell commented Feb 13, 2017

You will now not be able to compile static assets. This is a known Magento issue (magento/magento2#8070).

But in the mean time, you can install an updated version of zend-stdlib. You need to put something like "zendframework/zend-stdlib": "2.x as 2.4.6".

I'll find the actual line when I get to work.


UPDATE

The line you need is:

"zendframework/zend-stdlib": "2.7.7 as 2.4.11"

I have observed no other adverse effects of this change.

@maxbucknell
Copy link
Contributor

The solution here in the mean time is use a PHP container that is Debian based. It's on my list to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants