1. First download the apache http server (I originally wanted to download it from the official website, but I couldn’t find it after searching for a long time, so I downloaded an old version online). I downloaded it from this website: http://download.csdn .net/download/chang87812/7175961 Download PHP: Similarly, I downloaded the latest version from the official website (URL: (http://windows.php.net/downloads/releases/) But then there was a problem after configuring it. The problem is: httpd: Syntax error on line 129 of D:/PHP/server/httpd-2.2-x64/conf/httpd.conf: Cannot load D:/ApaServ/php/php5apache2_4.dll into server: xd5xd2xb2xbbxb5xbdxd6xb8xb6xa8xb5xc4xc4xa3xbfxe9xa1xa3. The reason is: this file must correspond to the version, otherwise it cannot be loaded. Later, the same prompt appeared again, but it was changed to php5.4.8. At line 174, the activation context generation of "D:ApaServphpphp5apache2_4.dll" failed. Dependent assembly vcredist_x86.exe cannot be found. Later, the solution was: Reinstall vcredist_x86.exe. This was installed before I installed apache. The files inside may have been rewritten, so they cannot be found. I also looked online: I found the following files under something like C:Program FilesMicrosoft Visual Studio 8VCredi stDebug_NonRedistx86Microsoft.VC80.DebugCRT: I just thought of this after receiving this tip. Later, when installing php5.5, this error message appeared again. I installed the VC++2010 runtime library according to my own understanding at first, but no matter how I debugged, I still got this error. Later, I downloaded the highest version of VC from the Internet. ++2012 runtime library, it was successful immediately. (I found this reason on the Internet, but I haven’t put it into practice. I don’t want to install the VC++2012 runtime library anymore!!!) So I found an old version of PHP on the Internet, download URL: http://download.csdn.net/download/tonyyxm/5428271 2. Install Apache 1. Unlike 32-bit Apache, it can be packaged into an exe file and can be installed directly. First, unzip httpd-2.2.19-win64 to E:/server/ apache- httpd-2.2.19-win64/ (/*E is The drive letter where the specific server file is located */) 2. Run the command prompt as an administrator (Start-Programs-Accessories) and enter E:/server/apache-httpd-2.2.19-win64/ 3. Execute httpd -k install A problem occurred here: failed to open the winNT service manager Solution: It turns out that the software conflicts with the "User Account Control" (UAC) of Windows 7 during the software installation. Just turn off UAC first (Control Panel-User Accounts and Family Safety-System and Security-Action Center, there is "Change User Account Control" "Settings", change it to "Never notify". After completion, you will be prompted to restart. At this time, you need to restart) and then install it. There will be no problem. You can modify it back after the installation is completed.
4. Modify httpd.conf. The configuration here is the same as in the 32-bit system (1) Modify ServerRoot "E:/server/httpd-2.2.19-win64/" (2) Go down and you will see the function modules enabled by apache, such as: #LoadModule vhost_alias_module modules/mod_vhost_alias.so Module added later: LoadModule php5_module "E:/Server/php-5.3.6-Win32-VC9-x64/php5apache2_2.dll" PHPiniDir "E:/Server/php-5.3.6-Win32-VC9-x64/" AddType application/x-httpd-php .html .htm .php (3) Continue down and find the line DocumentRoot "E:/Code/PHP/" to set the web page file directory. This line should be modified to correspond to the 5. Execute httpd -k start in the command prompt again. If there is no error, the apache service starts successfully 6. Shut down the Apache server: execute httpd -k shutdown 3. Configure PHP 1. As mentioned above, decompress my php directory to E:/Server/php-5.3.6-Win32-VC9-x64/, which corresponds to the LoadModule location set in Apache in the previous step 2. Modify php.ini-development to php.ini 3. Open php.ini, find extension_dir, and modify its value to E:/Server/php-5.3.6-Win32-VC9-x64/ext/, which is the directory where the php file is located/ext 4. Find the extension list, remove the ";" in front of ;extension=php_gd2.dll, ;extension=php_mysql.dll, ;extension=php_mysqli.dll to enable the extension. Of course, the above extensions are for example only and can be adjusted according to the function. Although different requirements are required, please enable the corresponding extension 5. (Optional) Set the value of date.timezone to Asia/Shanghai, that is, date.timezone =Asia/Shanghai 6. Create a test.php file under E:/Code/PHP/ with the content
phpinfo(); ?> Then enter http://localhost/test.php in the browser address bar The above configuration process belongs to someone else: after I configured it, the following two problems occurred: 1. httpd: Could not reliably determine the server's fully qualified Solution: Foreword: Although apache can run, I saw the error httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168. x. Others occupy port 80 Solution: Change the port, open .apacheconfhttpd.conf, change all 80 in it to 81, save and restart apache, OK.After changing the port, visit the following URL: http://localhost:81/test.php Screenshot: |