I successfully created and uploaded an advanced template on my shared host.
As a next step, I have to run yii migrate.
But I can not, because I do not have access to the console.
What could you offer me?
note that
- I cannot change the host because this is not my decision.
- I cannot access the server using SSH
- I already tried something like PHPShell, but I got
permissione deniedwhile trying to runyii migrate --interactive=0
I also tried this: added actionMigrateUp to frontend/controllers/siteController.php
public function actionMigrateUp()
{
$oldApp = \Yii::$app;
new \yii\console\Application([
'id' => 'Command runner',
'basePath' => '@app',
'components' => [
'db' => $oldApp->db,
],
]);
\Yii::$app->runAction('migrate/up', ['migrationPath' => '@console/migrations/', 'interactive' => false]);
\Yii::$app = $oldApp;
}
But when I visit /frontend/web/index.php?r=site/migrateUp, I got 404
exception 'yii \ base \ InvalidRouteException' with the message 'Unable to resolve request: site / migrateUp' in C: \ XAMPP \ HTDOCS \ WWW \ provider \ yiisoft \ yii2 \ base \ controller.php: 122