Welcome Guest, Not a member yet? Register   Sign In
Creating Web Installer for CI Based Application

(This post was last modified: 10-21-2015, 11:31 PM by ignitedcms.)

For my cms I've managed to bundle the installer within codeigniter using a bit of vanilla php to do the immediate communication of the database and then write to the db config file.

For example, in my installer controller I query if a line has been written to the db.config file if it hasn't been written I use the information stored from the form input to write in the details. Obviously you have to be careful with any controller that writes to a file, but for extra safety I made the write controller a private method so you can't just call the write method from a url. I debated whether to have the system automagically delete the install controller for safety measures but decided against it as you would need another method with file delete permissions anyway to delete the controller, which in turn would be a security vulnerability!!

I've yet to find a solution where the installer automagically finds the default url. For example, if you rename the base folder or install on a live domain you have to go in and change the line of the base url in config.php.

The only way around that was maybe using a separate installer away from codeigniter in pure PHP and then have the system delete the installer after install. I found this to be a little too inconvenient and risky in terms of security without offering much functionality so I opted out of this option.

But wordpress does this pretty much flawlessly so I may revisit the above point.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com

Messages In This Thread
RE: Creating Web Installer for CI Based Application - by ignitedcms - 10-21-2015, 11:25 PM

Theme © iAndrew 2016 - Forum software by © MyBB