|
7 | 7 | This file is generated from xml source: DO NOT EDIT |
8 | 8 | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
9 | 9 | --> |
10 | | -<title>Environment Variables in Apache - Apache HTTP Server Version 2.5</title> |
| 10 | +<title>Environment Variables in Apache httpd - Apache HTTP Server Version 2.5</title> |
11 | 11 | <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> |
12 | 12 | <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> |
13 | 13 | <link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> |
|
21 | 21 | <img alt="" src="./images/feather.png" /></div> |
22 | 22 | <div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> |
23 | 23 | <div id="path"> |
24 | | -<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="./">Version 2.5</a></div><div id="page-content"><div id="preamble"><h1>Environment Variables in Apache</h1> |
| 24 | +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="./">Version 2.5</a></div><div id="page-content"><div id="preamble"><h1>Environment Variables in Apache httpd</h1> |
25 | 25 | <div class="toplang"> |
26 | 26 | <p><span>Available Languages: </span><a href="./en/env.html" title="English"> en </a> | |
27 | 27 | <a href="./fr/env.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | |
|
51 | 51 | variables</em>, they are not the same as the environment |
52 | 52 | variables controlled by the underlying operating system. |
53 | 53 | Instead, these variables are stored and manipulated in an |
54 | | - internal Apache structure. They only become actual operating |
| 54 | + internal httpd structure. They only become actual operating |
55 | 55 | system environment variables when they are provided to CGI |
56 | 56 | scripts and Server Side Include scripts. If you wish to |
57 | 57 | manipulate the operating system environment under which the |
|
61 | 61 | </div> |
62 | 62 | <div id="quickview"><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#setting">Setting Environment Variables</a></li> |
63 | 63 | <li><img alt="" src="./images/down.gif" /> <a href="#using">Using Environment Variables</a></li> |
| 64 | +<li><img alt="" src="./images/down.gif" /> <a href="#cgi">CGI environment variables</a></li> |
64 | 65 | <li><img alt="" src="./images/down.gif" /> <a href="#special">Special Purpose Environment Variables</a></li> |
65 | 66 | <li><img alt="" src="./images/down.gif" /> <a href="#examples">Examples</a></li> |
66 | 67 | </ul><h3>See also</h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> |
|
251 | 252 |
|
252 | 253 | </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> |
253 | 254 | <div class="section"> |
| 255 | +<h2><a name="cgi" id="cgi">CGI environment variables</a> <a title="Permanent link" href="#cgi" class="permalink">¶</a></h2> |
| 256 | + |
| 257 | + |
| 258 | + <p>The <a href="https://datatracker.ietf.org/doc/html/rfc3875#section-4.1">CGI specification</a> defines a number of environment |
| 259 | + variables that expand on those defined by the HTTP spec. |
| 260 | + These have been adopted more broadly, and are a standard |
| 261 | + part of passing information between the browser and the |
| 262 | + server, and between processes on the server side. Here we |
| 263 | + discuss a few of these. Refer to the CGI spec for further |
| 264 | + details.</p> |
| 265 | + |
| 266 | + <h3><a name="query-string" id="query-string">QUERY_STRING</a></h3> |
| 267 | + |
| 268 | + <p>The <code>QUERY_STRING</code> variable is set to |
| 269 | + anything that appears after a question mark (?) at the |
| 270 | + end of a requested URL. This is used to pass |
| 271 | + information to the server, and may be divided into |
| 272 | + key/value pairs. The string should be |
| 273 | + URL-encoded.</p> |
| 274 | + |
| 275 | + <div class="example"><p><code> |
| 276 | + https://example.com/path/resource.php?key1=value1&key2=another%20value |
| 277 | + </code></p></div> |
| 278 | + |
| 279 | + <p>In the example here, the variable |
| 280 | + <code>QUERY_STRING</code> is set to everything |
| 281 | + following the ?, and the receiving application (e.g. |
| 282 | + CGI or a PHP script, perhaps) is responsible for |
| 283 | + parsing the key/value pairs.</p> |
| 284 | + |
| 285 | + |
| 286 | + |
| 287 | + |
| 288 | + <h3><a name="path-info" id="path-info">PATH_INFO</a></h3> |
| 289 | + |
| 290 | + |
| 291 | + <p>The variable <code>PATH_INFO</code> is set to |
| 292 | + the any value that appears after a matches resource |
| 293 | + at the end of the URL, not including any |
| 294 | + <code>QUERY_STRING</code>. This is best shown by |
| 295 | + an example:</p> |
| 296 | + |
| 297 | + <div class="example"><p><code> |
| 298 | + https://example.com/resource.php/additional/data?key1=value1 |
| 299 | + </code></p></div> |
| 300 | + |
| 301 | + <p>In the example shown, |
| 302 | + <code>PATH_INFO</code> will be set to |
| 303 | + <code>/additional/data</code> and |
| 304 | + <code>QUERY_STRING</code> will be set to |
| 305 | + <code>key1=value1</code>.</p> |
| 306 | + |
| 307 | + |
| 308 | + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> |
| 309 | +<div class="section"> |
254 | 310 | <h2><a name="special" id="special">Special Purpose Environment Variables</a> <a title="Permanent link" href="#special" class="permalink">¶</a></h2> |
255 | 311 |
|
256 | 312 |
|
|
0 commit comments