PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Diretivas do arquivo php.ini> <Debugando em PHP
Last updated: Fri, 25 Jul 2008

view this page in

Opções do script Configure

Lista de opções principais do script configure

Abaixo está a lista parcial das opções do script configure usado pelo PHP quando compilando o mesmo em ambientes Unix-like. A maioria das opções de configuração está listada na página de referência da extensão e não aqui. Para uma lista atualizada e completa das opções do script configure, execute ./configure --help no diretórios dos fontes do PHP após executar autoconf (veja também o capítulo de Instalação). Você pode também se interessar em ler a documentação do » GNU configure para obter informações em opções adicionais do configure tais como --prefix=PREFIX.

Nota: Essa são usadas apenas em tempo de compilação. Se você quiser alterar a configuração do PHP em tempo de execução, por favor, veja o capítulo deConfiguração em tempo de execução.

Opções do Configuração do PHP

Nota: Essas opções são são usadas no PHP a partir do PHP 4.1.0, embora algumas estão disponíveis em versões anteriores também. Se você quer compilar uma versão antiga, algumas opções provavelmente não estarão disponíveis.

Opções Mistas

--enable-debug

Compila com símbolos para depuração.

--with-layout=TYPE

Configura a disposição dos arquivos instalados. TYPE pode ser PHP (padrão) ou GNU.

--with-pear=DIR

Instala o PEAR em DIR (padrão é PREFIX/lib/php).

--without-pear

Não instala o PEAR.

--enable-sigchild

Permite que o PHP tenha um tratador de SIGCHLD próprio.

--disable-rpath

Desabilita passagem de caminhos adicionais aonde buscar por bibliotecas em tempo de execução.

--enable-libgcc

Habilita montar explicitamente com a libgcc.

--enable-php-streams

Inclue fluxos de dados (streams) experimentais do PHP. Não use a não ser que esteja testando o código!

--with-zlib-dir[=DIR]

Define a localização do diretório onde a zlib está instalada.

--enable-trans-sid

Habilitada propagação transparente do id da sessão. Apenas válido para PHP 4.1.2 ou anterior. Do PHP 4.2.0 em diante, a funcionalidade trans-sid sempre é compilada.

--with-tsrm-pthreads

Use threads POSIX (padrão).

--enable-shared[=PKGS]

Monta bibliotecas compartilhadas [padrão=yes].

--enable-static[=PKGS]

Monta bibliotecas estáticas [padrão=yes].

--enable-fast-install[=PKGS]

Optimiza para instalação rápida [padrão=yes].

--with-gnu-ld

Presume que o compilador C usa o GNU ld [padrão=no].

--disable-libtool-lock

Evita travamento (pode quebrar compilações rodando em paralelo).

--with-pic

Tenta usar apenas objetos PIC/não-PIC [padrão=use both].

--enable-memory-limit

Compila com suporte a limite de memória. (não disponível desde o PHP 5.2.1 - sempre habilitado)

--disable-url-fopen-wrapper

Desabilita o wrapper da função fopen que permite acessar arquivos via HTTP ou FTP. (não disponível desde o PHP 5.2.5)

--enable-versioning

Exporta apenas os símbolos necessários. Veja o arquivo INSTALL para mais informações.

Opções do PHP

--enable-maintainer-mode

Habilita criar regras e dependências que não são úteis (e algumas vezes confusas) para o instalador casual.

--with-config-file-path=PATH

Edita o caminho no qual deve procurar pelo arquivo php.ini, padrão é PREFIX/lib.

--enable-safe-mode

Habilita o modo seguro por padrão.

--with-exec-dir[=DIR]

Apenas permite executáveis no DIR quando em modo seguro. Padrão é /usr/local/php/bin.

--enable-magic-quotes

Habilita aspas mágicas por padrão.

--disable-short-tags

Desabilita a forma comprimida de tag inicial <? por padrão.

Opções SAPI

A lista a seguir contêm as SAPI&s (Server Application Programming Interface) para o PHP.

--with-aolserver=DIR

Especifica o caminho para o AOLserver instalado.

--with-apxs[=FILE]

Monta como módulo compartilhado do Apache. FILE é o caminho opcional para a ferramenta apxs do Apache; padrão é apxs. Assegure-se que você especificou a versão do apxs que está atualmente instalado no seu sistema e não a que está no diretório dos fontes do Apache.

--with-apache[=DIR]

