= PHP_4_0_5, PHP_5, PHP_7, PHP_8 // apache_get_modules() - PHP_4 >= PHP_4_3_2, PHP_5, PHP_7, PHP_8 // apache_get_version() - PHP_4 >= PHP_4_3_2, PHP_5, PHP_7, PHP_8 // apache_getenv() - PHP_4 >= PHP_4_3_0, PHP_5, PHP_7, PHP_8 // apache_lookup_uri() - PHP_4, PHP_5, PHP_7, PHP_8 // apache_note() - PHP_4, PHP_5, PHP_7, PHP_8 // apache_request_headers() - PHP_4 >= PHP_4_3_0, PHP_5, PHP_7, PHP_8 // apache_response_headers() - PHP_4 >= PHP_4_3_0, PHP_5, PHP_7, PHP_8 // apache_setenv() - PHP_4 >= PHP_4_2_0, PHP_5, PHP_7, PHP_8 // getallheaders() - PHP_4, PHP_5, PHP_7, PHP_8 // virtual() - PHP_4, PHP_5, PHP_7, PHP_8 // ============================== USING CLASSES (0) // ============================== USING DATA_TYPES (6) // void // array // string // false // bool // object // ============================== END // REQUIREMENTS // ============================== // ============================== BEGIN // PHP_SERVER_APACHE // ============================== ABOUT // PHP Manual / Function Reference / Server Specific Extensions / Apache // URL: https://www.php.net/manual/en/book.apache.php // ============================== DESCRIPTION // APACHE // // APACHE - BEGIN // Apache // // INTRODUCTION // INSTALLING_CONFIGURING // PREDEFINED_CONSTANTS // APACHE_FUNCTIONS // // INTRODUCTION - BEGIN // Introduction // // These functions are only available when running PHP as an Apache module. // // LITERATURE_SOURCES // * PHP_NET (2023-09-08) // URL: https://www.php.net/manual/en/intro.apache.php // INTRODUCTION - END // // INSTALLING_CONFIGURING - BEGIN // Installing/Configuring // // REQUIREMENTS // INSTALLATION // RUNTIME_CONFIGURATION // RESOURCE_TYPES // // REQUIREMENTS - BEGIN // Requirements // // No external libraries are needed to build this extension. // // LITERATURE_SOURCES // * PHP_NET (2023-09-08) // URL: https://www.php.net/manual/en/apache.requirements.php // REQUIREMENTS - END // // INSTALLATION - BEGIN // Installation // // For PHP installation on Apache see the installation chapter. // // LITERATURE_SOURCES // * PHP_NET (2023-09-08) // URL: https://www.php.net/manual/en/apache.installation.php // INSTALLATION - END // // RUNTIME_CONFIGURATION - BEGIN // Runtime Configuration // // 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. // // [example] // Example #1 Turning off PHP parsing for a directory using .htaccess // [code] // php_flag engine off // [/code] // [/example] // // Apache configuration options // Name | Default | Changeable | Changelog // engine | "1" | PHP_INI_ALL | // child_terminate | "0" | PHP_INI_ALL | // last_modified | "0" | PHP_INI_ALL | // xbithack | "0" | PHP_INI_ALL | // // For further details and definitions of the PHP_INI_* modes, see the Where a configuration setting may be set. // Here's a short explanation of the configuration directives. // // engine bool - Turns PHP parsing on or off. 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. // child_terminate bool - Specify whether PHP scripts may request child process termination on end of request, see also apache_child_terminate(). // last_modified bool - Send PHP scripts modification date as Last-Modified: header for this request. // xbithack bool - Parse files with executable bit set as PHP regardless of their file ending. // // LITERATURE_SOURCES // * PHP_NET (2023-09-08) // URL: https://www.php.net/manual/en/apache.configuration.php // RUNTIME_CONFIGURATION - END // // RESOURCE_TYPES - BEGIN // Resource Types // // This extension has no resource types defined. // // LITERATURE_SOURCES // * PHP_NET (2023-09-08) // URL: https://www.php.net/manual/en/apache.resources.php // RESOURCE_TYPES - END // // LITERATURE_SOURCES // * PHP_NET (2023-09-08) // URL: https://www.php.net/manual/en/apache.setup.php // INSTALLING_CONFIGURING - END // // PREDEFINED_CONSTANTS - BEGIN // Predefined Constants // // This extension has no constants defined. // // LITERATURE_SOURCES // * PHP_NET (2023-09-08) // URL: https://www.php.net/manual/en/apache.constants.php // PREDEFINED_CONSTANTS - END // // APACHE_FUNCTIONS - BEGIN // Apache Functions // // Table of Contents // * apache_child_terminate - Terminate apache process after this request // * 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 - Perform a partial request for the specified URI and return all info about it // * apache_note - Get and set apache request notes // * apache_request_headers - Fetch all HTTP request headers // * apache_response_headers - Fetch all HTTP response headers // * apache_setenv - Set an Apache subprocess_env variable // * getallheaders - Fetch all HTTP request headers // * virtual - Perform an Apache sub-request // // LITERATURE_SOURCES // * PHP_NET (2023-09-08) // URL: https://www.php.net/manual/en/ref.apache.php // APACHE_FUNCTIONS - END // // LITERATURE_SOURCES // * PHP_NET (2023-09-08) // URL: https://www.php.net/manual/en/book.apache.php // APACHE - END // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_APACHE_CHILD_TERMINATE // ============================== PUBLIC // ============================== ABOUT // Terminate apache process after this request. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // apache_child_terminate() - PHP_4 >= PHP_4_0_5, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_apache_child_terminate() { // ========== APACHE_CHILD_TERMINATE - BEGIN // ===== ABOUT // Terminate apache process after this request // ===== DESCRIPTION // apache_child_terminate() will register the Apache process executing the current PHP request for termination once execution of PHP code is completed. It may be used to terminate a process after a script with high memory consumption has been run as memory will usually only be freed internally but not given back to the operating system. // Works in the Apache, and FastCGI webservers. // ===== SUPPORTED // PHP_4 >= PHP_4_0_5, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // apache_child_terminate(): void // ===== CODE apache_child_terminate( // This function has no parameters. ); // Return Values // No value is returned. // // Notes // Note: This function is not implemented on Windows platforms. // ===== LITERATURE_SOURCES // * PHP_NET (2023-09-22) // URL: https://www.php.net/manual/en/function.apache-child-terminate.php // ========== APACHE_CHILD_TERMINATE - END // SYNTAX: // void apache_child_terminate() // Return: void } // ============================== END // PHP_SERVER_APACHE_APACHE_CHILD_TERMINATE // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_APACHE_GET_MODULES // ============================== PUBLIC // ============================== ABOUT // Get a list of loaded Apache modules. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // apache_get_modules() - PHP_4 >= PHP_4_3_2, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_apache_get_modules() { $return_apache_get_modules = null; // ========== APACHE_GET_MODULES - BEGIN // ===== ABOUT // Get a list of loaded Apache modules // ===== DESCRIPTION // Get a list of loaded Apache modules. // ===== SUPPORTED // PHP_4 >= PHP_4_3_2, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // apache_get_modules(): array // ===== CODE $return_apache_get_modules = apache_get_modules( // This function has no parameters. ); // Return Values // An array of loaded Apache modules. // // [examples] // Examples // [example] // Example #1 apache_get_modules() example // [php] // print_r(apache_get_modules()); // [/php] // The above example will output something similar to: // [result] // Array // ( // [0] => core // [1] => http_core // [2] => mod_so // [3] => sapi_apache2 // [4] => mod_mime // [5] => mod_rewrite // ) // [/result] // [/example] // [/examples] // ===== LITERATURE_SOURCES // * PHP_NET (2024-01-14) // URL: https://www.php.net/manual/en/function.apache-get-modules.php // ========== APACHE_GET_MODULES - END // SYNTAX: // array apache_get_modules() return $return_apache_get_modules; // array } // ============================== END // PHP_SERVER_APACHE_APACHE_GET_MODULES // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_APACHE_GET_VERSION // ============================== PUBLIC // ============================== ABOUT // Fetch Apache version. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // apache_get_version() - PHP_4 >= PHP_4_3_2, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_apache_get_version() { $return_apache_get_version = false; // ========== APACHE_GET_VERSION - BEGIN // ===== ABOUT // Fetch Apache version // ===== DESCRIPTION // Fetch the Apache version. // ===== SUPPORTED // PHP_4 >= PHP_4_3_2, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // apache_get_version(): string|false // ===== CODE $return_apache_get_version = apache_get_version( // This function has no parameters. ); // Return Values // Returns the Apache version on success or false on failure. // // [examples] // Examples // [example] // Example #1 apache_get_version() example // [php] // $version = apache_get_version(); // echo "$version\n"; // [/php] // The above example will output something similar to: // [result] // Apache/1.3.29 (Unix) PHP/4.3.4 // [/result] // [/example] // [/examples] // ===== LITERATURE_SOURCES // * PHP_NET (2024-01-14) // URL: https://www.php.net/manual/en/function.apache-get-version.php // ========== APACHE_GET_VERSION - END // SYNTAX: // string|false apache_get_version() return $return_apache_get_version; // string|false } // ============================== END // PHP_SERVER_APACHE_APACHE_GET_VERSION // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_APACHE_GETENV // ============================== PUBLIC // ============================== ABOUT // Get an Apache subprocess_env variable. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // apache_getenv() - PHP_4 >= PHP_4_3_0, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_apache_getenv($variable, $walk_to_top = false) { $return_apache_getenv = false; // ========== APACHE_GETENV - BEGIN // ===== ABOUT // Get an Apache subprocess_env variable // ===== DESCRIPTION // Retrieve an Apache environment variable specified by variable. // ===== SUPPORTED // PHP_4 >= PHP_4_3_0, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // apache_getenv(string $variable, bool $walk_to_top = false): string|false // ===== CODE $return_apache_getenv = apache_getenv( $variable, // string variable - The Apache environment variable $walk_to_top // bool walk_to_top - Whether to get the top-level variable available to all Apache layers. ); // Return Values // The value of the Apache environment variable on success, or false on failure // // [examples] // Examples // [example] // Example #1 apache_getenv() example // The example above shows how to retrieve the value of the Apache environment variable SERVER_ADDR. // [php] // $ret = apache_getenv("SERVER_ADDR"); // echo $ret; // [/php] // The above example will output something similar to: // [result] // 42.24.42.240 // [/result] // [/example] // [/examples] // ===== LITERATURE_SOURCES // * PHP_NET (2024-01-14) // URL: https://www.php.net/manual/en/function.apache-getenv.php // ========== APACHE_GETENV - END // SYNTAX: // string|false apache_getenv(string $variable, bool $walk_to_top = false) return $return_apache_getenv; // string|false } // ============================== END // PHP_SERVER_APACHE_APACHE_GETENV // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_APACHE_LOOKUP_URI // ============================== PUBLIC // ============================== ABOUT // Perform a partial request for the specified URI and return all info about it. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // apache_lookup_uri() - PHP_4, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_apache_lookup_uri($filename) { $return_apache_lookup_uri = false; // ========== APACHE_LOOKUP_URI - BEGIN // ===== ABOUT // Perform a partial request for the specified URI and return all info about it // ===== DESCRIPTION // This performs a partial request for a URI. It goes just far enough to obtain all the important information about the given resource. // This function is supported when PHP is installed as an Apache module webserver. // ===== SUPPORTED // PHP_4, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // apache_lookup_uri(string $filename): object|false // ===== CODE $return_apache_lookup_uri = apache_lookup_uri( $filename // string filename - The filename (URI) that's being requested. ); // Return Values // An object of related URI information. The properties of this object are: // * status // * the_request // * status_line // * method // * content_type // * handler // * uri // * filename // * path_info // * args // * boundary // * no_cache // * no_local_copy // * allowed // * send_bodyct // * bytes_sent // * byterange // * clength // * unparsed_uri // * mtime // * request_time // Returns false on failure. // // [examples] // Examples // [example] // Example #1 apache_lookup_uri() example // [php] // $info = apache_lookup_uri('index.php?var=value'); // print_r($info); // // if (file_exists($info->filename)) { // echo 'file exists!'; // } // [/php] // The above example will output something similar to: // [result] // stdClass Object // ( // [status] => 200 // [the_request] => GET /dir/file.php HTTP/1.1 // [method] => GET // [mtime] => 0 // [clength] => 0 // [chunked] => 0 // [content_type] => application/x-httpd-php // [no_cache] => 0 // [no_local_copy] => 1 // [unparsed_uri] => /dir/index.php?var=value // [uri] => /dir/index.php // [filename] => /home/htdocs/dir/index.php // [args] => var=value // [allowed] => 0 // [sent_bodyct] => 0 // [bytes_sent] => 0 // [request_time] => 1074282764 // ) // file exists! // [/result] // [/example] // [/examples] // ===== LITERATURE_SOURCES // * PHP_NET (2024-01-14) // URL: https://www.php.net/manual/en/function.apache-lookup-uri.php // ========== APACHE_LOOKUP_URI - END // SYNTAX: // object|false apache_lookup_uri(string $filename) return $return_apache_lookup_uri; // object|false } // ============================== END // PHP_SERVER_APACHE_APACHE_LOOKUP_URI // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_APACHE_NOTE // ============================== PUBLIC // ============================== ABOUT // Get and set apache request notes. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // apache_note() - PHP_4, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_apache_note($note_name, $note_value = null) { $return_apache_note = false; // ========== APACHE_NOTE - BEGIN // ===== ABOUT // Get and set apache request notes // ===== DESCRIPTION // This function is a wrapper for Apache's table_get and table_set. It edits the table of notes that exists during a request. The table's purpose is to allow Apache modules to communicate. // The main use for apache_note() is to pass information from one module to another within the same request. // ===== SUPPORTED // PHP_4, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // apache_note(string $note_name, ?string $note_value = null): string|false // ===== CODE $return_apache_note = apache_note( $note_name, // string note_name - The name of the note. $note_value // string note_value - The value of the note. ); // Return Values // If note_value is omitted or null, it returns the current value of note note_name. Otherwise, it sets the value of note note_name to note_value and returns the previous value of note note_name. If the note cannot be retrieved, false is returned. // // Changelog // Version - Description // 8.0.0 - note_value is nullable now. // // [examples] // Examples // [example] // Example #1 Passing information between PHP and Perl // [php] // // apache_note('name', 'Fredrik Ekengren'); // // // Call perl script // virtual("/perl/some_script.pl"); // // $result = apache_note("resultdata"); // [/php] // [code] // # Get Apache request object // my $r = Apache->request()->main(); // // # Get passed data // my $name = $r->notes('name'); // // # some processing // // # Pass result back to PHP // $r->notes('resultdata', $result); // [/code] // [/example] // [example] // Example #2 Logging values in access.log // [php] // // apache_note('sessionID', session_id()); // // [/php] // [code] // # "%{sessionID}n" can be used in the LogFormat directive // [/code] // [/example] // [/examples] // ===== LITERATURE_SOURCES // * PHP_NET (2024-01-14) // URL: https://www.php.net/manual/en/function.apache-note.php // ========== APACHE_NOTE - END // SYNTAX: // string|false apache_note(string $note_name, string $note_value = null) return $return_apache_note; // string|false } // ============================== END // PHP_SERVER_APACHE_APACHE_NOTE // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_APACHE_REQUEST_HEADERS // ============================== PUBLIC // ============================== ABOUT // Fetch all HTTP request headers. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // apache_request_headers() - PHP_4 >= PHP_4_3_0, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_apache_request_headers() { $return_apache_request_headers = null; // ========== APACHE_REQUEST_HEADERS - BEGIN // ===== ABOUT // Fetch all HTTP request headers // ===== DESCRIPTION // Fetches all HTTP request headers from the current request. Works in the Apache, FastCGI, CLI, and FPM webservers. // ===== SUPPORTED // PHP_4 >= PHP_4_3_0, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // apache_request_headers(): array // ===== CODE $return_apache_request_headers = apache_request_headers( // This function has no parameters. ); // Return Values // An associative array of all the HTTP headers in the current request, or false on failure. // // Changelog // Version - Description // 7.3.0 - This function became available in the FPM SAPI. // // [examples] // Examples // [example] // Example #1 apache_request_headers() example // [php] // $headers = apache_request_headers(); // // foreach ($headers as $header => $value) { // echo "$header: $value
\n"; // } // [/php] // The above example will output something similar to: // [result] // Accept: */* // Accept-Language: en-us // Accept-Encoding: gzip, deflate // User-Agent: Mozilla/4.0 // Host: www.example.com // Connection: Keep-Alive // [/result] // [/example] // [/examples] // // Notes // Note: You can also get at the value of the common CGI variables by reading them from the environment, which works whether or not you are using PHP as an Apache module. Use phpinfo() to see a list of all of the available environment variables. // ===== LITERATURE_SOURCES // * PHP_NET (2024-01-14) // URL: https://www.php.net/manual/en/function.apache-request-headers.php // ========== APACHE_REQUEST_HEADERS - END // SYNTAX: // array apache_request_headers() return $return_apache_request_headers; // array } // ============================== END // PHP_SERVER_APACHE_APACHE_REQUEST_HEADERS // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_APACHE_RESPONSE_HEADERS // ============================== PUBLIC // ============================== ABOUT // Fetch all HTTP response headers. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // apache_response_headers() - PHP_4 >= PHP_4_3_0, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_apache_response_headers() { $return_apache_response_headers = false; // ========== APACHE_RESPONSE_HEADERS - BEGIN // ===== ABOUT // Fetch all HTTP response headers // ===== DESCRIPTION // Fetch all HTTP response headers. Works in the Apache, FastCGI, CLI, and FPM webservers. // ===== SUPPORTED // PHP_4 >= PHP_4_3_0, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // apache_response_headers(): array|false // ===== CODE $return_apache_response_headers = apache_response_headers( // This function has no parameters. ); // Return Values // An array of all Apache response headers on success or false on failure. // // [examples] // Examples // [example] // Example #1 apache_response_headers() example // [php] // print_r(apache_response_headers()); // [/php] // The above example will output something similar to: // [result] // Array // ( // [Accept-Ranges] => bytes // [X-Powered-By] => PHP/4.3.8 // ) // [/result] // [/example] // [/examples] // ===== LITERATURE_SOURCES // * PHP_NET (2024-01-14) // URL: https://www.php.net/manual/en/function.apache-response-headers.php // ========== APACHE_RESPONSE_HEADERS - END // SYNTAX: // array|false apache_response_headers() return $return_apache_response_headers; // array|false } // ============================== END // PHP_SERVER_APACHE_APACHE_RESPONSE_HEADERS // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_APACHE_SETENV // ============================== PUBLIC // ============================== ABOUT // Set an Apache subprocess_env variable. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // apache_setenv() - PHP_4 >= PHP_4_2_0, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_apache_setenv($variable, $value, $walk_to_top = false) { $return_apache_setenv = false; // ========== APACHE_SETENV - BEGIN // ===== ABOUT // Set an Apache subprocess_env variable // ===== DESCRIPTION // apache_setenv() sets the value of the Apache environment variable specified by variable. // Note: When setting an Apache environment variable, the corresponding $_SERVER variable is not changed. // ===== SUPPORTED // PHP_4 >= PHP_4_2_0, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // apache_setenv(string $variable, string $value, bool $walk_to_top = false): bool // ===== CODE $return_apache_setenv = apache_setenv( $variable, // string variable - The environment variable that's being set. $value, // string value - The new variable value. $walk_to_top // bool walk_to_top - Whether to set the top-level variable available to all Apache layers. ); // Return Values // Returns true on success or false on failure. // // [examples] // Examples // [example] // Example #1 Setting an Apache environment variable using apache_setenv() // [php] // apache_setenv("EXAMPLE_VAR", "Example Value"); // [/php] // [/example] // [/examples] // // Notes // Note: apache_setenv() can be paired up with apache_getenv() across separate pages or for setting variables to pass to Server Side Includes (.shtml) that have been included in PHP scripts. // ===== LITERATURE_SOURCES // * PHP_NET (2024-01-14) // URL: https://www.php.net/manual/en/function.apache-setenv.php // ========== APACHE_SETENV - END // SYNTAX: // bool apache_setenv(string $variable, string $value, bool $walk_to_top = false) return $return_apache_setenv; // bool } // ============================== END // PHP_SERVER_APACHE_APACHE_SETENV // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_GETALLHEADERS // ============================== PUBLIC // ============================== ABOUT // Fetch all HTTP request headers. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // getallheaders() - PHP_4, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_getallheaders() { $return_getallheaders = null; // ========== GETALLHEADERS - BEGIN // ===== ABOUT // Fetch all HTTP request headers // ===== DESCRIPTION // Fetches all HTTP headers from the current request. // This function is an alias for apache_request_headers(). Please read the apache_request_headers() documentation for more information on how this function works. // ===== SUPPORTED // PHP_4, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // getallheaders(): array // ===== CODE $return_getallheaders = getallheaders( // This function has no parameters. ); // Return Values // An associative array of all the HTTP headers in the current request, or false on failure. // // Changelog // Version - Description // 7.3.0 - This function became available in the FPM SAPI. // // [examples] // Examples // [example] // Example #1 getallheaders() example // [php] // // foreach (getallheaders() as $name => $value) { // echo "$name: $value\n"; // } // // [/php] // [/example] // [/examples] // ===== LITERATURE_SOURCES // * PHP_NET (2024-01-14) // URL: https://www.php.net/manual/en/function.getallheaders.php // ========== GETALLHEADERS - END // SYNTAX: // array getallheaders() return $return_getallheaders; // array } // ============================== END // PHP_SERVER_APACHE_GETALLHEADERS // ============================== // ============================== BEGIN // PHP_SERVER_APACHE_VIRTUAL // ============================== PUBLIC // ============================== ABOUT // Perform an Apache sub-request. // ============================== SUPPORT // PHP_4 - PHP_8 // ============================== USING FUNCTIONS (1) // virtual() - PHP_4, PHP_5, PHP_7, PHP_8 // ============================== CODE function php_server_apache_virtual($uri) { $return_virtual = false; // ========== VIRTUAL - BEGIN // ===== ABOUT // Perform an Apache sub-request // ===== DESCRIPTION // virtual() is an Apache-specific function which is similar to in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. At the minimum that means it must generate a Content-Type header. // To run the sub-request, all buffers are terminated and flushed to the browser, pending headers are sent too. // This function is supported when PHP is installed as an Apache module webserver. // ===== SUPPORTED // PHP_4, PHP_5, PHP_7, PHP_8 // ===== SYNTAX // virtual(string $uri): bool // ===== CODE $return_virtual = virtual( $uri // string uri - The file that the virtual command will be performed on. ); // Return Values // Performs the virtual command on success, or returns false on failure. // // [examples] // Examples // See apache_note() for an example. // [/examples] // // Notes // Warning: The query string can be passed to the included file but $_GET is copied from the parent script and only $_SERVER['QUERY_STRING'] is filled with the passed query string. The query string may only be passed when using Apache 2. The requested file will not be listed in the Apache access log. // Note: Environment variables set in the requested file are not visible to the calling script. // Note: This function may be used on PHP files. However, it is typically better to use include or require for PHP files. // ===== LITERATURE_SOURCES // * PHP_NET (2024-01-14) // URL: https://www.php.net/manual/en/function.virtual.php // ========== VIRTUAL - END // SYNTAX: // bool virtual(string $uri) return $return_virtual; // bool } // ============================== END // PHP_SERVER_APACHE_VIRTUAL // ============================== // ============================== END // PHP_SERVER_APACHE // ============================== ?>