win7 64-bit Apache http server+PHP configuration
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: |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Alipay PHP...

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
