Manual do PHP
Anterior | Apêndice H. List of core `php.ini` directives | Próxima

# Paths and Directories

Tabela H-5. Paths and Directories Configuration Options

Name | Default | Changeable
--- | --- | ---
include_path | PHP_INCLUDE_PATH | PHP_INI_ALL
doc_root | PHP_INCLUDE_PATH | PHP_INI_SYSTEM
user_dir | NULL | PHP_INI_SYSTEM
extension_dir | PHP_EXTENSION_DIR | PHP_INI_SYSTEM
cgi.fix_pathinfo | "0" | PHP_INI_SYSTEM
cgi.force_redirect | "1" | PHP_INI_SYSTEM
cgi.redirect_status_env | "" | PHP_INI_SYSTEM
fastcgi.impersonate | "0" | PHP_INI_SYSTEM
cgi.rfc2616_headers | "0" | PHP_INI_SYSTEM

Breve descrição das diretivas de configuração.

include_path string

  Specifies a list of directories where the require(), include() and fopen_with_path() 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.

  Exemplo H-1. Unix include_path
      include_path=".:/php/includes"

  Exemplo H-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.

doc_root string

  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_dir string

  The base name of the directory used on a user's home directory for PHP files, for example `public_html` .

extension_dir string

  In what directory PHP should look for dynamically loadable extensions. See also: enable_dl, and dl().

extension string

  Which dynamically loadable extensions to load when PHP starts up.

cgi.fix_pathinfo boolean

  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 it's paths to conform to the spec. A setting of zero causes PHP to behave as before. Default is zero. You should fix your scripts to use SCRIPT_FILENAME rather than PATH_TRANSLATED.

cgi.force_redirect boolean

  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.

  > Nota: Windows Users: You can safely turn this off for IIS, in fact, you must. To get OmniHTTPD or Xitami to work you must turn it off.

cgi.redirect_status_env string

  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.

  > Nota: Setting this variable may cause security issues, know what you are doing first.

fastcgi.impersonate string

  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.

cgi.rfc2616_headers int

  Tells PHP what type of headers to use when sending HTTP response code. If it's set 0, PHP sends a 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. Leave it set to 0 unless you know what you're doing.

Anterior | Principal | Próxima
Data Handling | Acima | File Uploads