Hello, it's been a while since my last time here.
Well, I'm currently adopting croogo for cakephp's installer 'style'.
FYI, Croogo is using plugin 'install' to setup the database etc.
Here are what I did :
1. Copying the install plugin
2. Edited route.php
##app/config/route.php
#start
if (!file_exists(CONFIGS.'settings.yml')) {
Router::connect('/', array('plugin' => 'install' ,'controller'
=> 'install'));
}else{
Router::connect('/', array('controller' => 'users', 'action' => 'login'));
}
#end
#
3. create file database.php.default inside /app/config
4. make /app/config writeable
5. Edited app_controller by adding layout helpers
But, I still couldn't get the welcome screen. I am just facing error
if the database.php is not present yet.
#Error message I got
Warning (2): include_once(/var/www/simpus22/app/config/database.php)
[http://php.net/function.include-once]: failed to open stream: No such
file or directory [CORE/cake/libs/model/connection_manager.php, line
23]
Warning (2): include_once() [http://php.net/function.include]: Failed
opening '/var/www/simpus22/app/config/database.php' for inclusion
(include_path='/var/www/simpus22:/var/www/simpus22/app/:.:/usr/share/php:/usr/share/pear')
[CORE/cake/libs/model/connection_manager.php, line 23]
Fatal Error (256): ConnectionManager::getDataSource - Non-existent
data source default [CORE/cake/libs/model/connection_manager.php, line
102]
Here is the code of the install_controller.php
(app/plugins/install/controller/) :
https://github.com/croogo/croogo/blob/master/plugins/install/controllers/install_controller.php
The question is, how to prevent the plugin to access/ look for
database.php which about to be created in InstallController::index(),
so I could see the index's layout? The index is just showing message
if the app is fulfill basic requirement or not.
Note : if I provide database.php inside app/config/, it run smoothly.
Thank you for any responses.
--
Regards,,,
thom
http://mynameisthom.blogspot.com
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php