Cakephp share database configuration for multiple apps -


i have cakephp installation multiple apps has structure:

/cake-1.3.10 /cake-2.3.0 /apps/app 1 /apps/app 2 /... /apps/app n /apps/_shared/cake_v1/component /apps/_shared/cake_v1/model /apps/_shared/cake_v2/component /apps/_shared/cake_v2/model

so happens here apps grab v1.3 or v2.3 cores (depending on version of framework use). in addition, have components , models apps share. each app loads _shared folder depending on version.

until here works great.

now, same database configuration. each app has own /config/database.php file. how go making apps share same database.php file? have 2 database.php files, 1 per version, since they're different (like components , models). i'm not sure need change accomplish that.

i don't see there easy cakephp way. have modify /lib/cake/model/connectionmanager.php . in version 2.3 on line 69 there is

include_once app . 'config' . ds . 'database.php'; 

i don't see there code allows configuration. looks hardcoded.

more elegant way make symbolic links @kai mentioned. can upgrade cakephp without having remember little hack.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -