search
HomeBackend DevelopmentPHP7How to add php7 and apache to wamp

A group of open source software commonly used to build dynamic websites or servers. They are all independent programs. However, because they are often used together, they have increasingly higher compatibility, and together they form a powerful Web. Application platform.

How to add php7 and apache to wamp

Recently, I added php7.0.5 to the php in my wamp, and also added a higher version of apache. I will record and share it here.

1. Instructions before configuration

  • My computer is win10, and the wamp used is wamp2.5 64-bit version. You can download the latest official version here http://www.wampserver.com/en/ (While writing this blog, I suddenly discovered that wamp3.0 has been released (dizzy~~~), which has php7 pre-installed. )

  • Take installing php7.0.5 and installing apache4.17 as an example. The installation of other versions is the same

  • Please go to the official website to download the PHP version you want to install: http://windows.php.net/download

  • You will find that you don’t know which php version to choose. Is it non thread safe or thread safe? When using wamp in windows, it is recommended to use thread safe. I will write a blog about their differences later. (In fact, there are instructions on the left side of the download page, but they are in English~~~)

2. wamp2.5 installs php7

in this directory: wamp/bin Create a new folder in /php and name it the corresponding php version number (the folder I created is php7.0.5)

Extract the downloaded php compressed package to this folder Next

Enter the php7.0.5 directory, copy a copy of php.ini-development for php.ini

Configure php.ini

Copy a copy from php.ini and name it phpForApache.ini

Copy wampserver.conf from the phpx.x.x folder that already exists by default to the newly added php folder (mine is php7.0.5), and open it for editing

$phpConf'apache'['LoadModuleName'] = 'php5_module';
$phpConf'apache'['LoadModuleFile'] = 'php5apache2_4.dll';
改为:
$phpConf'apache'['LoadModuleName'] = 'php7_module';
$phpConf'apache'['LoadModuleFile'] = 'php7apache2_4.dll';

If the added php version is not php7 but php5, the file usually does not need to be modified.

Exit wampserver and restart

Select the corresponding php version, create a new file and write phpinfo() function; and run. Check to see if the corresponding version is successfully enabled.

How to add php7 and apache to wamp

How to add php7 and apache to wamp

3. Add apache to wamp2.5

Create a new one in this directory: wamp/bin/apache The name of the folder is the corresponding apache version number (mine is 2.4.17)

Extract the downloaded apache compressed package to this folder

Enter the default apache directory (my wamp2.5 defaults to apache2.4.9), and then copy the wampserver.conf file to the new apache directory just created

Exit wampserver and restart

How to add php7 and apache to wamp

4. Note

After you complete the installation, if you directly open and modify the corresponding php.ini or httpd.conf and then restart the service, it will not take effect. I don’t know why. For wamp, you need to open the corresponding configuration file through wamp and modify it. This is very important. Only the modification of the configuration file opened in wamp is useful. It took me a long time to do this.

How to add php7 and apache to wamp

Recommended learning: php video tutorial

The above is the detailed content of How to add php7 and apache to wamp. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:CSDN. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.