[PHP] Placement of PHP programs?
As a kind of an adjunct to the other discussion on PHP libraries, what about
PHP programs? Not quite so touchy, as I can't see a single way forward here
(and there's no blazingly obvious reason to do so). So what are people's
best thoughts on the matter? Most packages I've seen put their
web-accessible content in /usr/share/<package>, then either set up a
separate apache config and include it from the main apache config
(phpgroupware does it this way, for one example) while other packages modify
apache.conf more intrusively. I'm a fan of the phpgroupware method, which
at least minimises pain.
So where to put the program itself? /usr/share is the common place, I guess
that's the place to go. Does anyone think there's another good place, and
has a reason for it? Config should, of course, go in /etc/<packagename>,
including (if appropriate) the apache config to allow apache to find it.
But what if people are using a different Web server? It's possible, so why
are we blindly assuming apache? Should we cater for the default, and anyone
doing differently should know enough to fix the problem themselves? That's
And what about where in the docroot we put our program for accessability?
Right in the docroot might squash something already there. How about
letting the user choose? Ooh, there's something that could start a hornet's
nest. Check if something's already there - but how do we do that? ls
/var/www/<packagename> *might* work, grep '/<packagename>'
/etc/apache/*.conf would help too. We'd probably find most cases between
those two checks.
Anyway, I want to know your thoughts. Please share.
Matthew Palmer, Debian Developer