Contributions are ready for review

From: Date: Mon, 19 Nov 2018 13:00:03 +0000
Subject: Contributions are ready for review
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969387085@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 : ----------------------- Modified: en/chapters/intro.xml By: Barb H. on 2017-12-01 18:38:55 =================================================================== --- en/chapters/intro.xml +++ en/chapters/intro.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 345139 $ --> +<!-- $Revision: 342891 $ --> <chapter xml:id="introduction" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <info><title>Introduction</title></info> @@ -31,39 +31,55 @@ ?> </body> + <refsect1 role="description"><!-- {{{ --> + &reftitle.description; + <methodsynopsis> + <!-- Example: All functions have this --> + <type>thereturned type</type><methodname>func_name</methodname> + <!-- Example: Required parameter --> + <methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam> + <!-- Example: Optional parameter, also by reference --> + <methodparam choice="opt"><type>int</type><parameter role="reference">secondparameter</parameter></methodparam> + <!-- Example: If no methodparams exist (void), use this --> + <void /> + </methodsynopsis> + <para> + The function description goes here. + </para> + </refsect1><!-- }}} --> </html> ]]> </programlisting> </example> </para> <para> - Instead of lots of commands to output HTML (as seen in C or Perl), + Rather than require a lot of commands to output HTML (as seen in C or Perl), PHP pages contain HTML with embedded code that does "something" (in this case, output "Hi, I'm a PHP script!"). The PHP code is enclosed in special <link linkend="language.basic-syntax.phpmode">start and end processing instructions <code>&lt;?php</code> and <code>?&gt;</code></link> - that allow you to jump into and out of "PHP mode." + that allow you to jump in and out of "PHP mode." </para> <para> What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server, generating HTML which - is then sent to the client. The client would receive + is then sent to the client. The client receives the results of running that script, but would not know what the underlying code was. You can even configure your web server - to process all your HTML files with PHP, and then there's really no + to process all your HTML files with PHP, so there's really no way that users can tell what you have up your sleeve. </para> <para> - The best things in using PHP are that it is extremely simple + The best thing about using PHP is that it is extremely simple for a newcomer, but offers many advanced features for - a professional programmer. Don't be afraid reading the long - list of PHP's features. You can jump in, in a short time, and + a professional programmer. Don't be afraid to read the long + list of PHP's features. You can jump in and start writing simple scripts in a few hours. </para> <para> Although PHP's development is focused on server-side scripting, - you can do much more with it. Read on, and see more in the + you can do much more with it. To find out how much more, read the <link linkend="intro-whatcando">What can PHP do?</link> section, or go right to the <link linkend="tutorial">introductory tutorial</link> if you are only interested in web programming. @@ -74,81 +90,93 @@ <info><title>What can PHP do?</title></info> <para> Anything. PHP is mainly focused on server-side scripting, - so you can do anything any other CGI program can do, such + so you can do the same things any other CGI program can do, such as collect form data, generate dynamic page content, or - send and receive cookies. But PHP can do much more. + send and receive cookies. And PHP can do much more. </para> <para> There are three main areas where PHP scripts are used. <itemizedlist> <listitem> <simpara> - Server-side scripting. This is the most traditional - and main target field for PHP. You need three things - to make this work: the PHP parser (CGI or server - module), a web server and a web browser. You need to - run the web server, with a connected PHP installation. - You can access the PHP program output with a web browser, - viewing the PHP page through the server. All these can - run on your home machine if you are just experimenting - with PHP programming. See the + Server-Side Scripting: This is the most traditional + and main purpose of PHP. You need three pieces + to make this work: a PHP parser (CGI or server + module), a web server, and a web browser. The web server + runs with a connected PHP installation which parses PHP code. + You can see the PHP program output using a web browser + with a URL address to your files on the web server. If you + are just experimenting with PHP programming, all of these + pieces can run on your home machine. See the <link linkend="install">installation instructions</link> section for more information. </simpara> </listitem> <listitem> <simpara> - Command line scripting. You can make a PHP script - to run it without any server or browser. - You only need the PHP parser to use it this way. - This type of usage is ideal for scripts regularly - executed using cron (on *nix or Linux) or Task Scheduler (on + Command Line Scripting: You can run PHP code + without any server or browser. To be used this way, + only the PHP parser is required. + It is ideal for scripts regularly executed + using cron (on *nix or Linux) or Task Scheduler (on Windows). These scripts can also be used for simple text processing tasks. See the section about - <link linkend="features.commandline">Command line usage of PHP</link> + <link linkend="features.commandline">command line usage of PHP</link> for more information. </simpara> </listitem> <listitem> <simpara> - Writing desktop applications. PHP is probably - not the very best language to create a desktop - application with a graphical user interface, but if - you know PHP very well, and would like to use some - advanced PHP features in your client-side applications - you can also use PHP-GTK to write such programs. You also + Writing Desktop Applications: PHP is probably + not the best language to create a desktop + application with a graphical user interface, but the + PHP-GTK extension enables you to do this. As an + extension, it is not included in the main distribution. + If you know PHP very well and would like to use some + advanced PHP features in your client-side applications, + you can use PHP-GTK to write such programs. You also have the ability to write cross-platform applications this - way. PHP-GTK is an extension to PHP, not available in - the main distribution. If you are interested - in PHP-GTK, visit <link xlink:href="&url.php.gtk;">its + way. If you are interested in PHP-GTK, visit + <link xlink:href="&url.php.gtk;">its own website</link>. </simpara> </listitem> </itemizedlist> </para> <para> - PHP can be <link linkend="install">used</link> on all major operating systems, including + PHP can be <link linkend="install">installed</link> on all major operating systems, including Linux, many Unix variants (including HP-UX, Solaris and OpenBSD), - Microsoft Windows, macOS, RISC OS, and probably others. + Microsoft Windows, Mac OS X, RISC OS, and others. PHP also has support for most of the web servers today. This - includes Apache, IIS, and many others. And this includes any + includes Apache, IIS, and many others as well as any web server that can utilize the FastCGI PHP binary, like lighttpd - and nginx. PHP works as either a module, or as a CGI processor. + and nginx. PHP can work either as a module or as a CGI processor. </para> <para> - So with PHP, you have the freedom of choosing an operating - system and a web server. Furthermore, you also have the choice + Not only does PHP offer you the freedom to choose your + operating system and web server, you also have the choice of using procedural programming or object oriented - programming (OOP), or a mixture of them both. - </para> - <para> - With PHP you are not limited to output HTML. PHP's abilities - includes outputting images, PDF files and even Flash movies - (using libswf and Ming) generated on the fly. You can also - output easily any text, such as XHTML and any other XML file. - PHP can autogenerate these files, and save them in the file - system, instead of printing it out, forming a server-side - cache for your dynamic content. + programming (OOP) or even a mixture of both. And your output + is not limited to HTML. PHP can output + images, PDF files and Flash movies, using + libswf and Ming, generated on the fly. + </para> + <para> + PHP has many useful <link linkend="refs.basic.text"> + text processing</link> features including tools for + working with Perl compatible regular expressions (<link + linkend="book.pcre">PCRE</link>) and + <link linkend="refs.xml">parsing and accessing XML</link>. + PHP standardizes all of the XML extensions on the solid + base of <link linkend="book.libxml">libxml2</link>. + The XML feature set of PHP is extended with support for + <link linkend="book.simplexml">SimpleXML</link>, <link + linkend="book.xmlreader">XMLReader</link> and + <link linkend="book.xmlwriter">XMLWriter</link>. + These text processing features enable you to easily + create text-based files such as XHTML and other XML files. + PHP can print them or save them in the file system + forming a server-side cache for your dynamic content. </para> <para> One of the strongest and most significant features in PHP is its @@ -162,37 +190,31 @@ like CouchDB. </para> <para> - PHP also has support for talking to other services using protocols + PHP supports talking to other services using protocols such as LDAP, IMAP, SNMP, NNTP, POP3, HTTP, COM (on Windows) and countless others. You can also open raw network sockets and interact using any other protocol. PHP has support for the WDDX complex data exchange between virtually all Web programming - languages. Talking about interconnection, PHP has support for + languages. PHP interconnection even offers support for instantiation of Java objects and using them transparently as PHP objects. </para> <para> - PHP has useful <link linkend="refs.basic.text">text processing</link> features, - which includes the Perl compatible regular expressions (<link linkend="book.pcre">PCRE</link>), - and many extensions and tools to <link linkend="refs.xml">parse and access XML documents</link>. - PHP standardizes all of the XML extensions on the solid base of <link linkend="book.libxml">libxml2</link>, - and extends the feature set adding <link linkend="book.simplexml">SimpleXML</link>, - <link linkend="book.xmlreader">XMLReader</link> and <link linkend="book.xmlwriter">XMLWriter</link> support. - </para> - <para> - And many other interesting extensions exist, which are categorized both - <link linkend="extensions">alphabetically</link> and by <link linkend="funcref">category</link>. - And there are additional PECL extensions that may or may not be documented - within the PHP manual itself, like <link xlink:href="&url.xdebug;">XDebug</link>. - </para> - <para> - As you can see this page is not enough to list all - the features and benefits PHP can offer. Read on in - the sections about <link linkend="install">installing - PHP</link>, and see the <link linkend="funcref">function - reference</link> part for explanation of the extensions - mentioned here. + Many other interesting extensions exist in PHP which are categorized both + <link linkend="extensions">alphabetically</link> and by <link linkend="funcref">category</link>. There are additional PECL extensions + that may or may not be documented within the PHP manual itself, like <link xlink:href="&url.xdebug;">XDebug</link>. + </para> + <para> + This page is not enough to list all + the features and benefits PHP offers. Get started by + <link linkend="install">installing + PHP</link>. Read the <link linkend="funcref">function + reference</link> for explanations of the extensions to PHP + mentioned here. With your PHP environment set up, check out + <link linkend="tutorial">a simple tutorial</link> or explore + <link linkend="langref">the language reference</link> section. </para> + </section> </chapter> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=76914 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=76914 ------------------------------------------------------------------ Modified: en/install/unix/nginx.xml By: yangbai on 2018-06-08 02:34:57 =================================================================== --- en/install/unix/nginx.xml +++ en/install/unix/nginx.xml @@ -82,7 +82,7 @@ <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 /usr/local/etc/php-fpm.d/www.conf.default /usr/local/etc/php-fpm.d/www.conf cp sapi/fpm/php-fpm /usr/local/bin ]]> </screen> @@ -134,7 +134,7 @@ <informalexample xml:id="install.unix.nginx.modify.phpfpm"> <screen> <![CDATA[ -vim /usr/local/etc/php-fpm.conf +vim /usr/local/etc/php-fpm.d/www.conf ]]> </screen> </informalexample> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=83720 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=83720 ------------------------------------------------------------------ Modified: en/reference/memcached/ini.xml By: Julien Boulen on 2018-08-23 06:08:26 =================================================================== --- en/reference/memcached/ini.xml +++ en/reference/memcached/ini.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 330930 $ --> +<!-- $Revision: 330931 $ --> +<!-- Reviewed: No --> <section xml:id="memcached.configuration" xmlns="http://docbook.org/ns/docbook"> &reftitle.runtime; @@ -23,76 +24,179 @@ <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + <row> - <entry><link linkend="ini.memcached.sess-consistent-hash">memcached.sess_consistent_hash</link></entry> - <entry>0</entry> + <entry><link linkend="ini.memcached.sess-lock-wait-min">memcached.sess_lock_wait_min</link></entry> + <entry>150</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + <row> - <entry><link linkend="ini.memcached.sess-binary">memcached.sess_binary</link></entry> - <entry>0</entry> + <entry><link linkend="ini.memcached.sess-lock-wait-max">memcached.sess_lock_wait_max</link></entry> + <entry>150</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + + <row> + <entry><link linkend="ini.memcached.sess-lock-retries">memcached.sess_lock_retries</link></entry> + <entry>200</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> - <entry><link linkend="ini.memcached.sess-lock-wait">memcached.sess_lock_wait</link></entry> - <entry>150000</entry> + <entry><link linkend="ini.memcached.sess-lock-expire">memcached.sess_lock_expire</link></entry> + <entry>0</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + <row> <entry><link linkend="ini.memcached.sess-prefix">memcached.sess_prefix</link></entry> <entry>memc.sess.key.</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + + <row> + <entry><link linkend="ini.memcached.sess-persistent">memcached.sess_persistent</link></entry> + <entry>Off</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + + <row> + <entry><link linkend="ini.memcached.sess-consistent-hash">memcached.sess_consistent_hash</link></entry> + <entry>On</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + + <row> + <entry><link linkend="ini.memcached.sess-consistent-hash-type">memcached.sess_consistent_hash_type</link></entry> + <entry>ketama</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + + <row> + <entry><link linkend="ini.memcached.sess-remove-failed-servers">memcached.sess_remove_failed_servers</link></entry> + <entry>Off</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + + <row> + <entry><link linkend="ini.memcached.sess-server-failure-limit">memcached.sess_server_failure_limit</link></entry> + <entry>0</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> <entry><link linkend="ini.memcached.sess-number-of-replicas">memcached.sess_number_of_replicas</link></entry> <entry>0</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + + <row> + <entry><link linkend="ini.memcached.sess-binary-protocol">memcached.sess_binary_protocol</link></entry> + <entry>On</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> <entry><link linkend="ini.memcached.sess-randomize-replica-read">memcached.sess_randomize_replica_read</link></entry> - <entry>0</entry> + <entry>Off</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + + <row> + <entry><link linkend="ini.memcached.sess-connect-timeout">memcached.sess_connect_timeout</link></entry> + <entry>1000</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + + <row> + <entry><link linkend="ini.memcached.sess-sasl-username">memcached.sess_sasl_username</link></entry> + <entry>null</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + + <row> + <entry><link linkend="ini.memcached.sess-sasl-password">memcached.sess_sasl_password</link></entry> + <entry>null</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> <entry><link linkend="ini.memcached.sess-remove-failed">memcached.sess_remove_failed</link></entry> <entry>0</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + <row> <entry><link linkend="ini.memcached.compression-type">memcached.compression_type</link></entry> <entry>fastlz</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + <row> <entry><link linkend="ini.memcached.compression-factor">memcached.compression_factor</link></entry> <entry>1.3</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + <row> <entry><link linkend="ini.memcached.compression-threshold">memcached.compression_threshold</link></entry> <entry>2000</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + <row> <entry><link linkend="ini.memcached.serializer">memcached.serializer</link></entry> - <entry>php</entry> + <entry>igbinary</entry> <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> + <row> - <entry><link linkend="ini.memcached.use-sasl">memcached.use_sasl</link></entry> + <entry><link linkend="ini.memcached.store-retry-count">memcached.store_retry_count</link></entry> + <entry>2</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + + <row> + <entry><link linkend="ini.memcached.default-consistent-hash">memcached.default_consistent_hash</link></entry> + <entry>Off</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + + <row> + <entry><link linkend="ini.memcached.default-binary-protocol">memcached.default_binary_protocol</link></entry> + <entry>Off</entry> + <entry>PHP_INI_ALL</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + + <row> + <entry><link linkend="ini.memcached.default-connect-timeout">memcached.default_connect_timeout</link></entry> <entry>0</entry> - <entry>PHP_INI_SYSTEM</entry> + <entry>PHP_INI_ALL</entry> <entry><!-- leave empty, this will be filled by an automatic script --></entry> </row> </tbody> @@ -104,217 +208,360 @@ <para> <variablelist> - <varlistentry xml:id="ini.memcached.sess-locking"> - <term> - <parameter>memcached.sess_locking</parameter> - <type>integer</type> - </term> - <listitem> - <para> - Use session locking. Valid values: On, Off, the default is On. - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.sess-consistent-hash"> - <term> - <parameter>memcached.sess_consistent_hash</parameter> - <type>integer</type> - </term> - <listitem> - <para> - Memcached session consistent hash mode. If set to On, consistent - hashing is used for session handling. When consistent hashing is used, - one can add or remove cache node(s) without messing up too much with - existing keys. The default is Off. - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.sess-binary"> - <term> - <parameter>memcached.sess_binary</parameter> - <type>integer</type> - </term> - <listitem> - <para> - Use memcached session binary mode. Libmemcached replicas only work if - binary mode is enabled. The default is Off. - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.sess-lock-wait"> - <term> - <parameter>memcached.sess_lock_wait</parameter> - <type>integer</type> - </term> - <listitem> - <para> - Session spin lock retry wait time in microseconds. Be carefull when - setting this value. Valid values are integers, where 0 is interpreted - as the default value. Negative values result in a reduces locking to a - try lock. The default is 150000. - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.sess-prefix"> - <term> - <parameter>memcached.sess_prefix</parameter> - <type>string</type> - </term> - <listitem> - <para> - Memcached session key prefix. Valid values are strings less than 219 - bytes long. The default value is "memc.sess.key." - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.sess-number-of-replicas"> - <term> - <parameter>memcached.sess_number_of_replicas</parameter> - <type>integer</type> - </term> - <listitem> - <para> - The memcached session number of replicas. - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.sess-randomize-replica-read"> - <term> - <parameter>memcached.sess_randomize_replica_read</parameter> - <type>integer</type> - </term> - <listitem> - <para> - Memcached session replica read randomize. - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.sess-remove-failed"> - <term> - <parameter>memcached.sess_remove_failed</parameter> - <type>integer</type> - </term> - <listitem> - <para> - Allow failed memcached server to automatically be removed. - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.compression-type"> - <term> - <parameter>memcached.compression_type</parameter> - <type>string</type> - </term> - <listitem> - <para> - Set the compression type, valid values are: fastlz, zlib. The default - is fastlz. - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.compression-factor"> - <term> - <parameter>memcached.compression_factor</parameter> - <type>float</type> - </term> - <listitem> - <para> - Compression factor. Store compressed value only if the compression - factor (saving) exceeds the set limit. Store compressed if: - <literal>plain_len &gt; comp_len * factor</literal>. The default value - is 1.3 (23% space saving). - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.compression-threshold"> - <term> - <parameter>memcached.compression_threshold</parameter> - <type>integer</type> - </term> - <listitem> - <para> - The compression threshold. Do not compress serialized values below this - threshold. The default is 2000 bytes. - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.serializer"> - <term> - <parameter>memcached.serializer</parameter> - <type>string</type> - </term> - <listitem> - <para> - Set the default serializer for new memcached objects. Valid values - are: php, igbinary, json, json_array. - </para> - <variablelist> - <varlistentry> - <term>json</term> - <listitem> - <para> - Standard php JSON encoding. This serializer is fast and compact but - only works on UTF-8 encoded data and does not fully implement - serializing. See the JSON extension. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term>json_array</term> - <listitem> - <para> - As json, but decodes into arrays. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term>php</term> - <listitem> - <para> - The standard PHP serializer. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term>igbinary</term> - <listitem> - <para> - A binary serializer - </para> - </listitem> - </varlistentry> - </variablelist> - <para> - The default is igbinary if available and php otherwise. - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="ini.memcached.use-sasl"> - <term> - <parameter>memcached.use_sasl</parameter> - <type>integer</type> - </term> - <listitem> - <para> - Use SASL authentication for connections. Valid values: On, Off. The - default is Off. - </para> - </listitem> - </varlistentry> - + <term> + <parameter>memcached.sess_locking</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Use session locking. Valid values: On, Off, the default is On. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-lock-wait-min"> + <term> + <parameter>memcached.sess_lock_wait_min</parameter> + <type>integer</type> + </term> + <listitem> + <para> + The minimum time, in milliseconds, to wait between session lock attempts. This value is double on each lock retry until memcached.sess_lock_wait_max is reached, after which any further retries will take sess_lock_wait_max seconds. The default is 150. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-lock-wait-max"> + <term> + <parameter>memcached.sess_lock_wait_max</parameter> + <type>integer</type> + </term> + <listitem> + <para> + The maximum time, in milliseconds, to wait between session lock attempts. The default is 150. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-lock-retries"> + <term> + <parameter>memcached.sess_lock_retries</parameter> + <type>integer</type> + </term> + <listitem> + <para> + The number of times to retry locking the session lock, not including the first attempt. Default is 200. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-lock-expire"> + <term> + <parameter>memcached.sess_lock_retries</parameter> + <type>integer</type> + </term> + <listitem> + <para> + The time, in seconds, before a lock should release itself. Setting to 0 results in the default behaviour, which is to use PHP's max_execution_time. Default is 0. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-prefix"> + <term> + <parameter>memcached.sess_prefix</parameter> + <type>string</type> + </term> + <listitem> + <para> + Memcached session key prefix. Valid values are strings less than 219 + bytes long. The default value is "memc.sess.key." + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-persistent"> + <term> + <parameter>memcached.sess_persistent</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Whether or not to re-use the memcached connections corresponding to the value(s) of session.save_path after the execution of the script ends. Don't use this if certain settings (e.g. SASL settings, sess_binary_protocol) would be overridden between requests. Default is Off. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-consistent-hash"> + <term> + <parameter>memcached.sess_consistent_hash</parameter> + <type>integer</type> + </term> + <listitem> + <para> + If set to On, consistent hashing (libketama) is used for session handling. When consistent hashing is used, one can add or remove cache node(s) without messing up too much with existing keys. Default is On. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-consistent-hash-type"> + <term> + <parameter>memcached.sess_consistent_hash_type</parameter> + <type>string</type> + </term> + <listitem> + <para> + Memcached session consistent hash type if set to 'ketama', consistent hashing (libketama) is used for session handling (default for php-memcached 3.x) if set to 'ketama_weighted', weighted consistent hashing (libketama) is used for session handling (default for php-memcached 2.x). Default is "ketama". + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-remove-failed-servers"> + <term> + <parameter>memcached.sess_remove_failed_servers</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Allow failed memcached server to automatically be removed. Default is Off. (In previous versions, this setting was called memcached.sess_remove_failed). + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-server-failure-limit"> + <term> + <parameter>memcached.sess_server_failure_limit</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Set this value to enable the server be removed after configured number of continuous times connection failure. Default is 0. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-number-of-replicas"> + <term> + <parameter>memcached.sess_number_of_replicas</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Write data to a number of additional memcached servers. This is "poor man's HA" as libmemcached calls it. If this value is positive and sess_remove_failed is enabled when a memcached server fails the session will continue to be available from a replica. However, if the failed memcache server becomes available again it will read the session from there which could have old data or no data at all. Default is 0. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-binary-protocol"> + <term> + <parameter>memcached.sess_binary_protocol</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Use the memcached binary protocol for memcached sessions (Instead of the text protocol) libmemcached replicas work only if binary mode is enabled. However, certain proxies (such as twemproxy) will work only if the binary protocol is disabled. In older versions of php-memcached, this setting was Off and was called memcached.sess_binary. Default is On with libmemcached 1.0.18 or newer. Default is Off with older version. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-randomize-replica-read"> + <term> + <parameter>memcached.sess_randomize_replica_read</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Memcached session replica read randomize. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-connect-timeout"> + <term> + <parameter>memcached.sess_connect_timeout</parameter> + <type>integer</type> + </term> + <listitem> + <para> + memcached connect timeout value + In non-blocking mode this changes the value of the timeout during socket connection in milliseconds. Specifying -1 means an infinite timeout. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-sasl-username"> + <term> + <parameter>memcached.sess_sasl_username</parameter> + <type>string</type> + </term> + <listitem> + <para> + Session SASL username + Both username and password need to be set for SASL to be enabled In addition to this memcached.use_sasl needs to be on + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.sess-sasl-password"> + <term> + <parameter>memcached.sess_sasl_password</parameter> + <type>string</type> + </term> + <listitem> + <para> + Session SASL password + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.compression-type"> + <term> + <parameter>memcached.compression_type</parameter> + <type>string</type> + </term> + <listitem> + <para> + Set the compression type, valid values are: fastlz, zlib. The default + is fastlz. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.compression-factor"> + <term> + <parameter>memcached.compression_factor</parameter> + <type>float</type> + </term> + <listitem> + <para> + Compression factor. Store compressed value only if the compression + factor (saving) exceeds the set limit. Store compressed if: + <literal>plain_len &gt; comp_len * factor</literal>. The default value + is 1.3 (23% space saving). + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.compression-threshold"> + <term> + <parameter>memcached.compression_threshold</parameter> + <type>integer</type> + </term> + <listitem> + <para> + The compression threshold. Do not compress serialized values below this + threshold. The default is 2000 bytes. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.serializer"> + <term> + <parameter>memcached.serializer</parameter> + <type>string</type> + </term> + <listitem> + <para> + Set the default serializer for new memcached objects. Valid values + are: php, igbinary, json, json_array. + </para> + <variablelist> + <varlistentry> + <term>json</term> + <listitem> + <para> + Standard php JSON encoding. This serializer is fast and compact but + only works on UTF-8 encoded data and does not fully implement + serializing. See the JSON extension. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>json_array</term> + <listitem> + <para> + As json, but decodes into arrays. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>php</term> + <listitem> + <para> + The standard PHP serializer. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>igbinary</term> + <listitem> + <para> + A binary serializer + </para> + </listitem> + </varlistentry> + </variablelist> + <para> + The default is igbinary if available and php otherwise. + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.store-retry-count"> + <term> + <parameter>memcached.store_retry_count</parameter> + <type>integer</type> + </term> + <listitem> + <para> + The amount of retries for failed store commands. + This mechanism allows transparent fail-over to secondary servers when set/increment/decrement/setMulti operations fail on the desired server in a multi-server environment. the default is 2 + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.default-consistent-hash"> + <term> + <parameter>memcached.default_consistent_hash</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Sets the default for consistent hashing for new connections. (To configure consistent hashing for session connections, use memcached.sess_consistent_hash instead) + + If set to On, consistent hashing (libketama) is used for session handling. When consistent hashing is used, one can add or remove cache node(s) without messing up too much with existing keys default is Off + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.default-binary-protocol"> + <term> + <parameter>memcached.default_binary_protocol</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Sets the default memcached protocol for new connections. (To configure the memcached protocol for connections used by sessions, use memcached.sess_binary_protocol instead) + + If set to On, the memcached binary protocol is used by default. If set to Off, the memcached text protocol is used. Default is Off + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="ini.memcached.default-connect-timeout"> + <term> + <parameter>memcached.default_connect_timeout</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Sets the default memcached connection timeout for new connections. (To configure the memcached connection timeout for sessions, use memcached.sess_connect_timeout instead) + + In non-blocking mode this changes the value of the timeout. during socket connection in milliseconds. Specifying -1 means an infinite timeout. Specifying 0 means using the memcached library's default connection timeout. Default is 0. + </para> + </listitem> + </varlistentry> </variablelist> </para> </section> @@ -338,4 +585,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> No newline at end of file => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=85064 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=85064 ------------------------------------------------------------------ Modified: en/reference/sodium/functions/sodium-crypto-pwhash.xml By: Marcus Bointon on 2018-08-24 12:38:07 =================================================================== --- en/reference/sodium/functions/sodium-crypto-pwhash.xml +++ en/reference/sodium/functions/sodium-crypto-pwhash.xml @@ -19,11 +19,8 @@ <methodparam choice="opt"><type>int</type><parameter>alg</parameter></methodparam> </methodsynopsis> <para> - + This function provides low-level access to libsodium's crypto_pwhash key derivation function. Unless you have specific reason to use this function, you should use <function>sodium_crypto_pwhash_str</function> or <function>password_hash</function> functions instead. </para> - - &warn.undocumented.func; - </refsect1> <refsect1 role="parameters"> @@ -65,7 +62,7 @@ <term><parameter>memlimit</parameter></term> <listitem> <para> - The maximum amount of RAM that the function will use, in bytes. There are constants to help you choose an appropriate value, in order of size: <constant>SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE</constant>, <constant>SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE</constant>, and <constant>SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE</constant>. Typically these should be paired with the matching opslimit values. + The maximum amount of RAM that the function will use, in bytes. There are constants to help you choose an appropriate value, in order of size: <constant>SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE</constant>, <constant>SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE</constant>, and <constant>SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE</constant>. Typically these should be paired with the matching <parameter>opslimit</parameter> values. </para> </listitem> </varlistentry> @@ -73,7 +70,7 @@ <term><parameter>alg</parameter></term> <listitem> <para> - <type>integer</type> A number indicating the hash algorithm to use. By default <constant>SODIUM_CRYPTO_PWHASH_ALG_DEFAULT</constant> (the currently recommended algorithm, which can change from one version of libsodium to another), or explicitly using <constant>SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13</constant>, representing the Argon2id algorithm version 1.3. + <type>integer</type> A number indicating the hash algorithm to use. By default <constant>SODIUM_CRYPTO_PWHASH_ALG_DEFAULT</constant> (the currently recommended algorithm, which can change from one version of libsodium to another), or explicitly using <constant>SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13</constant>, representing the Argon2id algorithm version 1.3. </para> </listitem> </varlistentry> @@ -83,31 +80,42 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns the hashed password, &return.falseforfailure;. - </para> - <para> - The used algorithm, opslimit, memlimit and salt are embedded within the hash, so - all information needed to verify the hash is included. This allows - the <function>password_verify</function> function to verify the hash without - needing separate storage for the salt or algorithm information. + Returns the derived key, &return.falseforfailure;. The return value is a binary string of the hash, not an ASCII-encoded representation, and does not contain additional information about the parameters used to create the hash, so you will need to keep that information if you are ever going to verify the password in future. Use <function>sodium_crypto_pwhash_str</function> to avoid needing to do all that. </para> </refsect1> - - <refsect1 role="notes"> - &reftitle.notes; - <note> - <para> - It is recommended that you test this function on your servers, and adjust the <parameter>opslimit</parameter> and <parameter>memlimit</parameter> parameters - so that execution of the function takes less than 100 milliseconds on interactive systems, and also verify that it fits with your PHP memory_limit setting. - The constants will help you choose good limits for your hardware. - </para> - <para> - In order to produce the same password hash from the same password, the same algorithm, the same salt, and the same values for <parameter>opslimit</parameter> and <parameter>memlimit</parameter> must to be used. Therefore, these parameters must be stored for each user, or be used consistently for your whole application. - </para> - </note> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>password_hash</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +//Need to keep the salt if we're ever going to be able to check this password +$salt = random_bytes(SODIUM_CRYPTO_PWHASH_SALTBYTES); +//Using bin2hex to keep output readable +echo bin2hex( + sodium_crypto_pwhash( + 16, // == 128 bits + 'password', + $salt, + SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, + SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE, + SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13 + ) +); +?>]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +a18f346ba57992eb7e4ae6abf3fd30ee +]]> + </screen> + </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=85055 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=85055 ------------------------------------------------------------------ Modified: en/reference/sodium/functions/sodium-crypto-pwhash-str-needs-rehash.xml By: Marcus Bointon on 2018-08-24 13:12:50 =================================================================== --- en/reference/sodium/functions/sodium-crypto-pwhash-str-needs-rehash.xml +++ en/reference/sodium/functions/sodium-crypto-pwhash-str-needs-rehash.xml @@ -16,11 +16,9 @@ <methodparam><type>int</type><parameter>memlimit</parameter></methodparam> </methodsynopsis> <para> - + This function checks if the supplied hash was originally created using the same limit options as provided in the parameters. If not, it is assumed that it needs to be + rehashed. </para> - - &warn.undocumented.func; - </refsect1> <refsect1 role="parameters"> @@ -30,7 +28,7 @@ <term><parameter>password</parameter></term> <listitem> <para> - + &password.parameter.hash; A password hash previously generated with <function>sodium_crypto_pwhash_str</function>, not a literal plain-text password. </para> </listitem> </varlistentry> @@ -38,7 +36,7 @@ <term><parameter>opslimit</parameter></term> <listitem> <para> - + &password.parameter.opslimit; See <function>sodium_crypto_pwhash_str</function> for more information. </para> </listitem> </varlistentry> @@ -46,7 +44,7 @@ <term><parameter>memlimit</parameter></term> <listitem> <para> - + &password.parameter.memlimit; See <function>sodium_crypto_pwhash_str</function> for more information. </para> </listitem> </varlistentry> @@ -56,10 +54,69 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - + Returns &true; if the hash needs rehashing to match the target + <parameter>opslimit</parameter> and <parameter>memlimit</parameter> values, or &false; + otherwise. </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Usage of <function>sodium_crypto_pwhash_str_needs_rehash</function></title> + <programlisting role="php"> +<![CDATA[ +$password = 'password'; +$oldhash = sodium_crypto_pwhash_str( + $password, + SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, + SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE +); +//Verify the password against the hash +if (sodium_crypto_pwhash_str_verify($oldhash, $password)) { + //We've decided to make passwords stronger... + if (sodium_crypto_pwhash_str_needs_rehash( + $oldhash, + SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE, //increased + SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE + )) { + //Password needs rehashing + $newhash = sodium_crypto_pwhash_str( + $password, + SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE, + SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE + ); + echo + "Password rehashedn", + $oldhash, "n", + $newhash; + } +} +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Password rehashed +$argon2id$v=19$m=65536,t=2,p=1$LHyGGVolOTYVc9FBAGZRlg$CPK25lx35sGnMx6L7uZwOPJBrCDaONPICjktliqcFOA +$argon2id$v=19$m=262144,t=3,p=1$GtpMTuPYkH/2t10JjxmyRg$cux42xUWV4TiXArrAGo+Hb9bGgGRKQl4W/OqYMilVK0 +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>sodium_crypto_pwhash_str</function></member> + <member><function>password_needs_rehash</function></member> + </simplelist> + </para> + </refsect1> + </refentry> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=85059 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=85059 ------------------------------------------------------------------ Modified: en/reference/sodium/functions/sodium-crypto-pwhash-str.xml By: Marcus Bointon on 2018-08-24 13:12:57 =================================================================== --- en/reference/sodium/functions/sodium-crypto-pwhash-str.xml +++ en/reference/sodium/functions/sodium-crypto-pwhash-str.xml @@ -4,7 +4,7 @@ <refentry xml:id="function.sodium-crypto-pwhash-str" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>sodium_crypto_pwhash_str</refname> - <refpurpose>Get an ASCII encoded hash</refpurpose> + <refpurpose>Get an ASCII-encoded hash</refpurpose> </refnamediv> <refsect1 role="description"> @@ -16,11 +16,8 @@ <methodparam><type>int</type><parameter>memlimit</parameter></methodparam> </methodsynopsis> <para> - +Uses a CPU- and memory-hard hash algorithm along with a randomly-generated salt, and memory and CPU limits to generate an ASCII-encoded hash suitable for password storage. </para> - - &warn.undocumented.func; - </refsect1> <refsect1 role="parameters"> @@ -30,7 +27,7 @@ <term><parameter>password</parameter></term> <listitem> <para> - + <type>string</type>; The password to generate a hash for. </para> </listitem> </varlistentry> @@ -38,7 +35,7 @@ <term><parameter>opslimit</parameter></term> <listitem> <para> - + Represents a maximum amount of computations to perform. Raising this number will make the function require more CPU cycles to compute a key. There are constants available to set the operations limit to appropriate values depending on intended use, in order of strength: <constant>SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE</constant>, <constant>SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE</constant> and <constant>SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE</constant>. </para> </listitem> </varlistentry> @@ -46,7 +43,7 @@ <term><parameter>memlimit</parameter></term> <listitem> <para> - + The maximum amount of RAM that the function will use, in bytes. There are constants to help you choose an appropriate value, in order of size: <constant>SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE</constant>, <constant>SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE</constant>, and <constant>SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE</constant>. Typically these should be paired with the matching opslimit values. </para> </listitem> </varlistentry> @@ -56,7 +53,61 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - + Returns the hashed password, &return.falseforfailure;. + </para> + <para> + In order to produce the same password hash from the same password, the same values for <parameter>opslimit</parameter> and <parameter>memlimit</parameter> must be used. These are embedded within the generated hash, so + everything that's needed to verify the hash is included. This allows + the <function>sodium_crypto_pwhash_str_verify</function> function to verify the hash without + needing separate storage for the other parameters. + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + Hashes are calculated using the Argon2ID algorithm, providing resistance to both GPU and side-channel attacks. In contrast to the <function>password_hash</function> function, there is no salt parameter (a salt is generated automatically), and the <parameter>opslimit</parameter> and <parameter>memlimit</parameter> parameters are not optional. + </para> + </note> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>password_hash</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$password = 'password'; +echo sodium_crypto_pwhash_str( + $password, + SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, + SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE +); +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +$argon2id$v=19$m=65536,t=2,p=1$oWIfdaXwWwhVmovOBc2NAQ$EbsZ+JnZyyavkafS0hoc4HdaOB0ILWZESAZ7kVGa+Iw +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>sodium_crypto_pwhash_str_verify</function></member> + <member><function>sodium_crypto_pwhash</function></member> + <member><function>password_hash</function></member> + <member><function>password_verify</function></member> + <member><link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://download.libsodium.org/doc/password_hashing/the_argon2i_function.html">Libsodium Argon2 docs</link></member> + </simplelist> </para> </refsect1> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=85054 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=85054 ------------------------------------------------------------------ Modified: en/reference/sodium/functions/sodium-crypto-pwhash-str-verify.xml By: Marcus Bointon on 2018-08-24 13:14:53 =================================================================== --- en/reference/sodium/functions/sodium-crypto-pwhash-str-verify.xml +++ en/reference/sodium/functions/sodium-crypto-pwhash-str-verify.xml @@ -4,7 +4,7 @@ <refentry xml:id="function.sodium-crypto-pwhash-str-verify" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>sodium_crypto_pwhash_str_verify</refname> - <refpurpose>Verify that hash is a valid password verification string</refpurpose> + <refpurpose>Verifies that a password matches a hash</refpurpose> </refnamediv> <refsect1 role="description"> @@ -15,10 +15,9 @@ <methodparam><type>string</type><parameter>password</parameter></methodparam> </methodsynopsis> <para> - + Checks that a password hash created using <function>sodium_crypto_pwhash_str</function> matches a given plain-text password. Note that the parameters are in the opposite order to the same parameters in the similar <function>password_hash</function> function. </para> - &warn.undocumented.func; </refsect1> @@ -29,7 +28,7 @@ <term><parameter>hash</parameter></term> <listitem> <para> - + &password.parameter.hash; </para> </listitem> </varlistentry> @@ -37,7 +36,7 @@ <term><parameter>password</parameter></term> <listitem> <para> - + &password.parameter.password; </para> </listitem> </varlistentry> @@ -47,10 +46,29 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - + Returns &true; if the password and hash match, or &false; otherwise. </para> </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + Hashes are calculated using the Argon2ID algorithm, providing resistance to both GPU and side-channel attacks. + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>sodium_crypto_pwhash_str</function></member> + <member><function>password_hash</function></member> + <member><function>password_verify</function></member> + </simplelist> + </para> + </refsect1> </refentry> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=85058 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=85058 ------------------------------------------------------------------ Modified: en/reference/sodium/functions/sodium-crypto-sign-verify-detached.xml By: Craig Francis on 2018-08-26 12:43:21 =================================================================== --- en/reference/sodium/functions/sodium-crypto-sign-verify-detached.xml +++ en/reference/sodium/functions/sodium-crypto-sign-verify-detached.xml @@ -13,7 +13,7 @@ <type>bool</type><methodname>sodium_crypto_sign_verify_detached</methodname> <methodparam><type>string</type><parameter>signature</parameter></methodparam> <methodparam><type>string</type><parameter>msg</parameter></methodparam> - <methodparam><type>string</type><parameter>key</parameter></methodparam> + <methodparam><type>string</type><parameter>public_key</parameter></methodparam> </methodsynopsis> <para> @@ -43,7 +43,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>key</parameter></term> + <term><parameter>public_key</parameter></term> <listitem> <para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=85091 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=85091 ------------------------------------------------------------------ Modified: en/reference/sodium/functions/sodium-crypto-sign-open.xml By: Craig Francis on 2018-08-26 12:43:31 =================================================================== --- en/reference/sodium/functions/sodium-crypto-sign-open.xml +++ en/reference/sodium/functions/sodium-crypto-sign-open.xml @@ -12,7 +12,7 @@ <methodsynopsis> <type>string</type><methodname>sodium_crypto_sign_open</methodname> <methodparam><type>string</type><parameter>string</parameter></methodparam> - <methodparam><type>string</type><parameter>keypair</parameter></methodparam> + <methodparam><type>string</type><parameter>public_key</parameter></methodparam> </methodsynopsis> <para> @@ -34,7 +34,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>keypair</parameter></term> + <term><parameter>public_key</parameter></term> <listitem> <para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=85090 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=85090 ------------------------------------------------------------------ Modified: en/language/oop5/traits.xml By: pmmaga on 2018-10-05 11:30:17 =================================================================== --- en/language/oop5/traits.xml +++ en/language/oop5/traits.xml @@ -328,40 +328,6 @@ </example> </sect2> - <sect2 xml:id="language.oop5.traits.abstract"> - <title>Abstract Trait Members</title> - <para> - Traits support the use of abstract methods in order to impose requirements - upon the exhibiting class. - </para> - <example xml:id="language.oop5.traits.abstract.ex1"> - <title>Express Requirements by Abstract Methods</title> - <programlisting role="php"> -<![CDATA[ -<?php -trait Hello { - public function sayHelloWorld() { - echo 'Hello'.$this->getWorld(); - } - abstract public function getWorld(); -} - -class MyHelloWorld { - private $world; - use Hello; - public function getWorld() { - return $this->world; - } - public function setWorld($val) { - $this->world = $val; - } -} -?> -]]> - </programlisting> - </example> - </sect2> - <sect2 xml:id="language.oop5.traits.static"> <title>Static Trait Members</title> <para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=85559 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=85559 ------------------------------------------------------------------ -- https://edit.php.net/ This email is send automatically by the Php Docbook Online Editor.

« previous php.doc (#969387085) next »