Edmonton Web Design and Photography

Php Installer Script


Posted in: Scripts on May 7th, 2007

I made this script for people that are working on there own scripts. When i created Spoke Calculator Pro and Addressbook i soon thought it would be a good idea to include a way for the user to simply install the scripts with little know how of any sort of MySQL knowledge. I gathered the basic principle from the Word Press instillation, although they are different in coding and function.

Features:

  • Automatically Create a congig.php file.
  • Test to see if config.php exists
  • Insert MySQL automatically


Instalation:
In order to create a config.php file you must have permission on the server to write to the directory containing the config.php file, this may mean you need to CHMOD to “777″ the instalation folder, this should be set back to default of “755″ when the process is complete.

The installation script can be found here “/setup/index.php”

Before getting started, we need some information on the database. You will need to know the following items before proceeding.

  • Database name
  • Database username
  • Database password
  • Database host

If for any reason the automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open config-sample.php in a text editor, fill in your information, and save it as config.php.

In all likelihood, these items were supplied to you by your ISP. If you do not have this information, then you will need to contact them before you can continue. If you’re all ready, let’s go!

You should enter your database connection details. If you’re not sure about these, contact your host.

  • Database Name:The name of the database you want to run your script in.
  • User Name: Your MySQL username.
  • Password: Your MySQL password.
  • Database Host: Most Likely won’t need to change this value.
Download Installer.
Downloaded 1338 Times.

6 Responses to “ Php Installer Script ”


  1. I updated the zip, i fixed a style problem.

    Adam Patterson
    May 9, 2007

  2. Very nice, i will try it

    carlos
    July 3, 2007

  3. I have tried to add multiple tables to the script but it seems to fail, any ideas would be appreciated.

    Karim
    January 8, 2008

  4. Karim as long as you folow this schema:

    $db_schema[] = “ALTER TABLE `addressbook` ADD `gid` INT( 100 ) NOT NULL DEFAULT ’1′ AFTER `id` ;”;

    you need to make sure you have ($db_schema[] = “) at the start and end it with (“;)

    Everything should work fine after that, minding you if you have an error in your MySQL it will give an error and not work.

    Adam Patterson
    January 24, 2008

  5. Hey guys, the link isn’t working. Any idea why?

    Jason
    March 8, 2008

  6. The download link works for me? It might have been a server hiccup.

    Adam Patterson
    March 9, 2008

Search


Archive


Subscribe