Yii Framework Forum: "Migration-proof" installation/configuration - Yii Framework Forum

Jump to content

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

"Migration-proof" installation/configuration Rate Topic: -----

#1 User is offline   CesarAKG 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 18-April 09

Posted 19 April 2009 - 06:42 PM

ALL

I'm planning to develop a PHP app and deploy it at a free server (http://www.110mb.com...php?un=cesarakg - PHP and PDO_SQLite) but I have some quirks to deal with:



The first problem is to install the app after the command:



So, you an see I have some conversion to do before transfer, like changing the base dir of the database from /home/user/public_html/myapp/protected/data/myapp.db to /www/110mb.com/c/e/s/a/r/a/k/g/cesarakg/htdocs/protected/data/myapp.db, but I think there's a better way to do this, something like don't using full paths, but relative paths. So I was starting thinking how to change this line.



But it is only part of the problem.

What about the scaffolding?



Will this work? And can be safely transferred "as-is" or I will have to use a script to change references in the source code? Any ideas?
0

#2 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 19 April 2009 - 07:23 PM

You can set the location of Yii and your app in index.php:
$yii=dirname(__FILE__).'/Yii/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';

and as in this example (blog demo) db will be fine with no change:
'connectionString'=>'sqlite:'.dirname(__FILE__).'/../data/blog.db',

/Tommy
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