|
|
Ich | Entwicklung | Lösungen | Apache | PHP | mySQL | |||||||
Installation Konfiguration Erste Schritte
|
Der Abschnitt Language Optionsengine
; Enable the PHP scripting language engine under Apache. engine = On Da fragt man sich, was das soll... ganz einfach: wenn Sie PHP (zu Testzwecken oder warum auch immer) deaktivieren möchten, können Sie das hier recht einfach tun, ohne die httpd.conf ändern zu müssen. Wenn PHP als CGI-Version läuft, muss noch nicht einmal der Apache neu gestartet werden (da die CGI-Version die php.ini bei jedem Start neu einliest). zend.ze1_compatibility_mode; Enable compatibility mode with Zend Engine 1 (PHP 4.x). zend.ze1_compatibility_mode = Off Rein prinzipiell kann man die Zend Engine 2 mit PHP 4 mischen. Davon rate ich dringend ab, der Standardwert short_open_tag
; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized. short_open_tag = On Wenn auf short_open_tag = Off Vor allem deshalb, weil asp_tags
; Allow ASP-style <% %> tags. asp_tags = Off Wenn auf precision; The number of significant digits displayed in floating point numbers. precision = 14 Die Anzahl der Stellen, die bei Fließkommazahlen (Gleitkommazahlen) standardmäßig angezeigt wird. y2k_compliance; Enforce year 2000 compliance (will cause problems with non-compliant browsers) y2k_compliance = Off Ich habe selbst noch nie ausprobiert, was output_buffering; Output buffering allows you to send header lines (including cookies) even ; after you send body content, at the price of slowing PHP's output layer a ; bit. You can enable output buffering during runtime by calling the output ; buffering functions. You can also enable output buffering for all files by ; setting this directive to On. If you wish to limit the size of the buffer ; to a certain size - you can use a maximum number of bytes instead of 'On', as ; a value for this directive (e.g., output_buffering=4096). output_buffering = 4096 Aus dem Vorspann (Unterschied zur ; - output_buffering = 4096 [Performance] ; Set a 4KB output buffer. Enabling output buffering typically results in less ; writes, and sometimes less packets sent on the wire, which can often lead to ; better performance. The gain this directive actually yields greatly depends ; on which Web server you're working with, and what kind of scripts you're using. Die Ausgabe-Pufferung ist für einen Großteil der Anwendungen uninteressant, die Standardeinstellung
Eine Empfehlung kann ich hier nicht aussprechen, weil das auf die Bedürfnisse des Anwenders ankommt. Ich tendiere aber zur Arbeit ohne Puffer, weil es zu sauberem Programmieren zwingt. Header-Daten müssen zu Beginn geschickt werden. Pufferung für bestimmte Teile des Programms kann explizit im Programm aktiviert werden, falls sie benötigt wird (mit output_handler; You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to "ob_gzhandler", output will be ; transparently compressed for browsers that support gzip or deflate encoding. ; Setting an output handler automatically turns on output buffering. output_handler = Wenn Sie einen zlib.output_compression und zlib.output_handler; Transparent output compression using the zlib library ; Valid values for this option are 'off', 'on', or a specific buffer size ; to be used for compression (default is 4KB) ; Note: Resulting chunk size may vary due to nature of compression. PHP ; outputs chunks that are few hundreds bytes each as a result of compression. ; If you want larger chunk size for better performence, enable output_buffering ; also. ; Note: output_handler must be empty if this is set 'On' !!!! ; Instead you must use zlib.output_handler. zlib.output_compression = Off ; You cannot specify additional output handlers if zlib.output_compression ; is activated here. This setting does the same as output_handler but in ; a different order. ;zlib.output_handler = Belassen Sie diese Einstellung wie sie ist, es sei denn Sie wissen genau, was Sie tun! Genau wie der Apache kann auch PHP mit zlib komprimierte Dateipakete an Browser (oder andere Clients) versenden. Ich kann dies aber nicht empfehlen, da einige Browser damit nicht umgehen können! implicit_flush; Implicit flush tells PHP to tell the output layer to flush itself ; automatically after every output block. This is equivalent to calling the ; PHP function flush() after each and every call to print() or echo() and each ; and every HTML block. Turning this option on has serious performance ; implications and is generally recommended for debugging purposes only. implicit_flush = Off Wie oben schon einmal angeschnitten (bei unserialize_callback_func; The unserialize callback function will called (with the undefined class' ; name as parameter), if the unserializer finds an undefined class ; which should be instanciated. ; A warning appears if the specified function is not defined, or if the ; function doesn't include/implement the missing class. ; So only set this entry, if you really want to implement such a ; callback-function. unserialize_callback_func= Eine neuere Einstellung. Für Anfänger völlig unbedeutend. serialize_precision; When floats & doubles are serialized store serialize precision significant ; digits after the floating point. The default value ensures that when floats ; are decoded with unserialize, the data will remain the same. serialize_precision = 100 Ehrlich gesagt: wieder so eine Einstellung, die die Welt nicht braucht. allow_call_time_pass_reference; Whether to enable the ability to force arguments to be passed by reference ; at function call time. This method is deprecated and is likely to be ; unsupported in future versions of PHP/Zend. The encouraged method of ; specifying which arguments should be passed by reference is in the function ; declaration. You're encouraged to try and turn this option Off and make ; sure your scripts work properly with it in order to ensure they will work ; with future versions of the language (you will receive a warning each time ; you use this feature, and the argument will be passed by value instead of by ; reference). allow_call_time_pass_reference = Off Aus dem Vorspann (Unterschied zur ; - allow_call_time_pass_reference = Off [Code cleanliness] ; It's not possible to decide to force a variable to be passed by reference ; when calling a function. The PHP 4 style to do this is by making the ; function require the relevant argument by reference. Eine aus Kompabilitätsgründen zu PHP 3 übernommene Einstellung, die veraltet ist und in zukünftigen Versionen von PHP nicht mehr unterstützt werden wird. Daher einfach mir vertrauen und auf safe_mode; ; Safe Mode ; safe_mode = Off Der sichere Modus ist eine nicht ganz unproblematische Methode, um Sicherheit bei kritischen Funktionen und Dateioperationen zu gewährleisten. Besonders problematisch ist der sichere Modus unter Windows-Betriebssystemen, denn er wurde für UNIX entwickelt und funktioniert auch nur dort halbwegs zuverlässig. Provider haben den sicheren Modus meist aktiviert, da die Benutzung einiger Funktionen, mit denen Schabernack getrieben werden kann, eingeschränkt oder untersagt ist.
safe_mode_gid; By default, Safe Mode does a UID compare check when ; opening files. If you want to relax this to a GID compare, ; then turn on safe_mode_gid. safe_mode_gid = Off Im sicheren Modus wird normalerweise überprüft, ob das Skript den selben Besitzer hat wie die Datei, auf der eine Operation ausgeführt werden soll. Wenn safe_mode_include_dir; When safe_mode is on, UID/GID checks are bypassed when ; including files from this directory and its subdirectories. ; (directory must also be in include_path or full path must ; be used when including) safe_mode_include_dir = Diese Einstellung ersetzt die Einstellung safe_mode_exec_dir; When safe_mode is on, only executables located in the safe_mode_exec_dir ; will be allowed to be executed via the exec family of functions. safe_mode_exec_dir = Wenn Sie PHP im sicheren Modus betreiben werden die Funktionen open_basedir; open_basedir, if set, limits all file operations to the defined directory ; and below. This directive makes most sense if used in a per-directory ; or per-virtualhost web server configuration file. ;open_basedir = Dateioperationen dürfen im sicheren Modus nur im mit safe_mode_allowed_env_vars; Setting certain environment variables may be a potential security breach. ; This directive contains a comma-delimited list of prefixes. In Safe Mode, ; the user may only alter environment variables whose names begin with the ; prefixes supplied here. By default, users will only be able to set ; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR). ; Note: If this directive is empty, PHP will let the user modify ANY ; environment variable! safe_mode_allowed_env_vars = PHP_ Mit safe_mode_protected_env_vars; This directive contains a comma-delimited list of environment variables that ; the end user won't be able to change using putenv(). These variables will be ; protected even if safe_mode_allowed_env_vars is set to allow to change them. safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions; This directive allows you to disable certain functions for security reasons. ; It receives a comma-delimited list of function names. This directive is ; *NOT* affected by whether Safe Mode is turned On or Off. disable_functions = An dieser Stelle kann man festlegen, welche Funktionen in Skripten nicht benutzt werden dürfen (durch Kommata getrennt; z.B. disable_classes; This directive allows you to disable certain classes for security reasons. ; It receives a comma-delimited list of class names. This directive is ; *NOT* affected by whether Safe Mode is turned On or Off. disable_functions = Ähnlich zu highlight; Colors for Syntax Highlighting mode. Anything that's acceptable in ; <font color="??????"> would work. highlight.string = #CC0000 highlight.comment = #FF9900 highlight.keyword = #006600 highlight.bg = #FFFFFF highlight.default = #0000CC highlight.html = #000000 Mit den Funktionen expose_php
; ; Misc ; ; Decides whether PHP may expose the fact that it is installed on the server ; (e.g. by adding its signature to the Web server header). It is no security ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. expose_php = On Die letzte Einstellung in diesem Abschnitt besagt lediglich, ob PHP sich outen darf. Wenn ja, dann zeigt der Apache beispielsweise auf seiner Standard-Fehlerseite die Server-Signatur inklusive PHP an (wenn in der httpd.conf |
||||||||||||
|
URL: www.intermitto.net/php/konfig/language/ |
Home - Kontaktformular - Downloads - Suche und Sitemap - Impressum |
||||||||||||