• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running an old version and a new version of CI on same server - can I?

#1
[eluser]tinawina[/eluser]
We have a website on a shared server that was developed a while ago. It uses Codeigniter version 1.6.1. We have a new version of the site that we've been developing in a different shared server space. It uses CI version 2.1.2.

The plan is to shut down the old site at end of month, and launch this new version by moving over and establishing all new site files and CI-2.1.2 files on the current "live" server BUT we have a situation I'd like to run by the community now to make sure this will work.

The current site that uses v1.6.1 includes a lot of subdomains, about 35, that also use this old CI installation. Our file set-up looks like this:

Main site (that will soon disappear):
Code:
/current-site/public-area/www/www/system/
/current-site/public-area/www/www/system/application/

Subdomains
We set these up well after launching the main site and decided to install CI in the server's private area so that we could use one installation for all subdomain applications. This means that we currently have two CI-1.6.1 installations on our server in different areas:
Code:
/current-site/private-area/codeigniter/system/
/current-site/public-area/www/subdomain1/application/
/current-site/public-area/www/subdomain2/application/
/current-site/public-area/www/subdomain3/application/
/current-site/public-area/www/subdomain4/application/

Each of these subdomains has an index.php file and .htaccess file, and all of the model-view-controller-etc. folders/files that come with CI. For now, we would like to leave those as is. We'll switch them over to the new CI installation over the fall.

The new CI-2.1.2 site is set up the same way as our current site's subdomain set-up:

Code:
/new-site/private-area/codeigniter/system/
/new-site/public-area/www/www/application/

I'm thinking we can back-up and then delete all of our current main site files, and then establish the new site files in their place. And install CI-2.1.2 in our private area like so:

Code:
/current-site/private-area/codeigniter_NEW/system/
/current-site/public-area/www/www/application/

Then in the index.php file of the new site I would put:

Code:
$system_folder = "/current-site/private-area/codeigniter_NEW/system";

And the index.php files for the subdomain folders would use:

Code:
$system_folder = "/current-site/private-area/codeigniter/system";

In the end then, my file structure would look like this:

Code:
/current-site/private-area/codeigniter/system/
/current-site/private-area/codeigniter_NEW/system/
/current-site/public-area/www/www/application/  <--- the new site using 2.1.2
/current-site/public-area/www/subdomain1/application/  <--- subdomains using 1.6.1 for a little while longer....
/current-site/public-area/www/subdomain2/application/
/current-site/public-area/www/subdomain3/application/
/current-site/public-area/www/subdomain4/application/

Do you forsee any issues with this? Thanks for your ideas, insights!

#2
[eluser]PhilTem[/eluser]
Sure you can run two different installs on the same server as long as they are physically separated (i.e. they are in different folders) and you link them correctly in your index.php file it should work. At least from a theoretical point of view. What you need to consider though: Changing the system from 1.6.1 to 2.1.2 might if not will brake some dependencies and you will have some errors to solve just because it is a major upgrade rather than a minor one Wink

But if you don't mind running into these kind of problems you can have two different versions of CI running on your server with ease.

#3
[eluser]tinawina[/eluser]
Great - thanks PhilTem. I thought "theoretically" this would work. I just tried loading up 2.1.2 on our current live server, and then for kicks created an empty "application" folder at /current-site/public-area/www/www/application. My old CI installation immediately picked up on that and gave me a "missing system folder" message. So I get that I'll have to get those index.php files working juuuuust right. In other words, I'll be baaaaack... Smile But good to know my proposed structure isn't ringing any bells. Really needed that vote of confidence. So thank you!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.