I. Apache serwer

Wprowadzenie

Poniższe funkcje dostępne są jedynie wówczas, kiedy PHP pracuje jako moduł serwera Apache w wersji 1.x.

Instalacja

Instalacja modułu PHP dla serwera Apache 1.x opisana jest w rozdziale instalacja, w sekcji poświęconej serwerowi Apache.

Konfiguracja startowa

The behaviour of the Apache PHP module is affected by settings in php.ini. Configuration settings from php.ini may be overridden by php_flag settings in the server configuration file or local .htaccess files.

Przykład 1. Turning off PHP parsing for a directory using .htaccess

php_flag engine off

Tabela 1. Apache configuration options

NameDefaultChangeableFunction
engineOnPHP_INI_ALLturns PHP parsing on or off
child_terminateOffPHP_INI_ALL specify whether PHP scripts may request child process termination on end of request, see also apache_child_terminate()
last_modifiedOffPHP_INI_ALLsend PHP scripts modification date as Last-Modified: header for this request
xbithackOffPHP_INI_ALLparse files with executable bit set as PHP regardless of their file ending

Oto krótkie wyjaśnienie dyrektyw konfiguracji.

engine boolean

This directive is really only useful in the Apache module version of PHP. It is used by sites that would like to turn PHP parsing on and off on a per-directory or per-virtual server basis. By putting engine off in the appropriate places in the httpd.conf file, PHP can be enabled or disabled.

Typy zasobów

To rozszerzenie nie posiada żadnych rodzajów zasobów.

Predefiniowane stałe

To rozszerzenie nie posiada żadnych stałych.

Spis treści
apache_child_terminate -- Zakańcza proces Apache'a po zakończeniu tego zapytania
apache_get_modules --  Get a list of loaded Apache modules
apache_get_version --  Fetch Apache version
apache_getenv --  Get an Apache subprocess_env variable
apache_lookup_uri --  Wywołuje wewnętrzne żądanie dla określonego URI i zwraca całą informację o nim
apache_note -- Pobiera lub ustawia noty odpowiedzi Apache'a
apache_request_headers -- Fetch all HTTP request headers
apache_response_headers --  Pobiera wszystkie nagłówki HTTP odpowiedzi serwera
apache_setenv -- Ustawia zmienną Apache'a subprocess_env
ascii2ebcdic -- Konwertuje łańcuch znaków z ASCII do EBCDIC
ebcdic2ascii -- Kownersja łańcucha znaków z EBCDIC do ASCII
getallheaders --  Odczytuje wszystkie nagłówki HTTP z aktualnego zapytania
virtual -- Wykonuje zapytanie do Apache'a