As Thani said, it will complain about a lot of libXML depend extensions. Here are all the ones I had to disable:
--disable-libxml --disable-dom --disable-simplexml --disable-xml --disable-xmlreader --disable-xmlwriter --without-pear
Apéndice F. Opciones de configuración
- Tabla de contenidos
- Lista central de opciones de configuración
Lista central de opciones de configuración
Abajo está una lista parcial de opciones de configuración usados por los scripts configure de PHP cuando se compila en ambientes de tipo UNIX. La mayoría de las opciones de configuración están listadas en su ubicación apropiada en las páginas de referencia de la extensión y no aquí. Para una lista actualizada de las opciones de configuración, ejecute ./configure --help en su directorio origen de PHP después de ejecutar autoconf (vea también el Capítulo de Instalación). También puede interesarle leer la documentación GNU configure para mayor información en otras opciones de configure tales como --prefix=PREFIX.
Nota: Estas son usadas unicamente en tiempo de compilación. Si desea alterar la configuración en tiempo de ejecución de PHP, por favor vea el capítulo sobre Configuración en tiempo de ejecución.
Opciones de configuración en PHP 4
Nota: Estas opciones son sólo usadas en PHP 4, tal como PHP 4.1.0. Algunas están disponibles en versiones anteriores a PHP 4, aún algunas en PHP 3, otras solo en PHP 4.1.0. Si quiere compilar una versión anterior, muy probablemente algunas opciones no estarán disponibles.
Opciones Misceláneas
- --enable-debug
Compilar con símbolos de rastreo de errores (debugging).
- --with-layout=TYPE
Establece como los ficheros instalados serán presentados el tipo uno es de PHP (valor por defecto) o GNU.
- --with-pear=DIR
Instala PEAR en DIR (valor por defecto PREFIX/lib/php).
- --without-pear
No instale PEAR.
- --enable-sigchild
Establece el propio manejador SIGCHLD de PHP.
- --disable-rpath
Deshabilita pasar trayectorias de búsqueda de librerias de tiempo de ejecución adicionales.
- --enable-libgcc
Habilita explícitamente el ligado con libgcc.
- --enable-php-streams
Incluye streams PHP experimentales. ¡No se use a menos que este probando el código!.
- --with-zlib-dir[=DIR]
Defina la localización del directorio de instalación de zlib.
- --enable-trans-sid
Habilita la propagación transparente del ID de sesión. Válido sólo para PHP 4.1.2 or inferior. A partir de PHP 4.2.0, la característica trans-id está siempre disponible.
- --with-tsrm-pthreads
Usa threads de POSIX (valor por defecto).
- --enable-shared[=PKGS]
Construye librerías compartidas [default=yes].
- --enable-static[=PKGS]
Construye librerias estáticas [default=yes].
- --enable-fast-install[=PKGS]
Optimiza para una rápida instalación [default=yes].
- --with-gnu-ld
Asume que el compilador de C usa GNU Id [default=no].
- --disable-libtool-lock
Evita bloqueos (debe romper compilaciones paralelas).
- --with-pic
Intenta usar sólo objetos PIC/non-PIC [default=use both].
- --enable-memory-limit
Compila con soporte de limite de memoria.
- --disable-url-fopen-wrapper
Deshabilita empaquetador fopen que abre URLs, que permite accesar ficheros vía HTTP o FTP.
- --enable-versioning
Exporta sólo los símbolos requeridos. Vea INSTALL para más información.
- --with-imsp[=DIR]
Incluye soporte IMSp (DIR es el directorio de inclusión IMSP's y el directorio de libimsp.a). ¡Sólo PHP3!.
- --with-mck[=DIR]
Incluye soporte para Cybercash MCK. DIR es el directorio donde se construye cybercash mck, el directorio por defecto es /usr/src/mck-3.2.0.3-linux, para ayuda sobre esto vea en extra/cyberlib. ¡Sólo PHP 3!.
- --with-mod-dav=DIR
Incluye soporte para DAV através del modulo mod_dav de Apache, DIR es el directorio de instalación de mod_dav (sólo el modulo de Apache) ¡Sólo en PHP 3!.
- --enable-debugger
Compila con funciones remotas de rastreo de errores. ¡Sólo en PHP 3!.
- --enable-versioning
Toma ventaja del alcance y manejo de versiones proveido por Solaris 2.x y Linux. ¡Sólo en PHP 3!.
Opciones de PHP
- --enable-maintainer-mode
Habilita las reglas y dependencias de Make, aunque para el que quiera instalar casualmente no son útiles ( y a veces hasta pueden confundir).
- --with-config-file-path=PATH
Establece la ruta a seguir para php.ini, el valor por defecto es /PREFIX/lib.
- --enable-safe-mode
Abilita SAFE MODE por defecto.
- --with-exec-dir[=DIR]
Solo permite executables en DIR cuando SAFE MODE está por defecto a /usr/local/php/bin.
- --enable-magic-quotes
Abilita MAGIC QUOTES por defecto.
- --disable-short-tags
Desabilita la forma corta de la etiqueta de inicio php <? por defecto.
opciones SAPI
La siguiente lista contiene los SAPI&s (Server Application Programming Interface) disponibles para PHP.
- --with-aolserver=DIR
Especifica la ruta donde se debe instalar AOLserver.
- --with-apxs[=FILE]
Construye un modulo apache compartido. FILE es la ruta opcional a la herramienta apxs de Apache. Asegúrese de específicar la versión de aspx que está instalada en su sistema y NO la que está en el archivo fuente de apache.
- --with-apache[=DIR]
Construye un modulo estático de Apache. DIR es el directorio de Apache, por defecto /usr/local/apache.
- --with-mod_charset
Habilita transferir las tablas para mod_charset (Apache en Ruso).
- --with-apxs2[=FILE]
Construye un modulo compartido de Apache 2.0. FILE es la ruta opcional a la herramienta apxs de Apache.
- --with-caudium=DIR
Construye PHP como un modulo Pike para ser usado con Caudium. DIR es el directorio del servidor Caudium, con el valor por defecto /usr/local/caudium/server.
- --disable-cli
Disponible con PHP 4.3.0. Deshabilita contruir la versión CLI de PHP (esto fuerza --without-pear). Más información está disponible en la sección acerca de Usar PHP desde la línea de comandos.
- --enable-embed[=TYPE]
Habilita construir la librería embebida SAPI. TYPE es shared o static, y su valor por defecto es shared. Disponible con PHP 4.3.0.
- --with-fhttpd[=DIR]
Cosntruye el modulo fhttpd. DIR es el directorio de los fuentes de fhttpd, su valor por defecto es /usr/local/src/fhttpd. Ya no está disponible a partir de PHP 4.3.0.
- --with-isapi=DIR
Construye PHP como un modulo ISAPI para ser usado con Zeus.
- --with-nsapi=DIR
Específica la ruta al servidor web instalado Netscape/iPlanet/SunONE.
- --with-phttpd=DIR
Sin información.
- --with-pi3web=DIR
Cosntruye PHP como un modulo para ser usado con Pi3Web.
- --with-roxen=DIR
Cosntruye PHP como un modulo Pike. DIR es el directorio base de Roxen, normalmente /usr/local/roxen/server.
- --enable-roxen-zts
Construye el modulo Roxen usando "Zend Thread Safety".
- --with-servlet[=DIR]
Incluye soporte para servlet. DIR es el directorio de instalación base para JSDK. Este SAPI requiere que la extensión de java sea construida como un dl compartido.
- --with-thttpd=SRCDIR
Construye PHP como un modulo thttpd.
- --with-tux=MODULEDIR
Construye PHP como un modulo TUX (sólo Linux).
- --with-webjames=SRCDIR
Construye PHP como un modulo WebJames (sólo RISC OS).
- --disable-cgi
Deshabilita la construcción de la versión CGI de PHP. Disponible con PHP 4.3.0.
- --enable-force-cgi-redirect
Habilita el chequeo de seguridad para redirecciones internas del servidor. Debe usar este si está ejecutando la versión CGI con Apache.
- --enable-discard-path
Si está habilitado, el binario CGI de PHP puede se puesto fuera del arbol web en forma segura y la gente no será capaz de evitar la seguridad de .htaccess
- --with-fastcgi
Cosntruye PHP como una aplicación FastCGI. Ya no está disponible desde PHP 4.3.0, en lugar de esto usted debe usar --enable-fastcgi.
- --enable-fastcgi
Si está habilitado, el modulo CGI será construido con soporte para FastCGI también. Disponible desde PHP 4.3.0.
- --disable-path-info-check
Si no está habilitado, fallarán las rutas tales como /info.php/test?a=b. Disponible desde PHP 4.3.0. Para m´s información vea el Manual de Apache.
One of the above mentioned to enable libxml. Instead use disable-all and enable only the required extensions. Otherwise it will complain of libxml for extensions that depend on libxml.
If you have compiled php without specifying a --with-config-file-path=PATH
then reconfigure php using --with-config-file-path=PATH, you must do a "make clean" then "make" & "make install" before reinstalling. If you don't make clean first, phpinfo will report the new location set by --with-config-file-path=PATH, but actually be looking for php.ini in the old location.
I'm not sure if this is intended behavior or not but this is a gotcha that got me after compiling, then reconfiguring, then doing make install. It caused a little head scratching.
It's good practice to do make clean after any configuration change anyway. Bite the bullet and take the time to do it right to avoid unexpected module behavior.
-Neil
It's not stated clearly anywhere in the documentation, but the CGI version won't build if you specify the --with-apxs= option to configure (the CLI version will, however). The only way I found to have *both* Apache module *and* CGI versions of PHP installed was to run configure/make twice - first with --with-apxs= option, to build the Apache module, then without it, to build the CGI binary.
I think if the doc says that the CGI version is built by default, it *should* be built by default, unless you specify --disable-cgi. If --with-apxs= automatically disables CGI, the --disable-cgi option doesn't seem to have any use.
Note: PHP5 has a zillion dependencies on libxml, it is not practical to disable it, you must install it.
libxml can be found here: http://www.xmlsoft.org/
But this is actualy a good thing; "Almost everything regarding XML support was rewritten for PHP 5".
For more info see: http://www.zend.com/php5/articles/php5-xmlphp.php
If you'e compiling a shared extension (e.g. pspell) whose libs & headers are not in the usual place, use the following:
--with-pspell=shared,/my/custom/path/to/pspell/
Took me forever to figure out, since Google had no answer for me.
If some options do not become active after doing a configure; make; make install, try to do a make clean after configure. That worked for me when enabling memory limts (--enable-memory-limit).
>/usr/local/lib needs to be listed in /etc/ld.so.conf, but it should already
>be there on most systems. The above notes all apply to Linux only,
>but may be useful on other platforms as well
It is much simpler just to put /usr/local/pgsql/lib into /etc/ld.so.conf and then run ldconfig.
If you're trying to build with --with-imap and your uw-imap stuff is built SSLTYPE=nopwd then you will fail the "Checking if IMAP works" check if you don't also build with --with-imap-ssl
Another hour and a half of my life lost to find that one.
Steve
[Editor's note: The reason why some general options for the "configure" scripts are not documented is that said script is part of the GNU autoconf tools, and as such its general options are documented elsewhere, e.g.: http://www.gnu.org/manual/autoconf/index.html and http://www.airs.com/ian/configure/. Some are also documented in the INSTALL file that comes with the source distribution.]
The --prefix=PREFIX configure option isn't mentioned here. It apparently defaults to /usr/local, and sets the position of the php includes and libs. (in PREFIX/include/php and PREFIX/lib/php)
RE: Servlet support, I found that you need to configure --with-servlet=/usr/local/tomcat/common.
I found checking the configure script (always a good idea) that it looks for {dir_prefix}/lib/servlet.jar file, and this is found in the tomcat/common directory.
Hope this helps a bit!
--enable-sigchild is only relevent to users of Oracle who are having <defunc> processes.
If you are building with --with-pgsql=/some/dir, make sure that you still have libpq loaded up by ldconfig. I compiled and installed postgres from the tarball and then had to manually create the symlinks in /usr/local/lib. In particular, after you have built and installed postgres, you need to do the following (presuming you installed to /usr/local/pgsql):
# cd /usr/local/lib
# ln -s ../pgsql/lib/libpq.so.2.1 libpq.so.2.1
# ln -s ../pgsql/lib/libpq.so.2.1 libpq.so.2
# ln -s ../pgsql/lib/libpq.so.2.1 libpq.so
# ldconfig
/usr/local/lib needs to be listed in /etc/ld.so.conf, but it should already be there on most systems. The above notes all apply to Linux only, but may be useful on other platforms as well.
--sam
