php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #74987
Patch patch-1501670016 revision 2017-08-02 15:03 UTC by johannes dot kingma at gmail dot com

Patch patch-1501670016 for PHP options/info functions Bug #74987

Patch version 2017-08-02 15:03 UTC

Return to Bug #74987 | Download this patch
Patch Revisions:

Developer: johannes.kingma@gmail.com

--- en/install/ini.xml
+++ en/install/ini.xml
@@ -33,12 +33,20 @@
     <listitem>
      <simpara>
       As of PHP 5.2.0, the location of the <literal>php.ini</literal> file
-      can be set for different versions of PHP. The following registry keys
+      can be set for different versions of PHP. The root of the registry keys dependents 32- or 64-bitness of the installed OS and PHP.
+      For 32-bit PHP on a 32-bit OS or a 64-bit PHP on a 64-bit OS use <literal>[(HKEY_LOCAL_MACHINE\SOFTWARE\PHP]</literal> for 32-bit version of PHP on a 64-bit OS use <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\PHP]</literal>] instead.
+      For same bitness installation the following registry keys
       are examined in order:
       <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z]</literal>,
       <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y]</literal> and
       <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x]</literal>, where
-      x, y and z mean the PHP major, minor and release versions. If there is a
+      x, y and z mean the PHP major, minor and release versions.
+      For 32 bit versions of PHP on a 64 bit OS the following registry keys are examined in order:
+      <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6421Node\PHP\x.y.z]</literal>,
+      <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6421Node\PHP\x.y]</literal> and
+      <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6421Node\PHP\x]</literal>, where
+      x, y and z mean the PHP major, minor and release versions.
+      If there is a
       value for <literal>IniFilePath</literal> in any of these keys, the first
       one found will be used as the location of the <literal>php.ini</literal>
       (Windows only).
@@ -46,7 +54,8 @@
     </listitem>
     <listitem>
      <simpara>
-      <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\PHP]</literal>, value of
+      <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\PHP]</literal> or
+      <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\PHP]</literal>, value of
       <literal>IniFilePath</literal> (Windows only).
      </simpara>
     </listitem>
@@ -88,13 +97,13 @@
   <para>
    <example>
     <title>&php.ini; Environment Variables</title>
-     <programlisting role="ini">
+    <programlisting role="ini">
 <![CDATA[
 ; PHP_MEMORY_LIMIT is taken from environment
 memory_limit = ${PHP_MEMORY_LIMIT}
 ]]>
-     </programlisting>
-    </example>
+    </programlisting>
+   </example>
   </para>
   <para>
    The &php.ini; directives handled by extensions are documented
@@ -136,7 +145,7 @@
   </para>
   <sect2 xml:id="configuration.file.scan">
    <title>Scan directories</title>
-
+   
    <para>
     It is possible to configure PHP to scan for .ini files in a directory
     after reading &php.ini;. This can be done at compile time by setting the
@@ -144,7 +153,7 @@
     PHP 5.2.0 and later, the scan directory can then be overridden at run time
     by setting the <varname>PHP_INI_SCAN_DIR</varname> environment variable.
    </para>
-
+   
    <para>
     It is possible to scan multiple directories by separating them with the
     platform-specific path separator (<literal>;</literal> on Windows, NetWare
@@ -154,7 +163,7 @@
     will also scan the directory given at compile time via
     <option role="configure">--with-config-file-scan-dir</option>.
    </para>
-
+   
    <para>
     Within each directory, PHP will scan all files ending in
     <literal>.ini</literal> in alphabetical order. A list of the files that
@@ -162,7 +171,7 @@
     <function>php_ini_scanned_files</function>, or by running PHP with the
     <option>--ini</option> option.
    </para>
-
+   
    <informalexample>
     <screen>
 <![CDATA[
@@ -189,7 +198,7 @@
   </sect2>
   <sect2 xml:id="configuration.file.changelog">
    &reftitle.changelog;
-
+   
    <para>
     <informaltable>
      <tgroup cols="2">
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 05:01:23 2021 UTC