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

search for in the

Wie man Konfigurationseinstellungen ändert> <.user.ini-Dateien
[edit] Last updated: Fri, 17 May 2013

view this page in

Wo Konfigurationseinstellungen gesetzt werden können

Diese Modi bestimmen wann und wo eine PHP-Direktive gesetzt oder nicht gesetzt werden kann. Jede Direktive im Handbuch verweist auf einen dieser Modi. Zum Beispiel können einige Einstellungen in einem PHP-Skript mittels ini_set() gesetzt werden, während andere nur über die php.ini oder httpd.conf gesetzt werden können.

Ein Beispiel ist die output_buffering-Einstellung. Wegen PHP_INI_PERDIR kann sie nicht mittels ini_set() gesetzt werden. Die display_errors-Einstellung hingegegen kann wegen PHP_INI_ALL überall gesetzt werden, also auch mittels ini_set().

Definition der PHP_INI_*-Modi
Modus Bedeutung
PHP_INI_USER Eintrag kann in Benutzerskripten (z.B. mittels ini_set()) oder in der Windows-Registry gesetzt werden. Seit PHP 5.3 kann die Option auch in der .user.ini gesetzt werden.
PHP_INI_PERDIR Eintrag kann in der php.ini, .htaccess, httpd.conf oder .user.ini (seit PHP 5.3) gesetzt werden
PHP_INI_SYSTEM Eintrag kann in der php.ini oder httpd.conf gesetzt werden
PHP_INI_ALL Eintrag kann überall gesetzt werden



add a note add a note User Contributed Notes Wo Konfigurationseinstellungen gesetzt werden können - [1 notes]
up
1
mritunjay dot kumar at ballisticlearning dot com
4 months ago
There are several Apache directives that allow you to change the PHP configuration from within the Apache configuration files. For a listing of which directives are PHP_INI_ALL, PHP_INI_PERDIR, or PHP_INI_SYSTEM.

Sets the value of the specified directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives. To clear a previously set value use none as the value.

A handy trick to pick up parse errors in test_file.php if you can't set display_errors in php.ini or use .htaccess:
<?php
error_reporting 
(E_ALL);
ini_set ('display_errors', true);
include(
'./test_file.php');
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites