Last update at :2024-05-20,Edit by888u
After buying a Windows system server (VPS), etc., we need a PHP environment to build our own projects. Here are the specific steps to manually configure the PHP environment on Windows Server 2012. It is suitable for novices using servers and VPS. php 5.6.12 Download address: http://windows.php.net/downloads/releases/php-5.6.19-nts-Win32-VC11-x86.zip
Visual Studio 2010 dynamic link library (both must be installed on 64-bit systems. If not installed, msvcr100.dll will be lost, resulting in a 500 error) Download address: http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x64.exe Download address: http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x86.exe
First, download and install the Visual Studio 2010 dynamic link library
Create the "php" folder in the root directory of drive C
Copy all downloaded php files to the "php" folder
Copy "php.ini-production" and rename it to "php.ini"
Open "php.ini" with Notepad and set the php module path extension_dir = “C:\php\ext”
Set php time zone date.timezone = Asia/Shanghai
Enable php short tags short_open_tag = on
Run PHP in CGI mode cgi.force_redirect = 0
fastcgi.impersonate = 1
cgi.rfc2616_headers = 1
PHP expansion section, open on demand
Enter the IIS control panel, select the home page, and click "Handler Mapping"
Click "Add Module Mapping"
Click "OK" after entering the content Request path: *.php Module: FastCgiModule Executable file (optional): C:\php\php-cgi.exe Name: FastCgi The solution for the FastCgiModule module not found is at the bottom of the post.
Click "Yes"
Click "FastCGI Settings"
Right click and click "Edit"
Change "Monitor changes to files" to the absolute location of php.ini C:\php\php.ini
Click the button to the right of "Aggregation Editor"
Add information and click "OK"
Name: PHP_FCGI_MAX_REQUESTS Value: 1000In the IIS Control Panel, click Default Documents
Add "index.php"
Create a new file named "index.php" under the default site
Edit "index.php", test PHP information, save and exit
Visit http://localhost/ and successfully configure PHP
Note: Some friends may not be able to find the "FastCgiModule" section. That is because CGI is not installed. You only need to select CGI in the "Add Roles and Functions Wizard" and install it.
Recommended site search: cancellation registration, domain name price, overseas virtual host space, domain name provider, Hong Kong server recommendation, php website space ip online agent, webmaster ip, foreign permanent free server recommendation, telecommunications host rental,
发表评论