Is it good to have self installation script like this?

Discussion in 'PHP' started by tonyinabox, Oct 18, 2006.

  1. #1
    I am really new, but I need to create self install for my script so below is my steps. Please let me know if I am on the wrong way or missed any. :D

    1. check at the index file that if no configuration file, redirect to set up script.
    2. read term and condition, license and copy right.
    3. check php module and all requirement on server.
    4. check file and directory permission.
    5. form for database information.
    6. dump SQL database
    7. create configuration file.
    8. done.

    PS. I can't find any topic related with this question so.:eek:
     
    tonyinabox, Oct 18, 2006 IP
  2. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It looks like a comprehensive list to me.

    The only thing I can think to add is that you may want to check that all the files you think are going to be present are on the server. A ftp error could mean that some files are missing. If you want to go even further you could check the md5 hash of all the files against a reference value.

    These two steps are probably a bit excessive though and I doubt many other installation scripts go to all that trouble.
     
    streety, Oct 18, 2006 IP
  3. tonyinabox

    tonyinabox Peon

    Messages:
    1,988
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    0
    #3
    oh check md5 hash all files seem a lot of work. LOL
     
    tonyinabox, Oct 18, 2006 IP
  4. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It's a repetitive process though so you can write a little php script that will do all the hard work for you. Wouldn't take as long as you would think. :)

    It is above and beyond the norm though so don't feel compelled to add in that checking process.
     
    streety, Oct 18, 2006 IP
  5. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #5
    Disabling the install.php after the script is installed, so no one else could use it again via the browser. You can also password protect.
    Bye :)
     
    JEET, Oct 18, 2006 IP
  6. tonyinabox

    tonyinabox Peon

    Messages:
    1,988
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thank you for suggesting
     
    tonyinabox, Oct 18, 2006 IP
  7. tonyinabox

    tonyinabox Peon

    Messages:
    1,988
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    0
    #7
    here is summary. it might help someone too.

    Idea to create the installation script (Self installer)

    1. check at the index file that if no configuration file, redirect to set up script.
    2. read term and condition, license and copy right.
    3. check php module and all requirement on server.
    4. check file and directory permission.
    4.1 check files and directories if they are present on server (Add)
    4.2 check md5 all files (Add)
    5. form for database information.
    6. dump SQL database
    7. create configuration file.
    7.1 delete/disable install script (Add)
    7.2 check if installation script still there, script won't working (Add)
    8. done.
     
    tonyinabox, Oct 18, 2006 IP
  8. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Once everything is installed and checked you could also offer them the option to register with you. Again it's above and beyond the norm but allowing them to subscribe to an updates newsletter could be useful.
     
    streety, Oct 19, 2006 IP
  9. smallbizstartupkit

    smallbizstartupkit Well-Known Member

    Messages:
    163
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #9
    Wow streety, I like that idea. And tonyinabox thanks for this useful post. I'm writing my own install script for a piece of software I'm using and this will be useful.
     
    smallbizstartupkit, Nov 1, 2006 IP
  10. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I discovered this a few days ago and forgot to post an update - PHP Installation Script

    It's a php class to build installation tools. I haven't had a play with it but it looks like it could be a useful tool to quickly put together an installation script.
     
    streety, Nov 1, 2006 IP
  11. tonyinabox

    tonyinabox Peon

    Messages:
    1,988
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Too bad streety, I finished my already. LOL

    but will play with that one so I can improve mine.

    thanks
     
    tonyinabox, Nov 8, 2006 IP