I have heard that setting the --prefix=PREFIX
option when compiling PHP on linux will allow you to have more than one install of PHP at a time without them clashing. (I think the default if this isn't set is /usr/local
). However, I'm not sure what exactly it does or what a good setting to use is. Furthermore, I've also heard that setting it to something other than the default value might make some PHP extensions harder to install.
./configure --prefix=PREFIX ...
update
I just realized that some of the other options such as --exec-prefix
might still need to be set to /usr/local
since they default to the value of --prefix
. This would cause problems if prefix was set to something like web/phpalt
because things like the --sbindir
is set to `--exec-prefix + /sbin
.
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM
run sed PROGRAM on installed program names
Based on what PHP is saying then it seems like you could set the following options without any side affects.
./configure --prefix=/custom/path --exec-prefix=/usr/local
However, this is just a guess. ;)