Fix #74987: Registry keys no longer valid

Patch provided by johannes.kingma

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@343127 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2017-09-21 17:15:29 +00:00
parent bebf0a236a
commit 3f6dedbe5c

View file

@ -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 depends on 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>