Detailed explanation of wamp building example tutorial
It’s been a long time since I set up an environment, and this time it went smoothly.
Let’s first review the principles of website operation.
OK, let’s get to the point. The wamp version of this environment is as follows:
Apache24: httpd-2.4.26-x64-vc11
php: php-5.6.30-Win32-VC11-x64
mysql:mysql-installer-community-5.5.56
1. The folder path is as follows:
(Because the default path in many places in the configuration file httpd.conf is Apache24, the folder name will not be changed for convenience)
2.Apache installation
Download and extract to Apache24
Prepare the Apache running environment Visual C++ 2012
Enter the command prompt Run the cmd run command to see if it can be run
Keep the cmd cursor flashing, that is, it is running. Test the address bar http://localhost. If the default homepage is displayed, it means it can run.
In most cases, we need to use Apache as a Windows server, so we need to install Apache
In cmd, under the above path, httpd -k install httpd -k start
This service has been added to the computer service.
In order to run the service through httpd.exe anywhere, you need to add environment variables. System---Advanced system settings---Environment variables.
3.PHP installation
Download and extract to the php folder, the nts version does not contain the php5apache2_4.dll file , cannot be loaded by Apache, select the ts version here.
In order to run php.exe in the cmd root directory, first set the environment variables.
-
After setting the environment variables, you can run the command php.exe -f php file path in the cmd root directory to run the PHP file, such as
<?php for($i=1;$i<=10;$i++){ echo "$i"; }?>
Copy after loginIn cmd mode,
12345678910
Copy after login*php will be displayed and can be run independently.
4. Configure httpd.conf, so that Apache can handle php
In the cmd root directory, check the modules loaded by Apache
httpd.exe -M
Copy after loginAdd the following to the httpd.conf file:
LoadModule php5_module D:/wamp/php/php5apache2_4.dll PHPIniDir "D:/wamp/php" AddType application/x-httpd-php .php .html .htm
Copy after login
5. Configure php.ini so that it can load other modules
Copy php.ini-development- copy and rename it to php.ini
修改时区 date.timezone=PRC 修改加载模块的路径 extension_dir = "D:/wamp/php/ext" 选择要加载的模块并去掉分号 extension=php_mysql.dll extension=php_mysqli.dll等等
Copy after loginYou can also view the loaded modules of php
### in the cmd root directoryphp.exe -M
Copy after login
6. Configure the virtual host
- Modify httpd.conf and remove the #. Enable settings
#Virtual hosts Include conf/extra/httpd-vhosts.conf
Copy after login - Modify httpd-vhost.conf
添加: <VirtualHost *:80> DocumentRoot "G:/color" ServerName color.com ErrorLog "logs/color.log" CustomLog "logs/color.log" common </VirtualHost>
Copy after login - Change httpd.conf The Require all denied comment is
<Directory /> AllowOverride none # Require all denied </Directory> 缺少这一步,会显示 403 Forbidden
Copy after login
- Download
- (
Select MSI Installer)
Installation is omitted. - Test whether it can run normally
- ## Log in to the mysql server
C:\>net stop mysql MySQL 服务正在停止. MySQL 服务已成功停止。 C:\>net start mysql MySQL 服务正在启动. MySQL 服务已经成功启动。
Copy after login C:\>mysql.exe -hlocalhost -uroot -proot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.56 MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
Copy after login
The above is the detailed content of Detailed explanation of wamp building example tutorial. For more information, please follow other related articles on the PHP Chinese website!

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

How to quickly build a statistical chart system under the Vue framework. In modern web applications, statistical charts are an essential component. As a popular front-end framework, Vue.js provides many convenient tools and components that can help us quickly build a statistical chart system. This article will introduce how to use the Vue framework and some plug-ins to build a simple statistical chart system. First, we need to prepare a Vue.js development environment, including installing Vue scaffolding and some related plug-ins. Execute the following command in the command line

This article involves two PHP integrated environments, both of which contain mysql + apache + php. The function of phpstudy is more powerful than wamp, and it is very simple and easy to use.

Players can collect different materials to build buildings when playing in the Mistlock Kingdom. Many players want to know whether to build buildings in the wild. Buildings cannot be built in the wild in the Mistlock Kingdom. They must be within the scope of the altar. . Can buildings be built in the wild in Mistlock Kingdom? Answer: No. 1. Buildings cannot be built in the wild areas of the Mist Lock Kingdom. 2. The building must be built within the scope of the altar. 3. Players can place the Spirit Fire Altar by themselves, but once they leave the range, they will not be able to construct buildings. 4. We can also directly dig a hole in the mountain as our home, so we don’t need to consume building materials. 5. There is a comfort mechanism in the buildings built by players themselves, that is to say, the better the interior, the higher the comfort. 6. High comfort will bring attribute bonuses to players, such as

Wampserver is a software package that can install Apache, PHP and MySQL on Windows computers. Develop and test PHP websites on your local computer easily with Wampserver. During the development process, we may need to modify the PHP configuration file php.ini. This article will introduce how to modify the php.ini file in Wampserver.

Best practices and precautions for building web servers under CentOS7 Introduction: In today's Internet era, web servers are one of the core components for building and hosting websites. CentOS7 is a powerful Linux distribution widely used in server environments. This article will explore the best practices and considerations for building a web server on CentOS7, and provide some code examples to help you better understand. 1. Install Apache HTTP server Apache is the most widely used w
![[Summary] Reasons and solutions why WAMP cannot parse PHP files](https://img.php.cn/upload/article/202303/22/2023032211181758796.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
WAMP is a free and open source web server software package that allows users to build a web server environment on Windows operating systems. However, when users try to run PHP files in WAMP, they may encounter unresolved errors. In this article, we will explore the reasons and solutions for why WAMP cannot parse PHP files.

PyTorch Installation Guide: Quickly set up a development environment in PyCharm PyTorch is one of the most popular frameworks in the current field of deep learning. It has the characteristics of ease of use and flexibility, and is favored by developers. This article will introduce how to quickly set up the PyTorch development environment in PyCharm, so that you can start the development of deep learning projects. Step 1: Install PyTorch First, we need to install PyTorch. The installation of PyTorch usually needs to take into account the system environment

In today's information-rich era, social media platforms have become the main way for people to obtain and share information. For individuals and enterprises, establishing an effective account network to achieve maximum dissemination of information and enhance influence has become an urgent challenge that needs to be solved. 1. How to build an account matrix? 1. Clarify the target audience. Before building an account matrix, the key is to clearly define the target audience and gain an in-depth understanding of their needs, interests, and consumption habits, so that a more targeted content strategy can be developed. 2. Choose the appropriate platform. According to the characteristics of the target group, choose the appropriate social media platform for layout. Currently, the mainstream social media platforms include Weibo, WeChat, Douyin, Kuaishou, etc. Each platform has its own unique user groups and communication characteristics, and the selection needs to be based on the actual situation.
