Jan 16th, 2010, 11:13 AM
Hey BlueRobot,
Glad you got it fixed.
Just in case anyone else comes across this thread, I do this for many installations - I generally work on the same site on my home PC, mac laptop and live environment. I store all work in SVN so I can just checkout the folder to whatever environment I'm on at that time. To get around the problems of paths, my "cheat" way of doing it is just to add a switch statement in my config.php file that determines the settings to use. That way I just need to change that one variable to work in the different environments. Something like this :
It's not 100%: things like file upload paths are still stored in the database & need to be updated manually. Kind of a drag, but I only ever update those as I need.
- Ben
Glad you got it fixed.
Just in case anyone else comes across this thread, I do this for many installations - I generally work on the same site on my home PC, mac laptop and live environment. I store all work in SVN so I can just checkout the folder to whatever environment I'm on at that time. To get around the problems of paths, my "cheat" way of doing it is just to add a switch statement in my config.php file that determines the settings to use. That way I just need to change that one variable to work in the different environments. Something like this :
PHP Code:
<?php
$environment = "pc"; // "mac", "live" (or whatever)
switch ($environment)
{
case "pc":
// enter config.php contents of PC environment here
break;
case "mac":
// enter config.php contents of Mac environment here
break;
case "live":
// enter config.php contents of Live environment here
break;
}
It's not 100%: things like file upload paths are still stored in the database & need to be updated manually. Kind of a drag, but I only ever update those as I need.
- Ben