Notes

Installation and debugging of PHP5 under WINDOWS

Step 1: php-5.1.6 is downloaded as a zip package, unzip it to C:\Php, of course, you can also go to other directories, there is your own decision, I choose C:\Php here, the latter is also used in the settings of this path.

Step 2: Then set the system environment variable Path=;C:\Php (environment variable setting first right click on “My Computer”, view “Properties”, select “Advanced “Environment Variables”, change the value of Path in “System Variables”, and add ;C:\Php after the original Path value). For php4 settings, here is not much to say, you can check the installation instructions in the Php4 installation package for more information.

Step 3: Modify Php.ini. In the root directory of php-5.1.6 there are two such files php.ini-recommended and php.ini-dist, both are configuration files for Php. php.ini-recommended is officially optimized and recommended, php.ini-dist is original. We are using php.ini-recommended here.

Open this file with Notepad or EditPlus and change the following items.

1. Modify the value of doc_root = to make it point to your IIS home directory, for example doc_root = “C:\Inetpub\wwwroot”; modify the value of extension_dir = to make it point to the extension file provided by Php, Php- 5.1.6 extension files are stored in the ext directory, which is different from Php4’s directory, we change it to extension_dir = “C:\PHP\ext”

2. Find ;extension=php_mysql.dll and remove the leading ; so that we can use MySql.

3. If you need to turn on debugging: Set error_reporting = E_ALL and display_errors = On in php.ini.

4. open short_open_tag = On register_globals = On

Other than that, there is no need to set anything else. Save the file and change the file name to php.ini, then copy this file to the C:\Windows directory.

Tagged ,

Leave a Reply

Your email address will not be published. Required fields are marked *