I always wanted to practice PHP. Recently, I had a little time to configure a PHP runtime environment on my machine. I used the Windows 7 platform and recorded this basic step. First download a PHP Latest Version: windows. php. netdownload I use php-5.3.2-Win32-VC9-x86 it has two versions one is VC6
I always wanted to practice PHP. Recently, I had some time to configure a PHP runtime environment on my machine. I used the WINDOWS 7 platform and recorded this basic step. First download a PHP Latest Version: http://windows.php.net/download/ I use php-5.3.2-Win32-VC9-x86 it has two versions one is VC6
I always wanted to practice PHP. Recently, I had a little spare time on my machine.ConfigurationA PHPRunEnvironmentI am using WINDOWS 7 platform and record this basic step.
Download the latest PHP version:
Http://windows.php.net/download/ I use a php-5.3.2-Win32-VC9-x86
It has two versions: VC6 and VC9. The difference is that the compiler is different. If you want to run it under IIS7, download VC9.
After downloading the file, install it directly. After installing it in D: \ Program Files \ PHP, directly modify the php. ini file under this directory.ConfigurationFile
Fastcgi. impersonate = 1
Cgi. fix_pathinfo = 1
Cgi. force_redirect = 0
Open_basedirPoint to the path of the website containing the php program. [Optional]
Extension_dir = "./ext"Note: In previous versions, absolute paths are often used here, but now this method can be used for general purposes.Configuration. You only need to remove the previous one.
To verify whether PHP is successfully installed, run the D: \ Program Files \ PHP Directory in the console andRunIf php-info is normal, a bunchConfigurationInformation.
Set IIS7
Make sure that yourSystemCGI is applied. If not, open it in turn.Control Panel | programs and components | enables or disables Windows, The English version of the corresponding operation isControl Panel | Programs and Features | Turn Windows Features On or Off.
View
Then set IIS to parse the PHP script:
Open the IIS manager, select your machine name, select the handler ing function in the function view on the right, and select Add managed handler on the right. In the dialog box, enter: *. php: FastCgiModule. Enter the CGI program in the directory where you install PHP in the last box.
D: \ Program Files \ PHP \ php-cgi.exe
Verification: Create a new website and write the test. php file
Phpinfo ();
?>
You can view the file directly on IIS to displayConfiguration.
- Fastcgi. impersonate = 1
- Cgi. fix_pathinfo = 1
- Cgi. force_redirect = 0
- Open_basedirPoint to the path of the website containing the php program. [Optional]
- Extension_dir = "./ext"Note: In previous versions, absolute paths are often used here, but now this method can be used for general purposes.Configuration.