Descrição das principais diretivas do php.ini
Esta lista inclui as principais diretivas do php.ini, que podemos definir para configurar o PHP. Diretivas manipuladas por extensões são listadas e detalhas na respectiva página de documentação da extensão; Informações sobre diretivas de sessões por exemplo, pode ser encontrada na página de sessões.
Opções Httpd
| Nome | Padrão | Modificável | Changelog |
|---|---|---|---|
| async_send | "0" | PHP_INI_ALL |
Opções de linguagem
| Nome | Padrão | Modificável | Changelog |
|---|---|---|---|
| short_open_tag | "1" | PHP_INI_PERDIR | PHP_INI_ALL in PHP 4.0.0. PHP_INI_PERDIR in PHP >= 4.0.1. |
| asp_tags | "0" | PHP_INI_PERDIR | PHP_INI_ALL in PHP 4.0.0. |
| precision | "14" | PHP_INI_ALL | |
| serialize_precision | "17" | PHP_INI_ALL | Disponível desde PHP 4.3.2. Até PHP 5.3.5, o valor padrão é 100. |
| y2k_compliance | "1" | PHP_INI_ALL | Removido no PHP 5.4.0. |
| allow_call_time_pass_reference | "1" | PHP_INI_PERDIR | PHP_INI_ALL in PHP 4.0.0. Removido no PHP 5.4.0. |
| disable_functions | "" | php.ini only | Disponível desde PHP 4.0.1. |
| disable_classes | "" | php.ini only | Disponível desde PHP 4.3.2. |
| exit_on_timeout | "" | PHP_INI_ALL | Disponível desde PHP 5.3.0. |
| expose_php | "1" | php.ini apenas | |
| zend.multibyte | "0" | PHP_INI_ALL | Disponível desde PHP 5.4.0 |
| zend.script_encoding | NULL | PHP_INI_ALL | Disponível desde PHP 5.4.0 |
| zend.signal_check | "0" | PHP_INI_SYSTEM | Disponível desde PHP 5.4.0 |
| zend.ze1_compatibility_mode | "0" | PHP_INI_ALL | Disponível desde PHP 5.0.0. Removido no PHP 5.3.0 |
| detect_unicode | "1" | PHP_INI_ALL | Disponível desde PHP 5.1.0. Esta funcionalidade obsoleta será certamente removida no futuro. |
Here's a short explanation of the configuration directives.
-
short_open_tagboolean -
Diz ao PHP se a forma abreviada de abertura de tag (
<? ?>) (<? ?>) está permitida. Se quiser usar PHP em conjunto com XML, pode ser desabilitado esta opção a fim de usar em linha<?xml ?>. Caso contrário, pode-se imprimir com PHP, por exemplo<?php echo '<?xml version="1.0"?>'; ?>. Além disso, se se desabilitado, pode-se usar a forma extensa de abertura de tag (<?php ?>).Note:
Esta diretiva também afeta a forma abreviada
<?=anteriores ao PHP 5.4.0, que é a mesma que<? echo. Para uso desta abreviatura é necessário queshort_open_tagesteja ativo. Desde PHP 5.4.0,<?=está sempre disponível. - Ativa o uso do estilo ASP <% %> tags além da usual tag <?php ?>. Inclui a abreviatura de impressão da variável-valor <%= $value %>. Para mais informações, veja Escaping from HTML.
-
precisioninteger - O número de dígitos significativos mostrados em números de ponto flutuante.
-
serialize_precisioninteger - O número de dígitos significativos armazenados durante a serialização de números de pontos flutuantes.
-
y2k_complianceboolean - Assegura compatibilidade com ano 2000( irá causar problemas com navegadores não coompatíveis)
-
allow_call_time_pass_referenceboolean -
Serve para avisar quando argumentos são passados por referência durante chamadas de funções. O método recomendado para específicar quais argumentos deveriam ser passados por referência está na declaração da função. Recomendado tentar alterar esta função para Off e garantir que seus scripts funcionam corretamente a fim de garantir que eles executam com futuras versões da linguagem (pode-se receber uma mensagem de warning toda vez que for usado este recurso).
Passagem de argumentos por referência durante chamadas de função está obsoleta por razões de limpreza código. Uma função pode modificar estes argumentos maneira não documentada se não declarar que o argumento deve ser passado por referência. Para previnir efeitos colaterais é melhor especificar quais argumentos devem ser passados por referência apenas na declaração da função.
Veja também Explicação sobre referências.
Log de mundaças de allow_call_time_pass_reference Versão Descrição 5.4.0 Removido do PHP. 5.3.0 Emite um nível de erro E_DEPRECATED.5.0.0 Obsoleta, gera um nível de erro E_COMPILE_WARNING. -
expose_phpboolean -
Expõe para o mundo que o PHP está instalado no servidor, inclui a versão do PHP dentro do header HTTP (e.g., X-Powered-By: PHP/5.3.7). Antes do PHP 5.5.0 o logotipo guids do PHP também são expostos, de modo que, quando adicionado à URL do seu script PHP, será mostrado o logotipo correspondente (e.g., » http://www.php.net/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42). Isto também afeta a saída do phpinfo(), quando desabilitado, o logotipo PHP as informações de créditos não serão mostradas.
Note:
Desde o PHP 5.5.0, estes GUID e função php_logo_guid() foi removida do PHP e GUID foram substituídos por dados com URIs. Portanto, não funciona mais o acesso ao logotipo PHP adicionando o GUID para o URL. Similarmente, desativar
expose_phpnão afeta a exibição de logotipo PHP phpinfo().Veja também php_logo_guid() e phpcredits().
-
disable_functionsstring -
Esta diretiva permite você desabilitar certas funções por razões de segurança. Recebe uma lista de nomes delimitada por vírgulas. disable_functions não não é afetado pelo Modo Seguro.
Apenas funções internas podem ser dsabilitadas usando esta diretiva. Funções definidas pelo Usuário não são afetadas.
Esta diretiva deve ser configurada no php.ini, por exemplo, não pode ser configurada dentro do httpd.conf.
-
disable_classesstring -
Esta diretiva permite desabilitar certas classes por
razões de segurança. Recebe
uma lista de nomes de classes. disable_classes não é afetada
pelo Modo Seguro.
Esta diretiva dese ver configurada no php.ini, por exemplo,
não pode ser configurada no httpd.conf.
Note: Nota sobre disponibilidade
Esta diretiva tornou-se disponível no PHP 4.3.2 -
zend.ze1_compatibility_modeboolean -
Ativa modo de compatibilidade com Zend Engine 1 (PHP 4). Afeta a clonagem, conversão ( objetos sem propriedades são convertidos para
FALSEou 0), e comparação de objetos. Neste modo, objetos são passados por valor, em vez de por referência como padrão.Veja também seção entitulada Migrando do PHP 4 para o PHP 5.
WarningEste recurso se tornou OBSOLETO e foi REMOVIDO do PHP 5.3.0
-
zend.multibyteboolean -
Permite a análise de arquivos fontes em codificações multibytes.
-
zend.script_encodingstring -
Este valor vai ser usado, a menos que diretiva declare(encoding=...) apareça no início do script.
-
zend.signal_checkboolean -
Para verificar se manipuladores de sinais são substituídos no encerramento.
-
detect_unicodeboolean -
Verifica o BOM (Byte Order Mark) e vê se o arquivo contêm caracteres multibyte válidos. Esta detecção é formado antes do processamento do __halt_compiler(). Disponível apenas no modo Zend Multibyte
-
exit_on_timeoutboolean -
Esta é uma diretiva mod_php-only Apache1que força um subprocesso do Apache para sair se um execução PHP ocorre um timeout. Esse timeout causa uma chamada interna longjmp() no Apache1 que pode deixar alguma extensão em um estado inconscitente. Ao terminar o processo, será limpo de qualquer bloqueio pendente ou da memória.
Limite de Recursos
| Nome | Padrão | Modificável | Changelog |
|---|---|---|---|
| memory_limit | "128M" | PHP_INI_ALL | "8M" antes PHP 5.2.0, "16M" no PHP 5.2.0 |
Here's a short explanation of the configuration directives.
-
memory_limitinteger -
Define a quantidade máxima de memória em bytes que um script está permitido alocar. Isto ajuda a previnir que scripts mal escritos consumam toda memória disponível no servidor. Note que para não ter limite de memória, defina esta diretiva para -1.
Antes do PHP 5.2.1, para utilizar esta diretiva é necessário que seja habilitado em tempo de execução usando --enable-memory-limit no linha de comando. Esta flag em tempo de execução também é necessária para definir as funções memory_get_usage() e memory_get_peak_usage() em versões anteriores à 5.2.1.
Quando um integer é utilizado, o valor é medido em bytes. A resumida notação, como descrito neste FAQ, pode também ser usada.
Veja também: max_execution_time.
Ajuste de Desempenho
| Nome | Padrão | Modificável | Changelog |
|---|---|---|---|
| realpath_cache_size | "16K" | PHP_INI_SYSTEM | Disponível desde PHP 5.1.0. |
| realpath_cache_ttl | "120" | PHP_INI_SYSTEM | Disponível desde PHP 5.1.0. |
Here's a short explanation of the configuration directives.
-
realpath_cache_sizeinteger -
Determina o tamanho de cache do realpath para ser usado pelo PHP. Este valor deve ser aumentado em sistemas onde PHP abre muitos arquivos, para refletir a quantidade das operações realizadas com os arquivos.
-
realpath_cache_ttlinteger -
Tempo de duração (em segundos) para que o cache de informações do realpath para um dado arquivo ou diretório. Para sistemas que arquivos raramente mudam, considere aumentar o valor.
Manipulação de Dados
| Nome | Padrão | Modificável | Changelog |
|---|---|---|---|
| track_vars | "On" | PHP_INI_?? | |
| arg_separator.output | "&" | PHP_INI_ALL | Disponível desde PHP 4.0.5. |
| arg_separator.input | "&" | PHP_INI_PERDIR | Disponível desde PHP 4.0.5. |
| variables_order | "EGPCS" | PHP_INI_PERDIR | PHP_INI_ALL in PHP <= 5.0.5. |
| request_order | "" | PHP_INI_PERDIR | Disponível desde PHP 5.3.0 |
| auto_globals_jit | "1" | PHP_INI_PERDIR | Disponível desde PHP 5.0.0. |
| register_globals | "0" | PHP_INI_PERDIR | PHP_INI_ALL in PHP <= 4.2.3. Removido no PHP 5.4.0. |
| register_argc_argv | "1" | PHP_INI_PERDIR | PHP_INI_ALL in PHP <= 4.2.3. |
| register_long_arrays | "1" | PHP_INI_PERDIR | Disponível desde PHP 5.0.0. Deprecated in PHP 5.3.0. Removido no PHP 5.4.0. |
| enable_post_data_reading | "1" | PHP_INI_PERDIR | Disponível desde PHP 5.4.0 |
| post_max_size | "8M" | PHP_INI_PERDIR | PHP_INI_SYSTEM in PHP <= 4.2.3. Disponível desde PHP 4.0.3. |
| gpc_order | "GPC" | PHP_INI_ALL | Removido no PHP 5.0.0. |
| auto_prepend_file | NULL | PHP_INI_PERDIR | PHP_INI_ALL in PHP <= 4.2.3. |
| auto_append_file | NULL | PHP_INI_PERDIR | PHP_INI_ALL in PHP <= 4.2.3. |
| default_mimetype | "text/html" | PHP_INI_ALL | |
| default_charset | "" | PHP_INI_ALL | |
| always_populate_raw_post_data | "0" | PHP_INI_PERDIR | PHP_INI_ALL in PHP <= 4.2.3. Disponível desde PHP 4.1.0. |
Here's a short explanation of the configuration directives.
-
track_varsboolean -
Se habilitado, as variáveis de Ambiente, GET, POST, Cookie, e Servidor pode ser encontradas nos arrays associativos globais. $_ENV, $_GET, $_POST, $_COOKIE, e $_SERVER.
Note que PHP 4.0.3,
track_varsestá sempre ligado. -
arg_separator.outputstring -
O separador usado em URLs geradas pelo PHP para separar argumentos.
-
arg_separator.inputstring -
Lista de separadores usados pelo PHP para analisar URLs de entrada em variáveis.
Note:
Cada caracter na diretiva é considerado como separador!
-
variables_orderstring -
Define a ordem de interpretação das variáveis EGPCS (Environment, Get, Post, Cookie, e Server). Por exemplo, se variables_order está defindo para "SP" então o PHP vai criar o superglobals $_SERVER e $_POST, mas não irá criar $_ENV, $_GET, e $_COOKIE. parsing. For example, if variables_order is set to "SP" then PHP will create the superglobals $_SERVER and $_POST, but not create $_ENV, $_GET, and $_COOKIE. Para "" significa que superglobals não será definida.
Se a diretiva obsoleta register_globals está ativada, então variables_order também configura a ordem que as variáveis ENV, GET, POST, COOKIE e SERVER são preenchidas no escopo global. Por exemplo, se variables_order está definida para "EGPCS", register_globals está ativada, e ambos $_GET['action'] e $_POST['action'] estão definidos, então $action vai conter o valor do $_POST['action'] como P vem depois G em nosso exemplo do valor da diretiva.
WarningEm ambos CGI e FastCGI SAPIs, $_SERVER é também preenchido por valores de ambiente; S é sempre equivalente à ES independentemente do lugar do E nesta diretiva.
Note:
O conteúdo e ordem do $_REQUEST é também afetada por esta diretiva.
-
request_orderstring -
Esta diretiva descreve a ordem na qual PHP regista as variáves GET, POST, e Cookie no array _REQUEST. Registro é feito da esquerda para direita, valores mais recentes sobreescrevem os valores antigos.
Se esta diretiva não está definida, variables_order é usado para conteúdo $_REQUEST.
Note que a distribuição padrão do arquivo php.ini não contém o 'C' para cookies, por motivos de segurança.
-
auto_globals_jitboolean -
Quando ativado, as variáveis SERVER e ENV são criadas quando elas são usadas pela primeira vez ("Just In Time"), ao invés de quando o script inicia. Se estas variáveis não são usadas dentro de um script, esta diretiva resultará em um ganho de desempenho.
As diretivas PHP The PHP directives register_globals, register_long_arrays, e register_argc_argv devem ser desabilitadas para esta diretiva ter algum efeito. Desde PHP 5.1.3 não é necessário que register_argc_argv esteja desabilitado.
WarningUso das variáveis SERVER e ENV é verificada durante tempo de compilação fazendo uso através e.g. variable variables não causará sua inicialização.
-
register_globalsboolean -
Whether or not to register the EGPCS (Environment, GET, POST, Cookie, Server) variables as global variables.
As of » PHP 4.2.0, this directive defaults to off.
Please read the security chapter on Using register_globals for related information.
Please note that
register_globalscannot be set at runtime (ini_set()). Although, you can use .htaccess if your host allows it as described above. An example .htaccess entry:php_flag register_globals off.Note:
register_globalsis affected by the variables_order directive.WarningEsta funcionalidade tornou-se OBSOLETA desde o PHP 5.3.0 e foi REMOVIDA desde o PHP 5.4.0.
-
register_argc_argvboolean - Tells PHP whether to declare the argv & argc variables (that would contain the GET information). See also command line.
-
register_long_arraysboolean -
Tells PHP whether or not to register the deprecated long
$HTTP_*_VARS type
predefined
variables. When On (default), long predefined PHP
variables like $HTTP_GET_VARS will be defined.
If you're not using them, it's recommended to turn them off,
for performance reasons. Instead, use the superglobal arrays,
like $_GET.
This directive became available in PHP 5.0.0.
Warning
Esta funcionalidade tornou-se OBSOLETA desde o PHP 5.3.0 e foi REMOVIDA desde o PHP 5.4.0.
-
enable_post_data_readingboolean - Disabling this option causes $_POST and $_FILES not to be populated. The only way to read postdata will then be through the php://input stream wrapper. This can be useful to proxy requests or to process the POST data in a memory efficient fashion.
-
post_max_sizeinteger -
Sets max size of post data allowed. This setting also affects
file upload. To upload large files, this value must be larger
than upload_max_filesize.
If memory limit is enabled by your configure script, memory_limit also affects
file uploading. Generally speaking,
memory_limit should be
larger than
post_max_size. Quando um integer é utilizado, o valor é medido em bytes. A resumida notação, como descrito neste FAQ, pode também ser usada. If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty. This can be tracked in various ways, e.g. by passing the $_GET variable to the script processing the data, i.e. <form action="edit.php?processed=1">, and then checking if $_GET['processed'] is set.Note:
PHP allows shortcuts for bit values, including K (kilo), M (mega) and G (giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit (if you're using 32bit versions) as it will cause your script to fail.
-
gpc_orderstring -
Set the order of GET/POST/COOKIE variable parsing. The default setting of this directive is "GPC". Setting this to "GP", for example, will cause PHP to completely ignore cookies and to overwrite any GET method variables with POST-method variables of the same name.
Note:
Esta opção foi removida no PHP 5.0.0. Em vez disso use variables_order.
-
auto_prepend_filestring -
Specifies the name of a file that is automatically parsed before the main file. The file is included as if it was called with the require function, so include_path is used.
The special value none disables auto-prepending.
-
auto_append_filestring -
Specifies the name of a file that is automatically parsed after the main file. The file is included as if it was called with the require function, so include_path is used.
The special value none disables auto-appending.
Note: If the script is terminated with exit(), auto-append will not occur.
-
default_mimetypestring -
-
default_charsetstring -
PHP always outputs a character encoding by default in the Content-type: header. To disable sending of the charset, simply set it to be empty.
-
always_populate_raw_post_databoolean -
Always populate the $HTTP_RAW_POST_DATA containing the raw POST data. Otherwise, the variable is populated only with unrecognized MIME type of the data. However, the preferred method for accessing the raw POST data is php://input. $HTTP_RAW_POST_DATA is not available with enctype="multipart/form-data".
See also: magic_quotes_gpc, magic_quotes_runtime, and magic_quotes_sybase.
Paths and Directories
| Nome | Padrão | Modificável | Changelog |
|---|---|---|---|
| include_path | ".;/path/to/php/pear" | PHP_INI_ALL | |
| open_basedir | NULL | PHP_INI_ALL | PHP_INI_SYSTEM in PHP < 5.3.0 |
| doc_root | NULL | PHP_INI_SYSTEM | |
| user_dir | NULL | PHP_INI_SYSTEM | |
| extension_dir | "/path/to/php" | PHP_INI_SYSTEM | |
| extension | NULL | php.ini only | |
| zend_extension | NULL | php.ini only | |
| zend_extension_debug | NULL | php.ini only | Available before PHP 5.3.0. |
| zend_extension_debug_ts | NULL | php.ini only | Available before PHP 5.3.0. |
| zend_extension_ts | NULL | php.ini only | Available before PHP 5.3.0. |
| cgi.check_shebang_line | "1" | PHP_INI_SYSTEM | Disponível desde PHP 5.2.0. |
| cgi.fix_pathinfo | "1" | PHP_INI_SYSTEM | Disponível desde PHP 4.3.0. PHP_INI_ALL prior to PHP 5.2.1. |
| cgi.force_redirect | "1" | PHP_INI_SYSTEM | Disponível desde PHP 4.2.0. PHP_INI_ALL prior to PHP 5.2.1. |
| cgi.redirect_status_env | NULL | PHP_INI_SYSTEM | Disponível desde PHP 4.2.0. PHP_INI_ALL prior to PHP 5.2.1. |
| cgi.rfc2616_headers | "0" | PHP_INI_ALL | Disponível desde PHP 4.3.0. |
| fastcgi.impersonate | "0" | PHP_INI_SYSTEM | Disponível desde PHP 4.3.0. PHP_INI_ALL prior to PHP 5.2.1. |
| fastcgi.logging | "1" | PHP_INI_SYSTEM | Disponível desde PHP 4.3.0. PHP_INI_ALL prior to PHP 5.2.1. |
Here's a short explanation of the configuration directives.
-
include_pathstring -
Specifies a list of directories where the require, include, fopen(), file(), readfile() and file_get_contents() functions look for files. The format is like the system's PATH environment variable: a list of directories separated with a colon in Unix or semicolon in Windows.
PHP considers each entry in the include path separately when looking for files to include. It will check the first path, and if it doesn't find it, check the next path, until it either locates the included file or returns with a warning or an error. You may modify or set your include path at runtime using set_include_path().
Example #1 Unix include_path
include_path=".:/php/includes"
Example #2 Windows include_path
include_path=".;c:\php\includes"
Using a . in the include path allows for relative includes as it means the current directory. However, it is more efficient to explicitly use include './file' than having PHP always check the current directory for every include.
Note:
ENV variables are also accessible in .ini files. As such it is possible to reference the home directory using ${LOGIN} and ${USER}.
Environment variables may vary between Server APIs as those environments may be different.
Example #3 Unix include_path using ${USER} env variable
include_path = ".:${USER}/pear/php" -
open_basedirstring -
Limit the files that can be opened by PHP to the specified directory-tree, including the file itself. This directive is NOT affected by whether Safe Mode is turned On or Off.
When a script tries to open a file with, for example, fopen() or gzopen(), the location of the file is checked. When the file is outside the specified directory-tree, PHP will refuse to open it. All symbolic links are resolved, so it's not possible to avoid this restriction with a symlink. If the file doesn't exist then the symlink couldn't be resolved and the filename is compared to (a resolved) open_basedir .
The special value
.indicates that the working directory of the script will be used as the base-directory. This is, however, a little dangerous as the working directory of the script can easily be changed with chdir().In httpd.conf, open_basedir can be turned off (e.g. for some virtual hosts) the same way as any other configuration directive with "php_admin_value open_basedir none".
Under Windows, separate the directories with a semicolon. On all other systems, separate the directories with a colon. As an Apache module, open_basedir paths from parent directories are now automatically inherited.
The restriction specified with open_basedir is a directory name since PHP 5.2.16 and 5.3.4. Previous versions used it as a prefix. This means that "open_basedir = /dir/incl" also allowed access to "/dir/include" and "/dir/incls" if they exist. When you want to restrict access to only the specified directory, end with a slash. For example: open_basedir = /dir/incl/
The default is to allow all files to be opened.
Note:
As of PHP 5.3.0 open_basedir can be tightened at run-time. This means that if open_basedir is set to /www/ in php.ini a script can tighten the configuration to /www/tmp/ at run-time with ini_set(). When listing several directories, you can use the
PATH_SEPARATORconstant as a separator regardless of the operating system. -
doc_rootstring -
PHP's "root directory" on the server. Only used if non-empty. If PHP is configured with safe mode, no files outside this directory are served. If PHP was not compiled with FORCE_REDIRECT, you should set doc_root if you are running PHP as a CGI under any web server (other than IIS). The alternative is to use the cgi.force_redirect configuration below.
-
user_dirstring -
The base name of the directory used on a user's home directory for PHP files, for example public_html .
-
extension_dirstring -
In what directory PHP should look for dynamically loadable extensions. See also: enable_dl, and dl().
-
extensionstring -
Which dynamically loadable extensions to load when PHP starts up.
-
zend_extensionstring -
Absolute path to dynamically loadable Zend extension (for example APD) to load when PHP starts up.
-
zend_extension_debugstring -
Variant of zend_extension for extensions compiled with debug info prior to PHP 5.3.0.
-
zend_extension_debug_tsstring -
Variant of zend_extension for extensions compiled with debug info and thread safety prior to PHP 5.3.0.
-
zend_extension_tsstring -
Variant of zend_extension for extensions compiled with thread safety prior to PHP 5.3.0.
-
cgi.check_shebang_lineboolean -
Controls whether CGI PHP checks for line starting with #! (shebang) at the top of the running script. This line might be needed if the script support running both as stand-alone script and via PHP CGI. PHP in CGI mode skips this line and ignores its content if this directive is turned on.
-
cgi.fix_pathinfoboolean -
Provides real PATH_INFO/ PATH_TRANSLATED support for CGI. PHP's previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok what PATH_INFO is. For more information on PATH_INFO, see the CGI specs. Setting this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting of zero causes PHP to behave as before. It is turned on by default. You should fix your scripts to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
-
cgi.force_redirectboolean -
cgi.force_redirect is necessary to provide security running PHP as a CGI under most web servers. Left undefined, PHP turns this on by default. You can turn it off at your own risk.
Note:
Windows Users: When using IIS this option must be turned off. For OmniHTTPD or Xitami the same applies.
-
cgi.redirect_status_envstring -
If cgi.force_redirect is turned on, and you are not running under Apache or Netscape (iPlanet) web servers, you may need to set an environment variable name that PHP will look for to know it is OK to continue execution.
Note:
Setting this variable may cause security issues, know what you are doing first.
-
cgi.rfc2616_headersint -
Tells PHP what type of headers to use when sending HTTP response code. If it's set to 0, PHP sends a » RFC 3875 "Status:" header that is supported by Apache and other web servers. When this option is set to 1, PHP will send » RFC 2616 compliant headers.
If this option is enabled, and you are running PHP in a CGI environment (e.g. PHP-FPM) you should not use standard RFC 2616 style HTTP status response headers, you should instead use their RFC 3875 equivalent e.g. instead of header("HTTP/1.0 404 Not found"); you should use header("Status: 404 Not Found");
Leave it set to 0 unless you know what you're doing.
-
fastcgi.impersonatestring -
FastCGI under IIS (on WINNT based OS) supports the ability to impersonate security tokens of the calling client. This allows IIS to define the security context that the request runs under. mod_fastcgi under Apache does not currently support this feature (03/17/2002) Set to 1 if running under IIS. Default is zero.
-
fastcgi.loggingboolean -
Turns on SAPI logging when using FastCGI. Default is to enable logging.
File Uploads
| Nome | Padrão | Modificável | Changelog |
|---|---|---|---|
| file_uploads | "1" | PHP_INI_SYSTEM | PHP_INI_ALL in PHP <= 4.2.3. Disponível desde PHP 4.0.3. |
| upload_tmp_dir | NULL | PHP_INI_SYSTEM | |
| max_input_nesting_level | 64 | PHP_INI_PERDIR | Disponível desde PHP 5.3.9. |
| max_input_vars | 1000 | PHP_INI_PERDIR | Disponível desde PHP 5.3.9. |
| upload_max_filesize | "2M" | PHP_INI_PERDIR | PHP_INI_ALL in PHP <= 4.2.3. |
| max_file_uploads | 20 | PHP_INI_SYSTEM | Disponível desde PHP 5.2.12. |
Here's a short explanation of the configuration directives.
-
file_uploadsboolean or integer -
Whether or not to allow HTTP file uploads. See also the upload_max_filesize, upload_tmp_dir, and post_max_size directives.
Quando um integer é utilizado, o valor é medido em bytes. A resumida notação, como descrito neste FAQ, pode também ser usada. -
upload_tmp_dirstring -
The temporary directory used for storing files when doing file upload. Must be writable by whatever user PHP is running as. If not specified PHP will use the system's default.
If the directory specified here is not writable, PHP falls back to the system default temporary directory. If open_basedir is on, then the system default directory must be allowed for an upload to succeed.
-
upload_max_filesizeinteger -
The maximum size of an uploaded file.
Quando um integer é utilizado, o valor é medido em bytes. A resumida notação, como descrito neste FAQ, pode também ser usada. -
max_file_uploadsinteger -
The maximum number of files allowed to be uploaded simultaneously. Starting with PHP 5.3.4, upload fields left blank on submission do not count towards this limit.
General SQL
| Nome | Padrão | Modificável | Changelog |
|---|---|---|---|
| sql.safe_mode | "0" | PHP_INI_SYSTEM |
Here's a short explanation of the configuration directives.
-
sql.safe_modeboolean -
If turned on, database connect functions that specify default values will use those values in place of supplied arguments. For default values see connect function documentation for the relevant database.
Windows Specific
| Nome | Padrão | Modificável | Changelog |
|---|---|---|---|
| windows_show_crt_warning | "0" | PHP_INI_ALL | Disponível desde PHP 5.4.0. |
Here's a short explanation of the configuration directives.
-
windows_show_crt_warningboolean -
This directive shows the Windows CRT warnings when enabled. These warnings were displayed by default until PHP 5.4.0.