/ public_html/ programs/ user_install/ application/ config/ config.php core/ cool_space/ application/ config/ config.php core/ website/So basically through a little .htaccess magic when someone requests [url=http://user_install.mydomain.com]http://user_install.mydomain.com[/url] they are actually accessing /public_html/programs/user_install folder. Now the question??? How can I translate this into FuelPHP land. I understand that the core of Fuel prefers to be above the public_html folder for security reasons. I love this idea but I also like organising the "installs" into the /public_html/programs/ folder. Also, I need to deal with a multisite environment so obviously the individuals installs config files (such as database variables) need to be within the /programs/user_install folder. In my dream world I would love to have the following file structure:
/ fuel/ core/ packages/ public_html/ programs/ user_install/ .htaccess/ app/ assets/ index.php cool_space/ .htaccess/ app/ assets/ index.php oilIs this possible with FuelPHP? Thanks for your help. Tim
Harro Verton wrote on Thursday 12th of January 2012:I have gone a step further, and separated core and packages from app, so for all sites hosted on a server I only have a single core and packages folder, the index.php files for all apps point to these folders. Core and all packages are git clones in my development setup, which makes it very easy to test the application with different versions of the FuelPHP code: just switch branches.
/data/www/fuelphp/ 1.0.master 1.1.develop 1.1.masterin each I have 'core' and 'packages'. The master versions contains static versions (from the zip), the develop a git clone that I can easily update. Then, the index.php (and oil) files of my app contain
/** * Path to the application directory. */ define('APPPATH', realpath(__DIR__.'/../app/')); /** * Path to the default packages directory. */ define('PKGPATH', '/data/www/fuelphp/1.1.master/packages/'); /** * The path to the framework core. */ define('COREPATH', '/data/www/fuelphp/1.1.master/core/');Which is an example of an app that runs on 1.1 master. You also see I moved 'app' one level up, so I can remove the entire 'fuel' directory (as core and packages are no longer required too). On my development machine I only have 1.1 develop installed (but same way), and I use 'git checkout' to swap branches in case I need to test an upgrade, or changes in develop that I'm making.
/ site1/ fuel/ (fuel instance specific for site1) site2/ fuel/ (instance specific for site2) docs/ public_html/ site1/ index.php site2/ index.php oilThen in each of the index.php for the sites, I point the app, pkg, and core path to that specific fuel instance. Example:
define('APPPATH', realpath(__DIR__.'/../../site1/fuel/app/').DIRECTORY_SEPARATOR);
It looks like you're new here. If you want to get involved, click one of these buttons!