Yii2

Ref: https://www.yiiframework.com/
https://www.yiiframework.com/doc/guide/2.0/en/start-installation

How to install Yii PHP Framework on Debian 9 and Ubuntu 18.04?

Create a Yii2 project ‘yii2-kickstart’ via composer:

Go to the project dir then modify composer.json to add ‘replace’ like this:

If I don’t do this, i’ll get this error:

Then run ‘composer update’
Then run ‘php yii serve’. it’ll use port 8080
If the port 8080 is already used, you can use another port like 888:

Then open it on your browser: http://localhost:8888/
BUT I GOT THIS ERROR ON THE PAGE

SO I REMOVE ‘replace’ AND THE VALUES IN {} IN composer.json
Then run ‘composer update’ again.
Start the server again: php yii serve –port=8888
Open it on the browser: http://localhost:8888/
NOW IT’S WORKING FINE!

Leave a Reply

Your email address will not be published. Required fields are marked *