File: commandline.xml

package info (click to toggle)
php-doc 20081024-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 57,752 kB
  • ctags: 3,858
  • sloc: xml: 686,554; php: 19,446; perl: 610; cpp: 500; makefile: 336; sh: 114; awk: 28
file content (74 lines) | stat: -rw-r--r-- 3,131 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
  <sect1 xml:id="install.unix.commandline" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
   <title>CGI and command line setups</title>
   <para>
    The default is to build PHP as a CGI program.  This creates a
    command line interpreter, which can be used for CGI processing, or
    for non-web-related PHP scripting.  If you are running a web
    server PHP has module support for, you should generally go for
    that solution for performance reasons.  However, the CGI version
    enables users to run different PHP-enabled pages under
    different user-ids.
   </para>
   &warn.install.cgi;
   <para>
    As of PHP 4.3.0, some important additions have happened to PHP.  A new
    SAPI named CLI also exists and it has the same name as the CGI binary.
    What is installed at <literal>{PREFIX}/bin/php</literal> depends on your
    configure line and this is described in detail in the manual section
    named <link linkend="features.commandline">Using PHP from the command
    line</link>. For further details please read that section of the manual.
   </para>
   
   <sect2 xml:id="install.unix.commandline.testing">
    <title>Testing</title>
    <simpara>
     If you have built PHP as a CGI program, you may test your build
     by typing <command>make test</command>.  It is always a good idea
     to test your build.  This way you may catch a problem with PHP on
     your platform early instead of having to struggle with it later.
    </simpara>
   </sect2>

   <sect2 xml:id="install.unix.commandline.using-variables">
    <title>Using Variables</title>
    <simpara>
      Some <link linkend="reserved.variables.server">server supplied
      environment variables</link> are not defined in the 
      current <link xlink:href="&url.cgispec;">CGI/1.1 specification</link>.
      Only the following variables are defined there: <varname>AUTH_TYPE</varname>, 
      <varname>CONTENT_LENGTH</varname>, <varname>CONTENT_TYPE</varname>,
      <varname>GATEWAY_INTERFACE</varname>, <varname>PATH_INFO</varname>, 
      <varname>PATH_TRANSLATED</varname>, <varname>QUERY_STRING</varname>,
      <varname>REMOTE_ADDR</varname>, <varname>REMOTE_HOST</varname>, 
      <varname>REMOTE_IDENT</varname>, <varname>REMOTE_USER</varname>,
      <varname>REQUEST_METHOD</varname>, <varname>SCRIPT_NAME</varname>, 
      <varname>SERVER_NAME</varname>, <varname>SERVER_PORT</varname>,
      <varname>SERVER_PROTOCOL</varname>, and <varname>SERVER_SOFTWARE</varname>.
      Everything else should be treated as 'vendor extensions'.
    </simpara>
   </sect2>
   
  </sect1>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->