php-doc-en/install/unix/commandline.xml
Nuno Lopes 8abd96e10d fix entity name. thanks Goba
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@165682 c90b9560-bf6c-de11-be94-00142212c4b1
2004-08-07 19:18:25 +00:00

95 lines
3.8 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<sect1 id="install.unix.commandline">
<title>CGI and commandline setups</title>
<para>
The default is to build PHP as a CGI program. This creates a
commandline 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 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 id="install.unix.commandline.benchmarking">
<title>Benchmarking</title>
<simpara>
If you have built PHP 3 as a CGI program, you may benchmark your
build by typing <command>make bench</command>. Note that if
&safemode; is on by default, the benchmark may not be able to finish if
it takes longer then the 30 seconds allowed. This is because the
<function>set_time_limit</function> can not be used in
&safemode;. Use the <link
linkend="ini.max-execution-time">max_execution_time</link>
configuration setting to control this time for your own
scripts. <command>make bench</command> ignores the <link
linkend="configuration.file">configuration file</link>.
</simpara>
<note>
<simpara>
<command>make bench</command> is only available for PHP 3.
</simpara>
</note>
</sect2>
<sect2 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 <ulink url="&url.cgispec;">CGI/1.1 specification</ulink>.
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
-->