We have a school work, and we make a website with yii2 framework.
What is the problem? We cant use migration, what is the best way; we must to use an oracle database. We made it, tables, etc, but we dont know, how to connect this oracle ,,server,, with yii2.
You should go through the
docs
for Yii2.You have to add the configuration in the
common/config/main.php
orconfig/db.php
, depending upon the version of Yii2 (Advanced or Basic), and under the components you have to add the database component settings which are same for all databases, the only thing that differs is thedsn
string below are all supported strings, that might help you or others landing on this question.For Advanced App
Add the following under
components
For Basic App
Just note that if you are using
basic-app
for Yii2 you should copy below inside thedb.php
and make sure you have
included in the
config/web.php
under thecomponents