Reply to Re: Making a PHP install script

Your name:

Reply:


Posted by shimmyshack on 04/20/07 09:46

On Apr 20, 9:29 am, lasmit <lewisthesm...@googlemail.com> wrote:
> Over a number of month's I've slowly built up a nice CMS with central
> interface, each client has their own site eg,www.example1.com,www.example2.comand 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
>
> Lewis
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
$_SERVER['document_root'].
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/
lin.
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
servername.
You can get round this using something like $rootPath=
str_replace( $_SERVER['SERVER_ADDR'], $_SERVER['SERVER_NAME'],
$_SERVER['DOCUMENT_ROOT'] );
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!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация