PHP has a php.ini file to define its parameters and this file is usually located in C: \ Windows. In case you want to use both PHP4 and PHP5 on the same machine it is necessary to use a php.ini file specific to each version and tell the system where to find them.
To do this simply add two keys in the registry:
- for PHP4, go to HKEY_LOCAL_MACHINE \ SOFTWARE \ PHP (create the key if necessary) and add the value chain IniFilePath with value C: \ php4 (using of course the path to your installation of PHP4)
- for PHP5, go to HKEY_LOCAL_MACHINE \ SOFTWARE \ PHP (create the key if necessary), create a key 5 and add the value chain IniFilePath with value C: \ PHP5
Place each php.ini file in the directory for the version (C: \ PHP4 or C: \ PHP5).
You can check which version of PHP is used and php.ini in your site by placing a phpinfo.php page containing the following code:
<? phpinfo(); ?>
Vous obtiendrez par exemple une page PHP Version 4.4.9 avec une ligne Configuration File (php.ini) Path C:\PHP4\php.ini
Tags :
PHP ,
Windows 2003