Quickly configure pHP5 on Windows Server 2003

xiaoxiao2021-03-05  43

Author: <- Go left | right away -> http://spaces.msn.com/members/turn-right/

Today, I will teach you to quickly configure the PHP 5 website running environment on the IIS6 platform of Windows Server 2003.

Due to PHP 5 relative to PHP 4, the installation method has some differences. At the same time, I also joined some personal "fast" installation experiences to share with everyone, so this article will have a difference from everyone to see. First, unzip the downloaded PHP 5.0.3 into the "C: / PHP" directory, and the php.ini-recommented file is renamed for php.ini. The reason why it is different from some of the previous online tutorials, because the php.ini-recommented file is based on the standard configuration file, there is a large security optimization of the PHP service configuration, so personal This file is recommended to ensure safe and reliable server environment.

Now we have edited the php.ini profile, there is a place to configure, there are following: 1, at 508 rows, the directory of the positioning extension component will change to extension_dir = "./ext"

2, at the 509 row, close the cgi.force_redirect will; cgi.force_redirect = 1 is changed to cgi.force_redirect = 0 Note the front ";"; ".

3. Turn on the extended components you need in Windows Extensions usually, we need to enable the following two components extension = php_gd2.dll (GD2 library) Extension = php_mysql.dll (MySQL library)

In this way, the PHP configuration file has been basically configured.

Next, we start configuring IIS6 support for PHP in IIS. The previous operation method is the same as PHP 4, I will not say much. It should be noted that when PHP 4 we need "c: / php/php.exe" file to resolve the PHP document, but in PHP 5, we need the execution file of the specified CGI operating mode as "C: / PHP / PHP-CGI.exe. Since IIS6 compares the previous version, there is a stricter requirement for security. The unlicensed script type cannot be executed, so we need to add execution licenses for PHP type scripts in the Web service extension. The method is to add a web service extension, the extension is PHP, pointing to the file as "c: /php/php-cgi.exe", and check "license".

Is it configured in PHP 5 now? There is also the most important step. In system properties, we need to configure PHP directory paths to system levels. Inside the PATH class in the environment configuration, add the variable "C: / PHP". Then restart the system, PHP 5 is completed.

Why do you want to add the PHP 5 run directory to PATH? The reason is very simple, because this can no longer need us to copy some PHP DLL files and configuration files, disperse to the system directory. This will be more convenient when upgrading PHP 5 later.

Another: This method is equally valid for PHP 4.

转载请注明原文地址:https://www.9cbs.com/read-32827.html

New Post(0)