Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
06-28-2007, 11:06 AM #1
- Join Date
- Jan 2006
- Thanked 1 Time in 1 Post
Writing a self installer for my script
Hello, I have started writing an installer for my script. The installer consists of these steps:
- Check if already installed (install lock file), if not start installation
- Display welcome page
- Collect site name, site slogan, site url and site path
- Check for errors, if no errors write variables to session variables and goto step3
- Check directories requirements (if they exist and are writable)
- Check until all directories are created and writable. If yes goto step4
- Collect database info (dbhost, dbname, dbuser, dbpass)
- Check for errors, if no errors try to connect and select the db.
- If no connection, repeat step4
- If there is connection and db is selected, write values to session variables and goto step5.
- Summarize and review all variables
- Display option of installing the sample data as well.
- goto step6
- Insert MySQL dump into DB using the session variables.
- Insert sample data if requested.
- Insert additional info (Site name, site slogan etc.). from session variables.
- Create install lock file.
- Display "Installation Complete" page and "Take me to the site" button.
- Display option of attempting to delete this installer file before going to the actual site.
- If checked, delete this installer file. If not successful, prompt the admin to delete the file by hand on the actual site.
This is my first attempt to write an installer, so I may have complicated things or not foresee some errors. I still have difficulties at step6 at inserting the MySQL dump into DB. Any advices?