Part of the EllisLab Network
   
 
Multiple Sites - minor questions
Posted: 29 June 2007 01:20 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  37
Joined  06-28-2007

After reading quite a bit about CI, I’ve decided to give it a try.  I’m halfway through redesigning a site, so I figured now is a good time to make the changes.  I have a few questions before I get too far though.

I read a few past posts about running multiple sites/applications through CI, and I think I have decided to do mine this way:

/ci_path/application/sitename-dev/
/ci_path/application/sitename-live/

Obviously there will be quite a bit of overlap between the two, but it feels “safer” to keep the development site as a separate application.  That way I can be as experimental as I want without too much worry.  If everything is good on the dev site, I can copy over the appropriate libraries, views, etc.  The naming convention should also make it clear/easy if I decide to modify more of my sites to use CI.  Does that make sense?

Would it be best to create additional separate paths for logs, cache, etc. in order to help keep the sites separate? e.g., $config[’log_path’] = ‘/ci_path/logs/sitename-dev/’;

Is there any logical way of tying subversion in with all of this?  Right now, the site is in a svn repository.  I work on the dev site until everything is good and check in the changes.  Then I just do an “svn up” on the live site.  The way I have it now, however, is that a “settings.php” file is loaded that configures various settings (e.g., logging, database info, etc.).  With CI, it makes more sense to just have the appropriate info in each “site’s” config file, which would mean I obviously would not include that in the svn repository (unless I used svn hooks, but that’s getting away from the simplicity I am going for).  Does it make sense to use svn and just be very selective about which files are in the repository, or would it be better to have an auto-loaded config file, or some other option?  I don’t have to use subversion, I just find it extremely useful.

That’s it for now.  Thanks for reading such a long (and possibly rambling) first post smile

Profile
 
 
Posted: 07 July 2007 08:23 AM   [ Ignore ]   [ # 1 ]  
Grad Student
Rank
Total Posts:  72
Joined  11-02-2006

I have also implemented multiple sites with one implementation of code igniter but my configuration was slightly different.

www/CodeIgniter (shared installation)

www/example1.com/application
www/example1.com/assets
www/example1.com/cache
www/example1.com/logs
www/example1.com/index.php
www/example1.com/.htaccess

www/example2.com/application
www/example2.com/assets
www/example2.com/cache
www/example2.com/logs
www/example2.com/index.php
www/example2.com/.htaccess

I had to make some small adjustment to index.php file slightly to allow for this at around line 85

if (is_dir($application_folder))
{
    define
('APPPATH', $application_folder.'/');
}
else
{
    
if ($application_folder == '')
    
{
        $application_folder
= 'application';
    
}

    define
('APPPATH', BASEPATH.$application_folder.'/');
}

but since this everything has worked perfectly and it is easy to upgrade and test newer version of codeigniter as they are released.

 Signature 

Apache 2 PHP 5 Ubuntu Sellersrank.com [TextMate CodeIgniter Bundle]

Profile
 
 
Posted: 20 July 2008 12:13 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  10
Joined  07-17-2008

that mean you have 2 separate /ci_1.x.x folder, right?

Profile
 
 
Posted: 20 July 2008 01:19 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRank
Total Posts:  1772
Joined  07-30-2007

that mean you have 2 separate /ci_1.x.x folder, right?

No, you would have only one folder per version of CI. If you are only using the latest version of the framework - that’s all you would need on your server.

 Signature 

MichaelWales.com

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 61049 Total Logged-in Users: 16
Total Topics: 73851 Total Anonymous Users: 0
Total Replies: 398361 Total Guests: 324
Total Posts: 472212    
Members ( View Memberlist )