Home > Backend Development > PHP Tutorial > Install Apache2.4 PHP5.4 Mysql5.7 under Windows, apache2.4php5.4_PHP tutorial

Install Apache2.4 PHP5.4 Mysql5.7 under Windows, apache2.4php5.4_PHP tutorial

WBOY
Release: 2016-07-13 09:47:11
Original
1634 people have browsed it

Install Apache2.4 PHP5.4 Mysql5.7, apache2.4php5.4 under Windows

Note: The installation process written in the article is all passed under Win7 x86 For testing, the Baidu Cloud download links provided are all 32-bit installation packages. If you need 64-bit installation packages for Apache and PHP, please download them from the official website!

1. Install Apache2.4.12

Apache official download address: http://www.apachelounge.com/download/VC11/

32-bit installation package download link (Baidu Cloud): http://pan.baidu.com/s/1bnuH04J

1. The downloaded file is a compressed package, just unzip it and put it where you want to install it. (Here we take C:WebAcpache24 as an example)

2. Use Notepad to open the httpd.conf file under Apache24conf

 (1) Line 38 Define SRVROOT "/Apache24" is changed to Define SRVROOT "C:/Web/Apache24", which is the location where our Apache program is stored after decompression. (Note that forward slash is used here, which is different from the path separator under Windows, the same below)

//Line 39 ServerRoot "${SRVROOT}" is changed to ServerRoot "C:/Web/Apache24"

(2) Remove the "#" in front of #ServerName localhost:80 in line 220

 (3) Line 244 DocumentRoot "${SRVROOT}/htdocs" is changed to DocumentRoot "C:/www" (Here you need to first create a folder named www under the C drive , That is The path where the root directory of the website is located, or it can be set to other paths according to your own situation)

 Line 245 Similarly, change it to

 (4) Line 278 DirectoryIndex index.html is changed to DirectoryIndex index.html index.php index.htm, this is to support more default pages including php

3. Start Apache: Open cmd, enter the command as shown below. If the httpd.conf configuration is correct, there will be no prompt after entering httpd and pressing Enter (Note: You cannot close this command window , otherwise the apache service will be shut down )

Install Apache2.4 PHP5.4 Mysql5.7 under Windows, apache2.4php5.4_PHP tutorialhttp://jingyan.baidu.com/article/4f7d57129fa86e1a201927de.htmlSolution

Install Apache2.4 PHP5.4 Mysql5.7 under Windows, apache2.4php5.4_PHP tutorialRe-open a cmd window as an administrator and enter the command as shown below. The string after -n is the service name. You can also define it as something else. After the installation is successful, go to cmd There will be a prompt in "Services", and you can see a service called "Apache24" in "Services". You can then manage the Apache service here.

Install Apache2.4 PHP5.4 Mysql5.7 under Windows, apache2.4php5.4_PHP tutorialcmd needs to be run in administrator mode

 (4) After installation, we can manage the Apache service through ApacheMonitor.exe in the Apache24bin folder. This software will also be displayed in the taskbar, making it easier to manage Apache. Run

Install Apache2.4 PHP5.4 Mysql5.7 under Windows, apache2.4php5.4_PHP tutorialhttp://pan.baidu.com/s/1o6zKHmi

1. The downloaded file is a compressed package, just unzip it and put it where you want to install it. (Here we take C:WebPHP as an example)

2. Copy php.ini-development and rename it to PHP.ini

3. Open httpd.conf under Apache24conf and add

at the end of the file

# php5 support
LoadModule php5_module "C:/Web/PHP/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.initially
PHPIniDir "C:/Web/PHP"

is used to support PHP. The content in the two strings is the path of PHP, which needs to be adjusted according to the location of PHP decompression

4. Restart the Apache server

5. Test: Delete other files in the C:www folder and create a new index.php with the following content

phpinfo();

?>

After saving, open the browser and visit http://localhost. If the php information appears, it means that php has been successfully installed

Now the basic installation of PHP has been completed!

3. Install Mysql5.7.2.0

Mysql official download address: http://dev.mysql.com/downloads/mysql/

File download link (Baidu Cloud): http://pan.baidu.com/s/1dDk3YMH

1. Run the installation file directly after downloading to install

2. Modify php.ini to support Mysql

 (1) Line 721 extension_dir = "ext", remove the preceding semicolon ";" and change it to extension_dir ="C:WebPHPext"

(2) Lines 871 and 872 of , remove the preceding ";"

extension=php_mysql.dll

extension=php_mysqli.dll

Note: There are many DLLs on lines 859 to 896. Which do you want to use? Just remove the ";" in front of it.

 (3) Restart Apache

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1027449.htmlTechArticleInstalling Apache2.4 PHP5.4 Mysql5.7, apache2.4php5.4 under Windows Note: What is written in the article The installation process has been tested under Win7 x86. The Baidu Cloud download links provided are all 32-bit installation packages. If you need...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template