Jump to content


Photo

Making an installation script


  • Please log in to reply
3 replies to this topic

#1 Demio

Demio
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 11 August 2006 - 06:46 PM

Hello everyone,

I've been programming in PHP for around 3 years now, but so far I never needed to make an installation script (everything I made was for internal use, so I just made the dbs manually and edited the files by hand).

Now the time has come for my first commercial project (to be sold in bulk that is) and I need to develop an installation script. So I was wondering how would you guys advise me to make one.

I want it to be as simple as possible, so I was thinking about something in these lines:
-Ask user for ftp data for auto chmoding, if no data is given, tell the user which files to chmod. - not a lot of questions here
-Ask user for db data - should I make it so it creates the DB and tables automaticly? Or force the user to create the db him self (seeing many hosting companies force people to create the dbs manually, not giving permissions to the user created usernames to do that)
-Ask user for super admin user data. - not many questions here.

Also, how would I go into creating the tables? My only table creation experience is with phpMyAdmin. Should I just export the structure of my current tables and use that?

Looking forward to comments and suggestions.

Thanks in advance,
Carlos Lage

#2 raza.shahzad

raza.shahzad
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 12 August 2006 - 03:15 AM

you need some quick tutorials regarding database handling (php and mysql) also you need some more tutorials.... you can search on google for such articles and surely you will find some in your favour.
http://blazonry.com/...nksdb/start.php is also a link that describes to you how to deal with mysql using php. The tutorial is amongst the first ones which i read online. try it out.

#3 JordanStreet

JordanStreet
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 12 August 2006 - 03:26 AM

justwondering, cant php  automatically chmod files and directories ?  I would try dling some free cms' and such and looking at the installation file.  Also pixel2life.com helps a lot.

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 12 August 2006 - 12:51 PM

PHP can try to change permission of direcotories/files using a functioin called chmod. Howeve this function is useless on a Windows box.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users