Date: 08/22/00
- Next message: Christian Ullrich: "[PHP-DOC] cvs: phpdoc /de bookinfo.xml"
- Previous message: Uwe Steinmann: "[PHP-DOC] cvs: phpdoc /de/functions fdf.xml /en/functions fdf.xml"
- Next in thread: Jesus Castagnetto: "Re: [PHP-DOC] cvs: phpdoc /es/chapters install.xml /es/functions ifx.xml nis.xml pgsql.xml /es/language control-structures.xml references.xml types.xml"
- Maybe reply: Jesus Castagnetto: "Re: [PHP-DOC] cvs: phpdoc /es/chapters install.xml /es/functions ifx.xml nis.xml pgsql.xml /es/language control-structures.xml references.xml types.xml"
- Reply: Rafael Martinez: "[PHP-DOC] Spanish translation is a mess ...."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
rasmus Tue Aug 22 08:18:07 2000 EDT
Added files:
/phpdoc/es/chapters install.xml
/phpdoc/es/language references.xml
Modified files:
/phpdoc/es/functions ifx.xml nis.xml pgsql.xml
/phpdoc/es/language control-structures.xml types.xml
Log:
Oh man, this Spanish translation is a mess. Could someone with some
time on their hands and a decent XML authoring setup please go through
this?
Index: phpdoc/es/functions/ifx.xml
diff -u phpdoc/es/functions/ifx.xml:1.1.1.1 phpdoc/es/functions/ifx.xml:1.2
--- phpdoc/es/functions/ifx.xml:1.1.1.1 Mon Aug 21 04:31:12 2000
+++ phpdoc/es/functions/ifx.xml Tue Aug 22 08:18:06 2000
@@ -188,6 +188,7 @@
<para>
Devuelve un identificador positivo de enlace persistente si hubo conexión,
o false si se produjo un error.
+ </para>
<para>
<function>ifx_pconnect</function> actúa muy parecido a
<function>ifx_connect</function> con dos principales diferencias.</para>
Index: phpdoc/es/functions/nis.xml
diff -u phpdoc/es/functions/nis.xml:1.2 phpdoc/es/functions/nis.xml:1.3
--- phpdoc/es/functions/nis.xml:1.2 Tue Aug 22 02:23:46 2000
+++ phpdoc/es/functions/nis.xml Tue Aug 22 08:18:06 2000
@@ -95,7 +95,6 @@
<para>Ver tambien:
<link linkend="funcion.yp-get-default-domain">yp get_default_domain</link>
<link linkend="funtion.yp-errno">yp_errno</link>
- y
<link linkend="funcion.yp-err-string">yp_err_string</link>
</para>
</refsect1>
@@ -183,7 +182,7 @@
if(!$ entry){echo yp_errno().":".yp_err_string();}
echo "La entrada pareada es:".$ entry;?>
</programlisting>
- <example>
+ </example>
</para>
<para>
En este caso esto puede ser:
@@ -235,7 +234,7 @@
$key=key($entry);
echo"Primera entrada en este mapa fue ".$key ."Y valor".$entry[$key];?>
</programlisting>
- <example>
+ </example>
</para>
<para>
Ver tambien:
@@ -287,7 +286,7 @@
if(!$entry){echo yp_errno().":".yp_err_string();}
$key=key($entry); echo "La siguiente entrada despues joe fue".$key."Y su valor".$entry[$key];?>
</programlisting>
-<example>
+</example>
</para>
<para>
Ver tambien:
Index: phpdoc/es/functions/pgsql.xml
diff -u phpdoc/es/functions/pgsql.xml:1.1.1.1 phpdoc/es/functions/pgsql.xml:1.2
--- phpdoc/es/functions/pgsql.xml:1.1.1.1 Mon Aug 21 04:31:12 2000
+++ phpdoc/es/functions/pgsql.xml Tue Aug 22 08:18:06 2000
@@ -198,7 +198,7 @@
Devuelve el nombre de la base de datos a la cual es el índice de conexión con
PostgreSQL está conectado, o false si connection no es un índice de conexión válido.
</para>
-</refsect1
+</refsect1>
</refentry>
<refentry id="function.pg-errormessage">
Index: phpdoc/es/language/control-structures.xml
diff -u phpdoc/es/language/control-structures.xml:1.1.1.1 phpdoc/es/language/control-structures.xml:1.2
--- phpdoc/es/language/control-structures.xml:1.1.1.1 Mon Aug 21 04:31:13 2000
+++ phpdoc/es/language/control-structures.xml Tue Aug 22 08:18:06 2000
@@ -660,7 +660,7 @@
la condición se evalúa otra vez. Si tu condición es más complicada
que una comparación simple y/o está en un bucle estrecho,
un <literal>switch</literal> puede ser más rápido.
-
+ </simpara>
<para>
La lista de sentencias de un case puede también estar vacía, lo cual
simplemente pasa el control a la lista de sentencias del siguiente case.
@@ -910,7 +910,7 @@
</informalexample>
</para>
- <simpara>
+ <para>
En ambos, PHP3 y PHP4, es posible ejecutar una sentencia
<literal>return</literal> dentro de un archivo incluido con
<function>include</function>, para terminar el procesado de ese
@@ -1005,9 +1005,7 @@
El '27' espúreo se debe al hecho de que PHP3 no soporta devolver
valores con <literal>return</literal> desde archivos como ese.
</para>
-
</example>
-
<para>
Por favor, note que ambos, <function>include</function> y
<function>require</function>, realmente incluyen el contenido del
Index: phpdoc/es/language/types.xml
diff -u phpdoc/es/language/types.xml:1.1.1.1 phpdoc/es/language/types.xml:1.2
--- phpdoc/es/language/types.xml:1.1.1.1 Mon Aug 21 04:31:13 2000
+++ phpdoc/es/language/types.xml Tue Aug 22 08:18:06 2000
@@ -485,7 +485,6 @@
<sect1 id="language.types.type-juggling">
<title>Type juggling</title>
-repaso
<simpara>
PHP no requiere (o soporta) la declaración explícita del tipo en
la declaración de variables; el tipo de una variable se determina por el
Index: phpdoc/es/chapters/install.xml
+++ phpdoc/es/chapters/install.xml
<chapter id="installation">
<title>Installation</title>
<sect1 id="downloading">
<title>Downloading the latest version</title>
<simpara>
The source code, and binary distributions for some platforms
(including Windows), can be found at <literal><ulink
url="&url.php;">&url.php;</ulink></literal>.
</simpara>
</sect1>
<sect1 id="install-unix">
<title>Installation on UNIX systems</title>
<para>
This section will guide you through the configuration and
installation of PHP. Prerequisite knowledge and software:
<itemizedlist>
<listitem>
<simpara>
Basic UNIX skills (being able to operate "make" and a C
compiler)
</simpara>
</listitem>
<listitem>
<simpara>
An ANSI C compiler
</simpara>
</listitem>
<listitem>
<simpara>
A web server
</simpara>
</listitem>
</itemizedlist>
</para>
<sect2>
<title>
Quick Installation Instructions (Apache Module Version)
</title>
<para>
<informalexample>
<programlisting>
1. gunzip apache_1.3.x.tar.gz
2. tar xvf apache_1.3.x.tar
3. gunzip php-x.x.x.tar.gz
4. tar xvf php-x.x.x.tar
5. cd apache_1.3.x
6. ./configure --prefix=/www
7. cd ../php-x.x.x
8. ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
9. make
10. make install
11. cd ../apache_1.3.x
12. for PHP 3: ./configure --activate-module=src/modules/php3/libphp3.a
for PHP 4: ./configure --activate-module=src/modules/php4/libphp4.a
13. make
14. make install
Instead of this step you may prefer to simply copy the httpd binary
overtop of your existing binary. Make sure you shut down your
server first though.
15. cd ../php-x.x.x
16. for PHP 3: cp php3.ini-dist /usr/local/lib/php3.ini
for PHP 4: cp php.ini-dist /usr/local/lib/php.ini
You can edit your .ini file to set PHP options. If
you prefer this file in another location, use
--with-config-file-path=/path in step 8.
17. Edit your httpd.conf or srm.conf file and add:
For PHP 3: AddType application/x-httpd-php3 .php3
For PHP 4: AddType application/x-httpd-php .php
You can choose any extension you wish here. .php is simply the one
we suggest.
18. Use your normal procedure for starting the Apache server. (You must
stop and restart the server, not just cause the server to reload by
use a HUP or USR1 signal.)
</programlisting>
</informalexample>
</para>
</sect2>
<sect2 id="with-apache">
<title>Apache Module</title>
<para>
PHP can be compiled in a number of different ways. Here is a
quick summary:
<informalexample>
<programlisting>
/configure --with-apxs --with-pgsql
</programlisting>
</informalexample>
</para>
<para>
This will create a <filename>libphp4.so</filename> shared library
that is loaded into Apache using a LoadModule line in Apache's
<filename>httpd.conf</filename> file. The PostgreSQL support is
embedded into this <filename>libphp4.so</filename> library.
</para>
<para>
<informalexample>
<programlisting>
/configure --with-apxs --with-pgsql=shared
</programlisting>
</informalexample>
</para>
<para>
This will again create a <filename>libphp4.so</filename> shared
library for Apache, but it will also create a
<filename>pgsql.so</filename> shared library that is loaded into
PHP either by using the extension directive in
<filename>php.ini</filename> file or by loading it explicitly in
a script using the <function>dl</function> function.
</para>
<para>
<informalexample>
<programlisting>
/configure --with-apache=/path/to/apache_source --with-pgsql
</programlisting>
</informalexample>
</para>
<para>
This will create a <filename>libmodphp4.a</filename> library, a
<filename>mod_php4.c</filename> and some accompanying files and
copy this into the <literal>src/modules/php4</literal> directory
in the Apache source tree. Then you compile Apache using
<literal>--activate-module=src/modules/php4/libphp4.a</literal>
and the Apache build system will create
<filename>libphp4.a</filename> and link it statically into the
<filename>httpd</filename> binary. The PostgreSQL support is
included directly into this <filename>httpd</filename> binary, so
the final result here is a single <filename>httpd</filename>
binary that includes all of Apache and all of PHP.
</para>
<para>
<informalexample>
<programlisting>
/configure --with-apache=/path/to/apache_source --with-pgsql=shared
</programlisting>
</informalexample>
</para>
<para>
Same as before, except instead of including PostgreSQL support
directly into the final <filename>httpd</filename> you will get a
<filename>pgsql.so</filename> shared library that you can load
into PHP from eihter the <filename>php.ini</filename> file or
directly using <function>dl</function>.
</para>
</sect2>
<sect2 id="with-fhttpd">
<title>fhttpd Module</title>
<para>
To build PHP as an fhttpd module, answer "yes" to "Build as an
fhttpd module?" (the <option><link linkend="with-fhttpd">
--with-fhttpd</link>=<replaceable>DIR</replaceable></option>
option to configure) and specify the fhttpd source base
directory. The default directory is <filename
class="directory">/usr/local/src/fhttpd</filename>. If you are
running fhttpd, building PHP as a module will give better
performance, more control and remote execution
capability.
</para>
</sect2>
<sect2 id="install-cgi">
<title>CGI version</title>
<para>
The default is to build PHP as a CGI program. 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 Apache users to run different
PHP-enabled pages under different user-ids. Please make sure
you read through the <link linkend="security">Security
chapter</link> if you are going to run PHP as a CGI.
</para>
</sect2>
<sect2 id="database-support-options">
<title>Database Support Options</title>
<para>
PHP has native support for a number of databases (as well as
ODBC):
</para>
<sect3 id="with-adabas">
<title>Adabas D</title>
<synopsis>
<option>--with-adabas<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Enables Adabas D support. The parameter is the Adabas D
install directory and defaults to <filename
class="directory">/usr/local/adabasd</filename>.
</simpara>
<simpara>
<ulink url="&url.adabas;">Adabas home page</ulink>
</simpara>
</sect3>
<sect3 id="with-dbase">
<title>dBase</title>
<synopsis>
<option>--with-dbase</option>
</synopsis>
<simpara>
Enables the bundled DBase support. No external libraries are
required.
</simpara>
</sect3>
<sect3 id="with-filepro">
<title>filePro</title>
<synopsis>
<option>--with-filepro</option>
</synopsis>
<simpara>
Enables the bundled read-only filePro support. No external
libraries are required.
</simpara>
</sect3>
<sect3 id="with-ibm-db2">
<title>IBM DB2</title>
<synopsis>
<option>--with-ibm-db2<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Enables IBM DB2 support. The parameter to this option is the
DB2 base install directory and defaults to
<filename class="directory">/home/db2inst1/sqllib</filename>.
</simpara>
<simpara>
<ulink url="&url.ibmdb2;">IBM DB2 home page</ulink>
</simpara>
</sect3>
<sect3 id="with-msql">
<title>mSQL</title>
<synopsis>
<option>--with-msql<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Enables mSQL support. The parameter to this option is the mSQL
install directory and defaults to <filename
class="directory">/usr/local/Hughes</filename>. This is the
default directory of the mSQL 2.0 distribution.
<command>configure</command> automatically detects which mSQL
version you are running and PHP supports both 1.0 and 2.0, but
if you compile PHP with mSQL 1.0, you can only access mSQL 1.0
databases, and vice-versa.
</simpara>
<simpara>
See also <link linkend="ini.sect.msql">mSQL Configuration</link>
Directives in the <link linkend="configuration.file">configuration
file</link>.
</simpara>
<simpara>
<ulink url="&url.msql;">mSQL home page</ulink>
</simpara>
</sect3>
<sect3 id="with-mysql">
<title>MySQL</title>
<synopsis>
<option>--with-mysql<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Enables MySQL support. The parameter to this option is the
MySQL install directory and defaults to <filename
class="directory">/usr/local</filename>. This is the default
installation directory of the MySQL distribution.
</simpara>
<simpara>
See also <link linkend="ini.sect.mysql">MySQL
Configuration</link> Directives in the <link
linkend="configuration.file">configuration file</link>.
</simpara>
<simpara>
<ulink url="&url.mysql;">MySQL home page</ulink>
</simpara>
</sect3>
<sect3 id="with-iodbc">
<title>iODBC</title>
<synopsis>
<option>--with-iodbc<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Includes iODBC support. This feature was first developed for
iODBC Driver Manager, a freely redistributable ODBC driver
manager which runs under many flavors of UNIX. The parameter to
this option is the iODBC installation directory and defaults to
<filename class="directory">/usr/local</filename>.</simpara>
<simpara>
<ulink url="&url.freeodbc;">FreeODBC home page</ulink>
or <ulink url="&url.iodbc;">iODBC home page</ulink>
</simpara>
</sect3>
<sect3 id="with-openlink">
<title>OpenLink ODBC</title>
<synopsis>
<option>--with-openlink<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Includes OpenLink ODBC support. The parameter to this option is
the OpenLink ODBC installation directory and defaults to
<filename class="directory">/usr/local/openlink</filename>.
</simpara>
<simpara>
<ulink url="&url.openlink;">OpenLink Software's home
page</ulink>
</simpara>
</sect3>
<sect3 id="with-oracle">
<title>Oracle</title>
<synopsis>
<option>--with-oracle<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Includes Oracle support. Has been tested and should be working
at least with Oracle versions 7.0 through 7.3. The parameter is
the <envar>ORACLE_HOME</envar> directory. You do not have to
specify this parameter if your Oracle environment has been set
up.</simpara>
<simpara>
<ulink url="&url.oracle;">Oracle home page</ulink>
</simpara>
</sect3>
<sect3 id="with-pgsql">
<title>PostgreSQL</title>
<synopsis>
<option>--with-pgsql<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Includes PostgreSQL support. The parameter is the PostgreSQL
base install directory and defaults to <filename
class="directory">/usr/local/pgsql</filename>.
</simpara>
<simpara>
See also <link linkend="ini.sect.pgsql">Postgres
Configuration</link> Directives in the <link
linkend="configuration.file">configuration file</link>.
</simpara>
<simpara>
<ulink url="&url.pgsql;">PostgreSQL home
page</ulink>
</simpara>
</sect3>
<sect3 id="with-solid">
<title>Solid</title>
<synopsis>
<option>--with-solid<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Includes Solid support. The parameter is the Solid install
directory and defaults to <filename
class="directory">/usr/local/solid</filename>.
</simpara>
<simpara>
<ulink url="&url.solid;">Solid home page</ulink>
</simpara>
</sect3>
<sect3 id="with-sybase">
<title>Sybase</title>
<synopsis>
<option>--with-sybase<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Includes Sybase support. The parameter is the Sybase install
directory and defaults to <filename
class="directory">/home/sybase</filename>.
</simpara>
<simpara>
See also <link linkend="ini.sect.sybase">Sybase
Configuration</link> Directives in the <link
linkend="configuration.file">configuration file</link>.
</simpara>
<simpara>
<ulink url="&url.sybase;">Sybase home page</ulink>
</simpara>
</sect3>
<sect3 id="with-sybase-ct">
<title>Sybase-CT</title>
<synopsis>
<option>--with-sybase-ct<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Includes Sybase-CT support. The parameter is the Sybase-CT
install directory and defaults to <filename
class="directory">/home/sybase</filename>.
</simpara>
<simpara>
See also <link linkend="ini.sect.sybct">Sybase-CT
Configuration</link> Directives in the <link
linkend="configuration.file">configuration
file</link>.
</simpara>
</sect3>
<sect3 id="with-velocis">
<title>Velocis</title>
<synopsis>
<option>--with-velocis<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Includes Velocis support. The parameter is the Velocis install
directory and defaults to <filename
class="directory">/usr/local/velocis</filename>.
</simpara>
<simpara>
<ulink url="&url.velocis;">Velocis home page</ulink>
</simpara>
</sect3>
<sect3 id="with-custom-odbc">
<title>A custom ODBC library</title>
<synopsis>
<option>--with-custom-odbc<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Includes support for an arbitrary custom ODBC library. The
parameter is the base directory and defaults to <filename
class="directory">/usr/local</filename>.
</simpara>
<simpara>
This option implies that you have defined CUSTOM_ODBC_LIBS when
you run the configure script. You also must have a valid odbc.h
header somewhere in your include path. If you don't have one,
create it and include your specific header from there. Your
header may also require some extra definitions, particularly
when it is multiplatform. Define them in CFLAGS.</simpara>
<simpara>
For example, you can use Sybase SQL Anywhere on QNX as
following:
<literal>
CFLAGS=-DODBC_QNX LDFLAGS=-lunix CUSTOM_ODBC_LIBS="-ldblib
-lodbc" ./configure --with-custom-odbc=/usr/lib/sqlany50
</literal>
</simpara>
</sect3>
<sect3 id="disable-unified-odbc">
<title>Unified ODBC</title>
<synopsis>
<option>--disable-unified-odbc</option>
</synopsis>
<simpara>
Disables the Unified ODBC module, which is a common interface to
all the databases with ODBC-based interfaces, such as Solid,
IBM DB2 and Adabas D. It also works for normal ODBC libraries.
Has been tested with iODBC, Solid, Adabas D, IBM DB2 and Sybase SQL
Anywhere. Requires that one (and only one) of these modules or
the Velocis module is enabled, or a custom ODBC library
specified. This option is only applicable if one of the
following options is used: <link
linkend="with-iodbc">--with-iodbc</link>, <link
linkend="with-solid">--with-solid</link>, <link
linkend="with-ibm-db2">--with-ibm-db2</link>, <link
linkend="with-adabas">--with-adabas</link>, <link
linkend="with-velocis">--with-velocis</link>, or <link
linkend="with-custom-odbc">--with-custom-odbc</link>.
</simpara>
<simpara>
See also <link linkend="ini.sect.uodbc">Unified ODBC
Configuration</link> Directives in the <link
linkend="configuration.file">configuration
file</link>.
</simpara>
</sect3>
<sect3 id="with-ldap">
<title>LDAP</title>
<synopsis>
<option>--with-ldap<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Includes <acronym>LDAP</acronym> (Lightweight Directory Access
Protocol) support. The parameter is the LDAP base install
directory, defaults to <filename
class="directory">/usr/local/ldap</filename>.
</simpara>
<simpara>
More information about LDAP can be found in <ulink
url="&url.rfc;rfc1777.html">RFC1777</ulink> and
<ulink
url="&url.rfc;rfc1778.html">RFC1778</ulink>.
</simpara>
</sect3>
</sect2>
<sect2>
<title>Other configure options</title>
<sect3 id="with-mcrypt">
<title>--with-mcrypt<replaceable>=DIR</replaceable></title>
<synopsis>
<option>--with-mcrypt</option>
</synopsis>
<simpara>
Include support for the mcrypt library. See the <link
linkend="ref.mcrypt">mcrypt documentation</link> for more
information. If you use the optional
<replaceable>DIR</replaceable> argument, PHP will look for
mcrypt.h in <replaceable>DIR</replaceable>/include.
</simpara>
</sect3>
<sect3 id="enable-sysvsem">
<title>--enable-sysvsem</title>
<synopsis>
<option>--enable-sysvsem</option>
</synopsis>
<simpara>
Include support for Sys V semaphores (supported by most Unix
derivates). See the <link linkend="ref.sem">Semaphore and Shared
Memory documentation</link> for more information.
</simpara>
</sect3>
<sect3 id="enable-sysvshm">
<title>--enable-sysvshm</title>
<synopsis>
<option>--enable-sysvshm</option>
</synopsis>
<simpara>
Include support for Sys V shared memory (supported by most Unix
derivates). See the <link linkend="ref.sem">Semaphore and Shared
Memory documentation</link> for more information.
</simpara>
</sect3>
<sect3 id="with-xml">
<title>--with-xml</title>
<synopsis>
<option>--with-xml</option>
</synopsis>
<simpara>
Include support for a non-validating XML parser using James
Clark's <ulink url="&url.expat;">expat library</ulink>. See the
<link linkend="ref.xml">XML function reference</link> for
details.
</simpara>
</sect3>
<sect3 id="enable-maintainer-mode">
<title>--enable-maintainer-mode</title>
<synopsis>
<option>--enable-maintainer-mode</option>
</synopsis>
<simpara>
Turns on extra dependencies and compiler warnings used by some
of the PHP developers.</simpara>
</sect3>
<sect3 id="with-system-regex">
<title>--with-system-regex</title>
<synopsis>
<option>--with-system-regex</option>
</synopsis>
<simpara>
Uses the system's regular expression library rather than the
bundled one. If you are building PHP as a server module, you
must use the same library when building PHP as when linking the
server. Enable this if the system's library provides special
features you need. It is recommended that you use the bundled
library if possible.</simpara>
</sect3>
<sect3 id="with-config-file-path">
<title>--with-config-file-path</title>
<synopsis>
<option>--with-config-file-path=DIR</option>
</synopsis>
<simpara>
The path used to look for <link linkend="configuration.file">the
configuration file</link> when PHP starts up.
</simpara>
</sect3>
<sect3 id="with-exec-dir">
<title>--with-exec-dir</title>
<synopsis>
<option>--with-exec-dir<replaceable>=DIR</replaceable></option>
</synopsis>
<simpara>
Only allow running of executables in DIR when in safe mode.
Defaults to <filename class="directory">/usr/local/bin</filename>.
This option only sets the default, it may be changed with the
<link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link>
directive in the <link linkend="configuration.file">configuration
file</link> later.</simpara>
</sect3>
<sect3 id="enable-debug">
<title>--enable-debug</title>
<synopsis>
<option>--enable-debug</option>
</synopsis>
<simpara>
Enables extra debug information. This makes it possible to
gather more detailed information when there are problems with
PHP. (Note that this doesn't have anything to do with debugging
facilities or information available to PHP scripts.)
</simpara>
</sect3>
<sect3 id="enable-safe-mode">
<title>--enable-safe-mode</title>
<synopsis>
<option>--enable-safe-mode</option>
</synopsis>
<simpara>
Enables "safe mode" by default. This imposes several
restrictions on what PHP can do, such as opening only files
within the document root. Read the <link
linkend="security">Security chapter</link> for more more
information. CGI users should always enable secure mode. This
option only sets the default, it may be enabled or disabled with
the <link linkend="ini.safe-mode">safe_mode</link> directive in
the <link linkend="configuration.file">configuration file</link>
later.
</simpara>
</sect3>
<sect3 id="enable-track-vars">
<title>--enable-track-vars</title>
<synopsis>
<option>--enable-track-vars</option>
</synopsis>
<simpara>
Makes PHP keep track of where GET/POST/cookie variables come
from in the arrays HTTP_GET_VARS, HTTP_POST_VARS and
HTTP_COOKIE_VARS. This option only sets the default, it may be
enabled or disabled with the <link
linkend="ini.track-vars">track_vars</link> directive in the
<link linkend="configuration.file">configuration file</link>
later.
</simpara>
</sect3>
<sect3 id="enable-magic-quotes">
<title>--enable-magic-quotes</title>
<synopsis>
<option>--enable-magic-quotes</option>
</synopsis>
<simpara>
Enable magic quotes by default. This option only sets the
default, it may be enabled or disabled with the <link
linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link>
directive in the <link
linkend="configuration.file">configuration file</link>
later. See also the <link linkend="ini.magic-quotes-gpc">
magic_quotes_gpc</link> and the <link
linkend="ini.magic-quotes-sybase">magic_quotes_sybase</link>
directives.
</simpara>
</sect3>
<sect3 id="enable-debugger">
<title>--enable-debugger</title>
<synopsis>
<option>--enable-debugger</option>
</synopsis>
<simpara>
Enables the internal PHP debugger support. This feature is
still in an experimental state. See also the <link
linkend="ini.sect.debugger">Debugger Configuration</link>
directives in the <link
linkend="configuration.file">configuration
file</link>.
</simpara>
</sect3>
<sect3 id="enable-discard-path">
<title>--enable-discard-path</title>
<synopsis>
<option>--enable-discard-path</option>
</synopsis>
<simpara>
If this is enabled, the PHP CGI binary can safely be placed
outside of the web tree and people will not be able to
circumvent .htaccess security. Read the <link
linkend="security.cgi.shell">section in the security
chapter</link> about this option.
</simpara>
</sect3>
<sect3 id="enable-bcmath">
<title>--enable-bcmath</title>
<synopsis>
<option>--enable-bcmath</option>
</synopsis>
<simpara>
Enables <command>bc</command> style arbitrary precision math
functions. See also the <link
linkend="ini.sect.bcmath">bcmath.scale </link> option in the
<link linkend="configuration.file">configuration
file</link>.
</simpara>
</sect3>
<sect3 id="enable-force-cgi-redirect">
<sect3 id="disable-short-tags">
<sect3 id="enable-url-includes">
<sect3 id="disable-syntax-hl">
<sect3>
</sect2>
<sect2>
<sect2>
<sect2>
</sect1>
<sect1 id="install-windows95-nt">
<simpara>
<para>
<itemizedlist>
</sect2>
<sect2>
<simpara>
<para>
</sect2>
<sect2>
<simpara>
<para>
</sect2>
<sect2>
<para>
<simpara>
<title>--enable-force-cgi-redirect</title>
<synopsis>
<option>--enable-force-cgi-redirect</option>
</synopsis>
<simpara>
Enable the security check for internal server redirects. You
should use this if you are running the CGI version with
Apache.
</simpara>
<simpara>
When using PHP as a CGI binary, PHP by default always first
checks that it is used by redirection (for example under Apache,
by using Action directives). This makes sure that the PHP
binary cannot be used to bypass standard web server
authentication procedures by calling it directly, like <filename
role="url">http://my.host/cgi-bin/php/secret/doc.html>.
This example accesses <filename
role="url">http://my.host/secret/doc.html> but does
not honour any security settings enforced by httpd for directory
<filename role="dir">/secret</filename>.
</simpara>
<simpara>
Not enabling option disables the check and enables bypassing
httpd security and authentication settings. Do this only if
your server software is unable to indicate that a safe
redirection was done and all your files under your document root
and user directories may be accessed by anyone.
</simpara>
<simpara>
Read the <link linkend="security.cgi.force-redirect">section in
the security chapter</link> about this option.
</simpara>
</sect3>
<title>--disable-short-tags</title>
<synopsis>
<option>--disable-short-tags</option>
</synopsis>
<simpara>
Disables the short form <literal><? ?></literal> PHP tags.
You must disable the short form if you want to use PHP with
<acronym>XML</acronym>. With short tags disabled, the only PHP
code tag is <literal><?php ?></literal>. This option only
sets the default, it may be enabled or disabled with the <link
linkend="ini.short-open-tag">short_open_tag</link> directive in
the <link linkend="configuration.file">configuration file</link>
later.
</simpara>
</sect3>
<title>--enable-url-includes</title>
<synopsis>
<option>--enable-url-includes</option>
</synopsis>
<simpara>
Makes it possible to run code on other HTTP or FTP servers
directly from PHP with <link
linkend="function.include">include()</link>. See also the <link
linkend="ini.include-path">include_path</link> option in the
<link linkend="configuration.file">configuration file</link>.
</simpara>
</sect3>
<title>--disable-syntax-hl</title>
<synopsis>
<option>--disable-syntax-hl</option>
</synopsis>
<simpara>
Turns off syntax highlighting.
</simpara>
</sect3>
<title>CPPFLAGS and LDFLAGS</title>
<para>
To make the PHP installation look for header or library files in
different directories, modify the <envar>CPPFLAGS</envar> and
<envar>LDFLAGS</envar> environment variables, respectively. If
you are using a sensible shell, you should be able to do
<command>
LDFLAGS=-L/my/lib/dir CPPFLAGS=-I/my/include/dir ./configure
</command>
</para>
</sect3>
<title>Building</title>
<simpara>
When PHP is configured, you are ready to build the CGI executable
or the PHP library. The command <command>make</command> should
take care of this. If it fails and you can't figure out why, see
the <link linkend="install-problems">Problems section</link>.
</simpara>
</sect2>
<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>
<title>Benchmarking</title>
<simpara>
If you have built PHP as a CGI program, you may benchmark your
build by typing <command>make bench</command>. Note that if safe
mode 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 safe
mode. 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>
</sect2>
<title>Installation on Windows 95/98/NT systems</title>
This install guide will help you install and configure PHP on your
Windows 9x/NT webservers. This guide was compiled by
&link.bob;. The latest revision can be found at <ulink
url="&url.win32install;">&url.win32install;</ulink>.
</simpara>
<para>
This guide provides installation support for:
<itemizedlist>
<listitem>
<para>
Personal Web Server (Newest version recommended)
</para>
</listitem>
<listitem>
<para>
Internet Information Server 3 or 4
</para>
</listitem>
<listitem>
<para>
Apache 1.3.x
</para>
</listitem>
<listitem>
<para>
Omni HTTPd 2.0b1
</para>
</listitem>
</itemizedlist>
</para>
<sect2>
<title>General Installation Steps</title>
The following steps should be performed on all installations
before the server specific instructions.
<listitem>
<para>
Extract the distribution file to a directory of your choice.
"C:\PHP\" is a good start.
</para>
</listitem>
<listitem>
<para>
Copy the file, 'php.ini-dist' to your '%WINDOWS%' directory
and rename it to 'php.ini'. Your '%WINDOWS%' directory is
typically:
<simplelist>
<member>c:\windows for Windows 95/98</member>
<member>c:\winnt or c:\winnt40 for NT servers</member>
</simplelist>
</para>
</listitem>
<listitem>
<para>
Edit your 'php.ini' file:
<itemizedlist>
<listitem>
<simpara>
You will need to change the 'extension_dir' setting to
point to your php-install-dir, or where you have placed
your 'php_*.dll' files. ex: c:\php
</simpara>
</listitem>
<listitem>
<simpara>
If you are using Omni Httpd, do not follow the next step.
Set the 'doc_root' to point to your webservers
document_root. ex: c:\apache\htdocs or c:\webroot
</simpara>
</listitem>
<listitem>
<simpara>
Choose which modules you would like to load when PHP
starts. You can uncomment the: 'extension=php_*.dll' lines
to load these modules. Some modules require you to have
additional libraries installed on your system for the
module to work correctly. The PHP <ulink
url="&url.php.faq;">FAQ</ulink> has more information on
where to get supporting libraries. You can also load a
module dynamically in your script using:
<command>dl("php_*.dll");</command>
</simpara>
</listitem>
<listitem>
<simpara>
On PWS and IIS, you can set the browscap.ini to point to:
'c:\windows\system\inetsrv\browscap.ini' on Windows 95/98
and 'c:\winnt\system32\inetsrv\browscap.ini' on NT
Server. Additional information on using the browscap
functionality in PHP can be found at this <ulink
url="&url.browscap;">mirror</ulink>, select the "source"
button to see it in action.
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist></para>
<simpara>
The DLLs for PHP extensions are prefixed with 'php_'. This
prevents confusion between PHP extensions and their supporting
libraries.
</simpara>
<title>Windows 95/98/NT and PWS/IIS 3</title>
The recommended method for configuring these servers is to use
the INF file included with the distribution
(php_iis_reg.inf). You may want to edit this file and make sure
the extensions and PHP install directories match your
configuration. Or you can follow the steps below to do it
manually.
</simpara>
<simpara>
WARNING: These steps involve working directly with the windows
registry. One error here can leave your system in an unstable
state. We highly recommend that you back up your registry
first. The PHP Development team will not be held responsible if
you damage your registry.
</simpara>
<itemizedlist>
<listitem>
<simpara>
Run Regedit.
</simpara>
</listitem>
<listitem>
<simpara>
Navigate to: <literal>HKEY_LOCAL_MACHINE /System
/CurrentControlSet /Services /W3Svc /Parameters
/ScriptMap</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
On the edit menu select: <literal>New->String Value</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Type in the extension you wish to use for your php
scripts. ex: <literal>.php</literal>
</simpara>
</listitem>
<listitem>
<simpara>
Double click on the new string value and enter the path to
<literal>php.exe</literal> in the value data field. ex:
<literal>c:\php\php.exe %s %s</literal>. The '%s %s' is VERY
important, PHP will not work properly without it.
</simpara>
</listitem>
<listitem>
<simpara>
Repeat these steps for each extension you wish to associate
with PHP scripts.
</simpara>
</listitem>
<listitem>
<simpara>
Now navigate to: <literal>HKEY_CLASSES_ROOT</literal>
</simpara>
</listitem>
<listitem>
<simpara>
On the edit menu select: <literal>New->Key</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Name the key to the extension you setup in the previous
section. ex: <literal>.php</literal>
</simpara>
</listitem>
<listitem>
<simpara>
Highlight the new key and in the right side pane, double click
the "default value" and enter <literal>phpfile</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Repeat the last step for each extension you set up in the
previous section.
</simpara>
</listitem>
<listitem>
<simpara>
Now create another <literal>New->Key</literal> under
<literal>HKEY_CLASSES_ROOT</literal> and name it
<literal>phpfile</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Highlight the new key <literal>phpfile</literal> and in the
right side pane, double click the "default value" and enter
<literal>PHP Script</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Right click on the <literal>phpfile</literal> key and select
<literal>New->Key</literal>, name it <literal>Shell</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Right click on the <literal>Shell</literal> key and select
<literal>New->Key</literal>, name it <literal>open</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Right click on the <literal>open</literal> key and select
<literal>New->Key</literal>, name it
<literal>command</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Highlight the new key <literal>command</literal> and in the
right side pane, double click the "default value" and enter
the path to <literal>php.exe</literal>. ex:
<literal>c:\php\php.exe -q %1</literal>. (don't forget the
<literal>%1</literal>).
</simpara>
</listitem>
<listitem>
<simpara>
Exit Regedit.
</simpara>
</listitem>
</itemizedlist>
</para>
<simpara>
PWS and IIS 3 users now have a fully operational system. IIS 3
users can use a nifty <ulink
url="&url.iiscfg;">tool</ulink> from
Steven Genusa to configure their script maps.
</simpara>
<title>Windows NT and IIS 4</title>
To install PHP on an NT Server running IIS 4, follow these
instructions:
</simpara>
<itemizedlist>
<listitem>
<simpara>
In Internet Service Manager (MMC), select the Web site or the
starting point directory of an application.
</simpara>
</listitem>
<listitem>
<simpara>
Open the directory's property sheets (by right clicking and
selecting properties), and then click the Home Directory,
Virtual Directory, or Directory tab.
</simpara>
</listitem>
<listitem>
<simpara>
Click the Configuration button, and then click the App
Mappings tab.
</simpara>
</listitem>
<listitem>
<simpara>
Click Add, and in the Executable box, type:
<literal>c:\path-to-php-dir\php.exe %s %s</literal>. You MUST
have the %s %s on the end, PHP will not function properly if
you fail to do this.
</simpara>
</listitem>
<listitem>
<simpara>
In the Extension box, type the file name extension you want
associated with PHP scripts. (You must repeat step 5 and 6 for
each extension you want accociated with PHP
scripts. (<literal>.php</literal> and
<literal>.phtml</literal> are common.)
</simpara>
</listitem>
<listitem>
<simpara>
Set up the appropriate security. (This is done in Internet
Service Manager), and if your NT Server uses NTFS file system,
add execute rights for I_USR_ to the directory that contains
<literal>php.exe</literal>.
</simpara>
</listitem>
</itemizedlist>
</para>
<title>Windows 9x/NT and Apache 1.3.x</title>
<simpara>
You must edit your <literal>srm.conf</literal> or
<literal>httpd.conf</literal> to configure Apache to work with
the PHP CGI binary.
</simpara>
<simpara>
Although there can be a few variations of configuring PHP under
Apache, this one is simple enough to be used by the
newcomer. Please consult the Apache Docs for further
configuration directives.
</simpara>
<itemizedlist>
<listitem>
<simpara>
<literal>
ScriptAlias /php/ "c:/path-to-php-dir/"
</literal>
</simpara>
</listitem>
<listitem>
<simpara>
<literal>
AddType application/x-httpd-php .php
</literal>
</simpara>
</listitem>
<listitem>
<simpara>
<literal>
AddType application/x-httpd-php .phtml
</literal>
</simpara>
</listitem>
<listitem>
<simpara>
<literal>
Action application/x-httpd-php "/php/php.exe"
</literal>
</simpara>
</listitem>
</itemizedlist>
</para>
To use the source code highlighting feature, simply create a PHP
script file and stick this code in: <literal><?php show_source
("original_php_script.php"); ?></literal>. Substitute
<literal>original_php_script.php</literal> with the name of the
file you wish to show the source of. (this is only one way of
doing it). <emphasis>Note:</emphasis> On Win-Apache all back

