In [HOST=...] one should use only the 1st server name from the list of server names.
I.E. if you have
server_name example.com, example2.com;
and will use www.example.com in a browser,
use [HOST=example.com] in php.ini for both addresses.
PHP looks not at the HOST request header (as I expected), but at the SERVER_NAME parameter (which by default is the 1st from the list of names, no matter what the HOST is).
Lista das seções do php.ini
Esta lista inclui as seções do php.ini que você pode definir para configurar o PHP numa base por servidor ou por caminho. Estas seções são opcionais.
Estas seções não afetam diretamente o PHP. Elas são usadas para agrupar outras diretivas do php.ini e para faze-las ajir sobre um servidor em particular ou um caminho em particular.
| Name | Changeable | Changelog |
|---|---|---|
| [HOST=] | PHP_INI_SYSTEM | Added in PHP 5.3.0. |
| [PATH=] | PHP_INI_SYSTEM | Added in PHP 5.3.0. |
Breve descrição das diretivas de configuração.
- [HOST=<host>]
-
This section allows you to define a set of php.ini directives that will take effect on the named host.
Exemplo #1 Activate full on-screen error reporting for dev. domain
[HOST=dev.site.com] error_reporting = E_ALL display_errors = On
- [PATH=<path>]
-
This section allows you to define a set of php.ini directives that will take effect when a script runs from the named path.
Exemplo #2 Add security script for protected areas
[PATH=/home/site/public/secure] auto_prepend_file=security.php
Lista das seções do php.ini
24-Sep-2009 08:00
