1 Replies - 434 Views - Last Post: 08 September 2008 - 02:40 AM Rate Topic: -----

#1 kaushiks  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 07-March 06

Packaging

Post icon  Posted 08 September 2008 - 12:02 AM

Hi,

I have developed a rate analysis tool which can be used in construction field.
I have used cakephp framework and PHP version is 5.

Now i want to create a package of this build along with the database, so that i dont have copy files and create database on each and every machine i tend to run this s/w on

Can you guys please suggest some links or tutorials, by the help of which i can create the build and post it on my website for viewers to download it and install the package on their machines?


Regards.
Kaushik

Is This A Good Question/Topic? 0
  • +

Replies To: Packaging

#2 Moonbat  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 36
  • View blog
  • Posts: 424
  • Joined: 30-June 08

Re: Packaging

Posted 08 September 2008 - 02:40 AM

All you'll really need is a file, call it install.php or installation.php, and have the user:
  • Supply database details (or have them set to a default value yourself)
  • Have them set any other info (or, as before, you can set default values)
  • Press Submit

Then when the user presses submit, depending on what action you are using in your HTML form, check for either $_POST or $_GET variables using a simple

if ($_POST) {
	 // code here
}
// If using GET instead of POST
if ($_GET) {
	 // code here 
}


If data is present, first create the tables in the database supplied by the user using the username, host, and password given. After that, do any other stuff with any other info given by the user. If you have a connection file to hold all the DB info of the user, write the DB info to that too.

Then, just echo something like "Install complete!" and let the user go from there.

P.S. - To be safe, I would make sure every page besides install.php (or installation.php, whatever you name it) has a quick check near the begining to see if the installation file is still present. If it is, have the script terminate with a message telling the user to get rid of the install file. You don't want your user to have a bunch of data, and a month later lose his site because some nutjob did a Google search and found his install file :P

This post has been edited by Moonbat: 08 September 2008 - 02:41 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1