[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: php.ini configure package



On Sun, Jun 02, 2002 at 11:53:37PM +0200, Jonas Meurer wrote:
> I think debian isn't that good for webservers at the moments. The apache
> packages are quite good in my eyes, at least apache-ssl (I don't know the
> other), but there are no real standards at the moment. 
> One (IMO very good) example is the php include_path. some packages ask the
> user to add /path/to/project_include/ into the php.ini. Then the files can be
> included direct with include("filename.php"), but it's predictable that
> conflicts follow (different packages, includefiles with the same name etc).
> Other packages ask to add /path/to to the php.ini and then include files with
> include("packages_name/filename.php"). I think that's a very better solution
> because there can be no conflicts. Every packagename is only given one time,
> so the includepath is always uniquely.

> The best solution would IMO be a global includepath, standard in the
> include_path at php.ini, like /usr/lib/php/, and packages are only allowed to
> make subdirs like /usr/lib/php/package_name. Then there wouldn't be this
> problem any longer with adding to php.ini and so on.

That would be /usr/share/php/, not /usr/lib/php/.  PHP scripts are 
architecture-independent data.

There is movement in the direction of such a solution.  I've spoken with
the maintainer of the PHP4 packages, and we are both aware that there is
currently a lack of structure for packages relating to PHP.  An effort
has begun to provide that structure, by codifying best practices into a
mini PHP policy.  I think it would be futile to further discuss the
current problems until that document is further along:  as I said, we're
well aware of what the problems are, it's now simply a question of
rolling our sleeves up and getting them fixed.

I do not, BTW, believe it should be mandated that all packages create
subdirectories under /usr/share/php/.  No other scripting language
places such a restriction on its packages.  Using common sense to
resolve namespace conflicts should be all that's required.

You did mention that some packages "ask the user to add
/path/to/project_include/ into the php.ini".  Can you name specific
packages that do this?  This is clearly wrong, as it pollutes the
include namespace for all PHP scripts.

> Also I would say that projects are only allowed to make subdirs in
> /usr/lib/cgi-bin, not to place scripts direct there, like wdg-html-validator
> does (/usr/lib/cgi-bin/validate.cgi).

Again, there is no precedent for such a strict requirement.

Steve Langasek
postmodern programmer

Attachment: pgpD8k513wX0L.pgp
Description: PGP signature


Reply to: