Jump to content

Archived

This topic is now archived and is closed to further replies.

Demio

Making an installation script

Recommended Posts

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

Share this post


Link to post
Share on other sites
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/scripting/linksdb/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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
PHP can try to change permission of direcotories/files using a functioin called [url=http://http:/www.php.net/chmod]chmod[/url]. Howeve this function is useless on a Windows box.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.