Hello guys,
I have been playing around with Yii2 Basic for about 2 weeks now. everything is working perfectly fine, including using the Gii generator.
Now I am trying to play around with Yii2 Advanced and having some issues with the iniatialization. I have the init set to development.
When I tried "Yii Migrate" or "PHP Yii Migrate", I have the following errors,
C:\xampp\htdocs\yii-app>yii migrate
Yii Migration Tool (based on Yii v2.0.6)
Creating migration history table "migration"...Exception 'yii\db\Exception' with
message 'SQLSTATE[]: pdo_oci_handle_factory: <<Unknown>> (ext\pdo_oci\oci_drive
r.c:635)'
in C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\db\Connection.php:534
Stack trace:
#0 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\db\Connection.php(836): yii\db\Co
nnection->open()
#1 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\db\Command.php(218): yii\db\Conne
ction->getMasterPdo()
#2 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\db\Command.php(775): yii\db\Comma
nd->prepare(false)
#3 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\console\controllers\MigrateContro
ller.php(147): yii\db\Command->execute()
#4 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\console\controllers\MigrateContro
ller.php(122): yii\console\controllers\MigrateController->createMigrationHistory
Table()
#5 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\console\controllers\BaseMigrateCo
ntroller.php(610): yii\console\controllers\MigrateController->getMigrationHistor
y(NULL)
#6 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\console\controllers\BaseMigrateCo
ntroller.php(102): yii\console\controllers\BaseMigrateController->getNewMigratio
ns()
#7 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(
0)
#8 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\base\InlineAction.php(55): call_u
ser_func_array(Array, Array)
#9 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\base\Controller.php(151): yii\bas
e\InlineAction->runWithParams(Array)
#10 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\console\Controller.php(91): yii\
base\Controller->runAction('', Array)
#11 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\base\Module.php(455): yii\consol
e\Controller->runAction('', Array)
#12 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\console\Application.php(167): yi
i\base\Module->runAction('migrate', Array)
#13 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\console\Application.php(143): yi
i\console\Application->runAction('migrate', Array)
#14 C:\xampp\htdocs\yii-app\vendor\yiisoft\yii2\base\Application.php(375): yii\c
onsole\Application->handleRequest(Object(yii\console\Request))
#15 C:\xampp\htdocs\yii-app\yii(27): yii\base\Application->run()
#16 {main}
Initially I had the error "driver not found" but after copying the oci.dll into the system32 and SYSWOW64 folder, I have this issue as mentioned above.
I am using localhost, Oracle DB 11G, Instaclient 32-bit, Apache/2.4.17 (Win32), PHP Version 5.6.14, Windows 7 64-bit, Oci8 2.0.8, PDO Oci driver, Yii2 2.0.6.
Do I really need to perform this Yii Migrate for first time usage? Is it required?