RFC: Paths for PHP extensions and libraries
Hi.
I'm playing with php5.1 package and trying to compile it. I'd like to have
php5 and php5.1 packages coexisted in the system, as far as php5.1 is not
fully backward compatible. The analogy is python, ruby or pike.
The problematic is name clash for paths, so I wondered how to set the
include_path or extension_dir and how to change the directories layout.
My proposition:
include_path =
".:/etc/php:/usr/local/share/php/5.1:/usr/share/php5:/usr/share/php/5.1:/usr/share
/php:/usr/local/share/php"
extension_dir =
"/usr/lib/php/5.1/20041030:/usr/local/lib/php/5.1:/usr/local/lib/php"
What does it mean? I've been inspired by perl policy. I imagine it will be
possible to install php4, php5 and php5.1 CGI binary with PEAR library for
each version without conflicts.
For libraries:
. : current directory at the begining
/etc/php : locally installed libraries, can be considered as conffiles.
/usr/local/share/php/5.1 : locally installed libraries only for PHP5.1
/usr/share/php5 : system libraries which requires at least PHP5
/usr/share/php/5.1 : bundled PEAR libraries, other packages can install newer
version to the previous directory
/usr/share/php : libraries for PHP4 or any PHP5
/usr/local/share/php : libraries installed by hand with `pear install'
For extensions:
/usr/lib/php/5.1/NNNNNNN : bundled extensions or installed with dpkg
/usr/local/lib/php/5.1 : locally installed packages
/usr/local/lib/php : locally installed packages with `pear install'
Other paths:
VERSION=5.1 (or VERSION=5.0 for php5 or VERSION=4.3 for php4)
/etc/php$VERSION/$SAPI : place for php.ini
/var/run/php$VERSION : PID file for FastCGI server
/var/lib/php/$VERSION : session temporary files
/usr/lib/php/$VERSION : extensions and other arch-depended files
/usr/share/php/$VERSION : bundled libraries and other arch-independed files
/usr/include/php/$VERSION : include files
There can be possible to set the symlinks, i.e.:
/usr/include/php/5 -> /usr/include/php/5.1
so it would be possible to use "-I/usr/include/php/5" option to compile other
packages and the best option will be choosed automatically.
--
.''`. Piotr Roszatycki, Netia SA
: :' : mailto:Piotr_Roszatycki@netia.net.pl
`. `' mailto:dexter@debian.org
`-
Reply to: