Do you have a question? Post it now! No Registration Necessary. Now with pictures!
April 20, 2007, 8:29 am
rate this thread
interface, each client has their own site eg, www.example1.com,
www.example2.com and there is a central site where users can login and
update their site.
I'm now looking to automate the process of setting up new sites and so
creating a script to do the database stuff that needs to be done each
time, and perhaps even some of the file copying.
Was just looking for some general advice before I plough in, does
anyone have any particular best practice they could recommend? Or
common pitfalls to avoid?
Should be quite straightforward but not having done it before thought
it'd be good to get some advice from the experts.
Thanks in advance
Re: Making a PHP install script
just a few thoughts
the only consistently troublesome thing (with some install scripts)
that I have are, assumptions about the path, language, and use of
You might like to consider people on windows and change the options
for mail() to allow them to use local/remote smtp instead. Also people
often have trouble with DNS lookups, and can also be behind proxies,
and I assume you have already used best practise in these areas, as
well as things like i8ln. Some of your CMS might use functionailty
from modules like imagemagick which might not be created equal for win/
I use Apache2.2.4 Dynamicically Configured Mass Virtual Hosting on
windows and linux, which means that $_SERVER['DOCUMENT_ROOT'] is
sometimes not set
correctly on the machine, with the IP appearing instead of the
You can get round this using something like $rootPath=
str_replace( $_SERVER['SERVER_ADDR'], $_SERVER['SERVER_NAME'],
Some of the above changes might require changes to your app code as
well as the install script, but the changes will be worth it!