Contributions are ready for review
| From: | phpdoc at lists dot php dot net | Date: | Mon, 10 Feb 2014 13:00:02 +0000 |
| Subject: | Contributions are ready for review | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969384843@lists.php.net to get a copy of this message | ||
Hello PHP EN Documentation team,
There are contributions within the online editor queue for this language.
Please review, then commit or delete these patches.
Patches for review :
-----------------------
New file: en/install/unix/nginx.xml
By: Jacob Clark on 2014-01-08 07:33:25
===================================================================
--- en/install/unix/nginx.xml
+++ en/install/unix/nginx.xml
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="utf-8"?>
+ <sect1 xml:id="install.unix.nginx" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <title>Nginx 1.4.x on Unix systems</title>
+
+ <para>
+ This documentation will cover installing and configuring PHP with PHP-FPM for a Nginx 1.4.x
HTTP server.
+ </para>
+
+ <para>
+ This guide will assume that you have built Nginx from source and therefore all binaries and
configuration files are located at '/usr/local/nginx'. If this is not the case and you
have obtained Nginx through other means then please refer to the <link
xlink:href="&url.nginx;">Nginx Wiki</link> in order translate this manual to
your setup.
+ </para>
+
+ <para>
+ This guide will cover the basics of configuring an Nginx server to
+ process PHP applications and serve them on port 80, it is recommended
+ that you study the Nginx and PHP-FPM documentation if you wish to
+ optimise your setup past the scope of this documentation.
+ </para>
+
+ <para>
+ Please note that throughout this documentation version numbers have been
+ replaced with an 'x' to ensure this documentation stays correct in the future,
+ please replace these as necessary with the corresponding version numbers.
+ </para>
+
+ <orderedlist>
+ <listitem>
+ <para>
+ It is recomended that you visit the Nginx Wiki
+ <link
xlink:href="&url.nginx.wiki.install;">install</link> page
+ in order to obtain and install Nginx on your system.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Obtain and unpack the PHP source:
+ </para>
+
+ <example xml:id="install.unix.nginx.extract.php">
+ <screen>
+<![CDATA[
+tar zxf php-x.x.x
+]]>
+ </screen>
+ </example>
+ </listitem>
+
+ <listitem>
+ <para>
+ Configure and build PHP. This is where you customize PHP
+ with various options, like which extensions will be enabled. Run
+ ./configure --help for a list of available options. In our example
+ we'll do a simple configure with PHP-FPM and MySQL support.
+ </para>
+
+ <example xml:id="install.unix.nginx.build.php">
+ <screen>
+<![CDATA[
+cd ../php-x.x.x
+./configure --enable-fpm --with-mysql
+make
+sudo make install
+]]>
+ </screen>
+ </example>
+ </listitem>
+
+ <listitem>
+ <para>
+ Obtain and move configuration files to their correct locations
+ </para>
+
+ <example xml:id="install.unix.nginx.configure.php">
+ <screen>
+<![CDATA[
+cp php.ini-development /usr/local/php/php.ini
+cp /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.conf
+cp sapi/fpm/php-fpm /usr/local/bin
+]]>
+ </screen>
+ </example>
+ </listitem>
+
+ <listitem>
+ <para>
+ It is important that we prevent Nginx from passing requests to the PHP-FPM backend
if the file does not exists, allowing us to prevent arbitrarily script injection.
+
+ We can fix this by setting the option cgi.fix_pathinfo= to 0 within our php.ini
file.
+
+ Load up php.ini:
+ </para>
+
+ <example xml:id="install.unix.nginx.configure.php">
+ <screen>
+<![CDATA[
+vim /usr/local/php/php.ini
+]]>
+ </screen>
+ </example>
+
+ <para>
+ Locate cgi.fix_pathinfo= and modify it as follows:
+ </para>
+
+ <example xml:id="install.unix.nginx.configure.php">
+ <screen>
+<![CDATA[
+cgi.fix_pathinfo=0
+]]>
+ </screen>
+ </example>
+ </listitem>
+
+ <listitem>
+ <para>
+ php-fpm.conf must be modified to specify that php-fpm must run as the user www-data
and the group www-data before we can start the service:
+ </para>
+
+ <example xml:id="install.unix.nginx.modify.phpfpm">
+ <screen>
+<![CDATA[
+vim /usr/local/etc/php-fpm.conf
+]]>
+ </screen>
+ </example>
+
+ <para>
+ Find and modify the following:
+ </para>
+
+ <example xml:id="install.unix.nginx.modify.phpfpm.usergroup">
+ <screen>
+<![CDATA[
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+; will be used.
+user = www-data
+group = www-data
+]]>
+ </screen>
+ </example>
+
+ <para>
+ The php-fpm service can now be started:
+ </para>
+
+ <example xml:id="install.unix.nginx.start.phpfpm">
+ <screen>
+<![CDATA[
+/usr/local/bin/php-fpm
+]]>
+ </screen>
+ </example>
+
+ <para>
+ This guide will not configure php-fpm any further, if you are interested in further
configuring php-fpm then please consult the documentation.
+ </para>
+ </listitem>
+
+
+
+ <listitem>
+ <para>
+ Nginx must now be configured to support the processing of PHP applications:
+ </para>
+
+ <example xml:id="install.unix.nginx.configure.nginx">
+ <programlisting>
+<![CDATA[
+vim /usr/local/nginx/conf/nginx.conf
+]]>
+ </programlisting>
+ </example>
+
+ <para>
+ Modify the default location block to be aware it must attempt to serve .php files:
+ </para>
+
+ <example xml:id="install.unix.nginx.configure.nginx.location">
+ <programlisting role="nginx-conf">
+<![CDATA[
+location / {
+root html;
+index index.php index.html index.htm;
+}
+]]>
+ </programlisting>
+ </example>
+
+ <para>
+ The next step is to ensure that .php files are passed to the PHP-FPM backend, blow
the commented default PHP location block, enter the following:
+ </para>
+
+ <example xml:id="install.unix.nginx.configure.nginx.php">
+ <programlisting role="nginx-conf">
+<![CDATA[
+location ~* .php$ {
+fastcgi_index index.php;
+fastcgi_pass 127.0.0.1:9000;
+include fastcgi_params;
+fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+fastcgi_param SCRIPT_NAME $fastcgi_script_name;
+}
+]]>
+ </programlisting>
+ </example>
+
+ <para>
+ Restart Nginx.
+ </para>
+
+ <example xml:id="install.unix.nginx.restart.nginx">
+ <screen>
+<![CDATA[
+sudo /usr/local/nginx/sbin/nginx -s stop
+sudo /usr/local/nginx/sbin/nginx
+]]>
+ </screen>
+ </example>
+ </listitem>
+
+ <listitem>
+ <para>
+ Create a test file
+ </para>
+
+ <example xml:id="install.unix.nginx.test.nginx.php">
+ <screen>
+<![CDATA[
+rm /usr/local/nginx/html/index.html
+echo "<?php phpinfo(); ?>" >> /usr/local/nginx/html/index.php
+]]>
+ </screen>
+ </example>
+
+ <para>
+ Now navigate to http://localhost. The phpinfo()
should now be shown.
+ </para>
+ </listitem>
+ </orderedlist>
+
+ <para>
+ Following the steps above you will have a running Nginx web server with
+ support for PHP as a <literal>SAPI</literal> module. Of course there are
+ many more configuration options available Apache and PHP. For more
+ information type <command>./configure --help</command> in the corresponding
+ source tree.
+ </para>
+
+ </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:"~/.phpdoc/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
+ -->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=51828
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=51828
------------------------------------------------------------------
New file: en/install/cloud/rackspace.xml
By: Jamie Hannaford on 2014-01-22 21:17:46
===================================================================
--- en/install/cloud/rackspace.xml
+++ en/install/cloud/rackspace.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: 312448 $ -->
+<sect1 xml:id="install.cloud.rackspace" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <title>Rackspace Cloud</title>
+ <para>
+ PHP installs on the <link xlink:href="&url.cloud.rackspace;">Rackspace cloud
platform</link>.
+ </para>
+ <para>
+ See also the <link xlink:href="&url.cloud.rackspace.sdk;">Rackspace SDK for
PHP</link>.
+ </para>
+</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:"~/.phpdoc/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
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52319
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52319
------------------------------------------------------------------
Modified: en/reference/pdf/book.xml
By: rjs on 2014-01-23 06:39:46
===================================================================
--- en/reference/pdf/book.xml
+++ en/reference/pdf/book.xml
@@ -8,72 +8,19 @@
<preface xml:id="intro.pdf">
&reftitle.intro;
<para>
- The PDF functions in PHP can create PDF files using the PDFlib
- library which was initially created by Thomas Merz and is now
- maintained by <link xlink:href="&url.pdf;">PDFlib GmbH</link>.
+ The PDF functions in PHP can create PDF files using the PDFlib
+ library from PDFlib GmbH (<link
xlink:href="&url.pdf;">www.pdflib.com</link>).
+ A restricted version called PDFlib Lite 7 is available for free,
+ but it is no longer maintained since 2010.
+ PDFlib integration for PHP is still actively maintained by PDFlib GmbH.
+ It is mainly targeted at the commercial PDFlib versions, but can also
+ be used for the old PDFlib Lite.
</para>
<para>
- The documentation in this section is only meant to be an overview
- of the available functions in the PDFlib library and should not be
- considered an exhaustive reference. For the full and detailed
- explanation of each function, consult the PDFlib Reference Manual
- which is included in all PDFlib packages distributed by PDFlib GmbH.
- It provides a very good overview of what PDFlib is capable of doing
- and contains the most up-to-date documentation of all functions.
- </para>
- <para>
- For a jump start we urge you to take a look at the programming samples
- which are contained in all PDFlib distribution packages. These samples
- demonstrate basic text, vector, and graphics output as well as
- higher-level functions, such as the PDF import facility (PDI).
- </para>
- <para>
- All of the functions in PDFlib and the PHP module have identical
- function names and parameters. Unless configured otherwise, all
- lengths and coordinates are measured in PostScript points. There are
- generally 72 PostScript points to an inch, but this depends on the
- output resolution. Please see the PDFlib Reference Manual
- included in the PDFlib distribution for a more thorough explanation
- of the coordinate system used.
- </para>
- <para>
- With version 6, PDFlib offers an object-oriented API for PHP 5 in
- addition to the function-oriented API for PHP 4. The main difference is
- the following:
- </para>
- <para>
- In PHP 4, first a PDF resource has to be retrieved with a function call
- like
- </para>
- <para>
- $p = PDF_new().
- </para>
- <para>
- This PDF resource is used as the first parameter in all further function
- calls, such as in
- </para>
- <para>
- PDF_begin_document($p, "", "").
- </para>
- <para>
- In PHP 5 however, a PDFlib object is created with
- </para>
- <para>
- $p = new PDFlib().
- </para>
- <para>
- This object offers all PDFlib API functions as methods, e.g. as with
- </para>
- <para>
- $p->begin_document("", "").
- </para>
- <para>
- In addition, exceptions have been introduced in PHP 5 which are
- supported by PDFlib 6 and later as well.
- </para>
- <para>
- Please see the <link linkend="pdf.examples">examples</link> below for
- more information.
+ If you want to use PDFlib we urge you start with the examples which are
+ included in all PDFlib packages, and refer to the extensive manuals in
+ PDF format which are also included. At a minimum you should take a look
+ at the hello.php sample to learn basic setup for PDFlib usage.
</para>
<note>
<para>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52335
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52335
------------------------------------------------------------------
Modified: en/reference/imagick/imagick/sigmoidalcontrastimage.xml
By: anonymous on 2014-01-29 07:26:30
===================================================================
--- en/reference/imagick/imagick/sigmoidalcontrastimage.xml
+++ en/reference/imagick/imagick/sigmoidalcontrastimage.xml
@@ -24,6 +24,9 @@
image (0 is white; 50 is middle-gray; 100 is black). Set sharpen to
&true; to increase the image contrast otherwise the contrast is reduced.
</para>
+ <para>
+ See also http://www.imagemagick.org/Usage/color_mods/#sigmoidal
+ </para>
</refsect1>
<refsect1 role="parameters">
@@ -33,7 +36,7 @@
<varlistentry>
<term><parameter>sharpen</parameter></term>
<listitem>
- <para>
+ <para> If true increase the contrast, if false decrease the contrast.
</para>
</listitem>
</varlistentry>
@@ -41,6 +44,7 @@
<term><parameter>alpha</parameter></term>
<listitem>
<para>
+ The amount of contrast to apply. 1 is very little, 5 is a significant amount, 20 is extreme.
</para>
</listitem>
</varlistentry>
@@ -48,6 +52,7 @@
<term><parameter>beta</parameter></term>
<listitem>
<para>
+ Where the midpoint of the gradient will be. This value should be in the range 0 to 1 -
mutliplied by the quantum value for ImageMagick.
</para>
</listitem>
</varlistentry>
@@ -55,6 +60,7 @@
<term><parameter>channel</parameter></term>
<listitem>
<para>
+ Which color channels the contrast will be applied to.
</para>
</listitem>
</varlistentry>
@@ -68,6 +74,32 @@
&imagick.return.success;
</para>
</refsect1>
+
+<refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Create a gradient image using
<function>Imagick::sigmoidalContrastImage</function> suitable for blending two images
together smoothly, with the blending defined by $contrast and $the midpoint</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+function generateBlendImage($width, $height, $contrast = 10, $midpoint = 0.5) {
+ $imagick = new Imagick();
+ $imagick->newPseudoImage($width, $height, 'gradient:black-white');
+ $quanta = $imagick->getQuantumRange();
+ $imagick->sigmoidalContrastImage(true, $contrast, $midpoint *
$quanta["quantumRangeLong"]);
+
+ return $imagick;
+}
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
<refsect1 role="errors">
&reftitle.errors;
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52400
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52400
------------------------------------------------------------------
Modified: en/reference/opcache/ini.xml
By: anonymous on 2014-02-04 12:15:37
===================================================================
--- en/reference/opcache/ini.xml
+++ en/reference/opcache/ini.xml
@@ -30,7 +30,7 @@
</row>
<row>
<entry><link
-
linkend="ini.opcache.memory-consumption">opcache.memory_consumption</link></entry>
+
linkend="ini.opcache.memory-consumption">opcache.memory_consumption</link></entry>
<entry>"64"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
@@ -190,8 +190,10 @@
</term>
<listitem>
<para>
- Enables the opcode cache. When disabled, code is not optimised and
- cached.
+ Enables the opcode cache. When disabled, code is not optimised or
+ cached. The setting opcache.enable can not be enabled at runtime
+ through ini_set(), it can only be disabled. Trying to enable it at
+ in a script will generate a warning.
</para>
</listitem>
</varlistentry>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52476
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52476
------------------------------------------------------------------
Modified: en/reference/imagick/imagick/functionimage.xml
By: anonymous on 2014-02-06 12:39:05
===================================================================
--- en/reference/imagick/imagick/functionimage.xml
+++ en/reference/imagick/imagick/functionimage.xml
@@ -6,7 +6,7 @@
<refname>Imagick::functionImage</refname>
<refpurpose>Applies a function on the image</refpurpose>
</refnamediv>
-
+
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@@ -16,12 +16,11 @@
<methodparam
choice="opt"><type>int</type><parameter>channel</parameter><initializer>Imagick::CHANNEL_DEFAULT</initializer></methodparam>
</methodsynopsis>
<para>
- Applies an arithmetic, relational, or logical expression to an image.
- Use these operators to create lighter or darker versions of an image, to increase or decrease
contrast in an image,
- or to negate the image colors. &imagick.method.available.0x649;
+ Applies an arithmetic, relational, or logical expression to a pseudo image.
+ &imagick.method.available.0x649; See also http://www.imagemagick.org/Usage/transform/#function
</para>
</refsect1>
-
+
<refsect1 role="parameters">
&reftitle.parameters;
<para>
@@ -45,20 +44,113 @@
</variablelist>
</para>
</refsect1>
-
+
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&imagick.return.success;
</para>
</refsect1>
-
+
<refsect1 role="errors">
&reftitle.errors;
<para>
&imagick.imagick.throws;
</para>
</refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Create a sinusoidal gradient</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$imagick = new Imagick();
+$imagick->newPseudoImage(200, 200, 'gradient:black-white');
+$arguments = array(3, -90);
+$imagick->functionImage(Imagick::FUNCTION_SINUSOID, $arguments);
+
+header("Content-Type: image/png");
+$imagick->setImageFormat("png");
+echo $imagick->getImageBlob();
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <mediaobject>
+ <alt>Output of create a sinusoidal gradient</alt>
+ <imageobject>
+ <imagedata
fileref="en/reference/imagick/figures/functionImage_sinusoidal.png"/>
+ </imageobject>
+ </mediaobject>
+ </example>
+
+ <example>
+ <title>Create a gradient from the polynomial (4x^2 - 4x + 1) </title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$imagick = new Imagick();
+$imagick->newPseudoImage(200, 200, 'gradient:black-white');
+$arguments = array(4, -4, 1);
+$imagick->functionImage(Imagick::FUNCTION_POLYNOMIAL, $arguments);
+
+header("Content-Type: image/png");
+$imagick->setimageformat("png");
+echo $imagick->getImageBlob();
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <mediaobject>
+ <alt>Output of create a polynomial gradient</alt>
+ <imageobject>
+ <imagedata
fileref="en/reference/imagick/figures/functionImage_polynomial.png"/>
+ </imageobject>
+ </mediaobject>
+ </example>
+
+ <example>
+ <title>Create a complex gradient from the polynomial (4x^2 - 4x^2 + 1) modulated by a
sinusoidal gradient </title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$imagick1 = new Imagick();
+$imagick1->newPseudoImage(200, 200, 'gradient:black-white');
+$arguments = array(9, -90);
+$imagick1->functionImage(Imagick::FUNCTION_SINUSOID, $arguments);
+
+$imagick2 = new Imagick();
+$imagick2->newPseudoImage(200, 200, 'gradient:black-white');
+$arguments = array(0.5, 0);
+$imagick2->functionImage(Imagick::FUNCTION_SINUSOID, $arguments);
+$imagick1->compositeimage($imagick2, Imagick::COMPOSITE_MULTIPLY, 0, 0);
+
+header("Content-Type: image/png");
+$imagick1->setImageFormat("png");
+echo $imagick1->getImageBlob();
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <mediaobject>
+ <alt>Output of create complex gradient</alt>
+ <imageobject>
+ <imagedata
fileref="en/reference/imagick/figures/functionImage_multiplied.png"/>
+ </imageobject>
+ </mediaobject>
+ </example>
+
+
+ </para>
+ </refsect1>
+
+
</refentry>
<!-- Keep this comment at the end of the file
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52401
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52401
------------------------------------------------------------------
--
https://edit.php.net/
This email is send automatically by the Php Docbook Online Editor.