Monta como módulo estático do Apache. DIR é o diretório dos fontes do Apache, padrão é /usr/local/apache.

--with-mod_charset

Habilita transferência de tabelas para mod_charset (Apache Russo).

--with-apxs2[=FILE]

Monta como módulo compartilhado do Apache 2.0. FILE é o caminho opcional para a ferramenta apxs do Apache; padrão é apxs.

--with-caudium=DIR

Build PHP as a Pike module for use with Caudium. DIR is the Caudium server dir, with the default value /usr/local/caudium/server.

--disable-cli

Available with PHP 4.3.0. Disable building the CLI version of PHP (this forces --without-pear). More information is available in the section about Using PHP from the command line.

--enable-embed[=TYPE]

Habilita montagem da biblioteca SAPI embutida. TYPE é ou shared ou static, que tem como padrão shared. Disponível com PHP 4.3.0.

--with-fhttpd[=DIR]

Constrói o módulo fhttpd. DIR é o diretório dos fontes do fhttpd, padrão é /usr/local/src/fhttpd. Não mais disponível a partir do PHP 4.3.0.

--with-isapi=DIR

Monta o PHP como um módulo ISAPI para uso com o Zeus.

--with-nsapi=DIR

Especifica o caminho para o servidor web instalado Netscape/iPlanet/SunONE.

--with-phttpd=DIR

Nenhuma informação ainda.

--with-pi3web=DIR

Monta o PHP como módulo para usar com Pi3Web.

--with-roxen=DIR

Monta PHP como um módulo Pike. DIR é o diretório básico do Roxen, normalmente /usr/local/roxen/server.

--enable-roxen-zts

Monta o módulo Roxen usando Zend Thread Safety.

--with-servlet[=DIR]

Inclue o suporte à servlet. DIR é o diretório base de instalação para a JSDK. Esse SAPI requer que a extensão java seja monta como uma dl compartilhada.

--with-thttpd=SRCDIR

Monta o PHP como um módulo thttpd.

--with-tux=MODULEDIR

Monta o PHP como um módulo TUX (apenas Linux).

--with-webjames=SRCDIR

Monta o PHP como um módulo do WebJames (apenas para RISC OS)

--disable-cgi

Desabilita montar a versão CGI do PHP. Disponível com PHP 4.3.0.

--enable-force-cgi-redirect

Habilita a checagem de segurança nos redirecionamentos internos do servidor. Você deve usar isso se você estiver executando a versão CGI com o Apache.

--enable-discard-path

Se essa opção estiver habilitada, o binário CGI do PHP pode ser colocado com segurança fora da árvore web e as pessoas não serão capaz de evitar a segurança do .htaccess.

--with-fastcgi

Monta PHP como uma aplicação FastCGI. Não mais disponível a partir do PHP 4.3.0, ao invés, você deve usar --enable-fastcgi.

--enable-fastcgi

Se essa opção estiver habilitada, o módulo CGI será montado com suporta para FastCGI também. Disponível desde o PHP 4.3.0.

--disable-path-info-check

Se essa opção estiver desabilitada, caminhos como /info.php/test?a=b não funcionarão. Disponível desde o PHP 4.3.0. Para mais informações, leia o » Manual do Apache.



Diretivas do arquivo php.ini> <Debugando em PHP
Last updated: Fri, 25 Jul 2008
 
add a note add a note User Contributed Notes
Opções do script Configure
Thani
22-Jul-2008 02:35
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.
Neil Davis
04-Mar-2008 05:07
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
raj at ap dot krakow dot pl
07-Feb-2008 09:52
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.
codeslinger at compsalot dot com
30-Nov-2006 10:26
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
jovcic ate gseis stop ucla stop edu
09-Jul-2005 03:26
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.
joerg at fenin dot de
14-Apr-2005 09:15
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).
17-Jan-2004 12:33
>/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.
steve at njord dot org
06-Oct-2003 02:32
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
squeeNoSpam at NoSpamAddress dot com
14-Aug-2002 09:06
[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)
tysonlt from web_SPAMOFF_media com au
15-Apr-2002 07:42
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!
ceo at l-i-e dot com
14-Aug-2001 09:05
--enable-sigchild is only relevent to users of Oracle who are having <defunc> processes.
petrov at rice dot edu
03-Nov-2000 07:27
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

Diretivas do arquivo php.ini> <Debugando em PHP
Last updated: Fri, 25 Jul 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites