Yii Framework Forum: database migration on shared hosting without console - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

database migration on shared hosting without console Rate Topic: -----

#1 User is offline   Rocky 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 02-May 11

Posted 02 May 2011 - 07:29 AM

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.
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,353
  • Joined: 12-October 09
  • Location:Croatia

Posted 02 May 2011 - 07:39 AM

Think about it...

can you run any command when you connect with FTP (other than FTP commands ofcourse)?
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   Rocky 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 02-May 11

Posted 06 May 2011 - 12:12 PM

View Postmdomba, on 02 May 2011 - 07:39 AM, said:

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
0

#4 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 06 May 2011 - 01:03 PM

Of course you can: just run a php script - I am using Yii on a shared host with no shell.
"Less noise - more signal"
0

#5 User is offline   Rocky 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 02-May 11

Posted 07 May 2011 - 05:37 AM

View Postjacmoe, on 06 May 2011 - 01:03 PM, said:

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~
0

#6 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,642
  • Joined: 17-January 09
  • Location:Russia

Posted 07 May 2011 - 08:27 AM

Also you can try using my webshell extension: http://www.yiiframew...nsion/webshell/
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#7 User is offline   Rocky 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 02-May 11

Posted 07 May 2011 - 08:39 AM

Got it. It works.

Thanks you all!
0

#8 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 08 May 2011 - 05:35 PM

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.
"Less noise - more signal"
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users