CodeIgniter Forums
Configuration DB like Prestashop or wordpress - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Configuration DB like Prestashop or wordpress (/showthread.php?tid=66638)



Configuration DB like Prestashop or wordpress - pikamo - 11-15-2016

Hi,
I have bulid a web application with CodeIgniter, i want the configuration of DB like Prestashop or Wordpress by the navigator in the first use of the application.
It is possible to do that, if yes, plz give me a tuto for build this.
Thanks a lot.


RE: Configuration DB like Prestashop or wordpress - dmyers - 11-16-2016

You could build a setup.php script which you could call directly for example http://www.example.com/setup.php
This would need to modify ../config/database.php and therefore need read and write access to that file.
Then for security reasons in your MY_Controller construct you will need to check if setup.php is still present and nag them to remove it
also for security reasons if somebody calls setup.php it should check that ../config/database.php isn't already setup and if it is bail! Don't let them change it again!

Hope that helps a little.

DMyers