I can run database migration on local with command "yiic migrate"
Can I run database migration on shared hosting if I only access to FTP but no console ?
Thank you.
I can run database migration on local with command "yiic migrate"
Can I run database migration on shared hosting if I only access to FTP but no console ?
Thank you.
Think about it…
can you run any command when you connect with FTP (other than FTP commands ofcourse)?
I dont think so
so I cannot use yii on this kind of hosting ?
Thanks
Of course you can: just run a php script - I am using Yii on a shared host with no shell.
May I ask how to write the migrate php script ?
Thanks~
Got it. It works.
Thanks you all!
This works too:
<?php
$cmd = "./protected/yiic migrate --interactive=0";
$output = stream_get_contents(popen($cmd, 'r'));
echo $output;
I just tested it - I need to run this from an installer I’m coding.
Just wanted to say thanks for this thread, just saved me a ton of hassle.