Install Apache2.4 + PHP5.4 + Mysql5.7 and apache2.4php5.4 _ PHP in Windows.

Source: Internet
Author: User
Install Apache2.4 + PHP5.4 + Mysql5.7 and apache2.4php5.4 in Windows. Install Apache2.4 + PHP5.4 + Mysql5.7 and apache2.4php5.4 in Windows. note: the installation process described in this article passes the test under Win7x86. the download links provided by Baidu Cloud are all 32-bit installation packages, to install Apache2.4 + PHP5.4 + Mysql5.7 and apache2.4php5.4 in Windows
Note: the installation process described in this article passes the test under Win7 x86. The Baidu Cloud Download links provided are all 32-bit installation packages. if you need a 64-bit installation package for Apache and PHP, please download it from the official website! 1. install Apache2.4.12

Apache official: 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, which can be directly decompressed to the desired location. (C: \ Web \ Acpache24 is used as an example)

2. use notepad to open the httpd. conf file under Apache24 \ conf.

(1) change Define SRVROOT "/Apache24" to Define SRVROOT "C:/Web/Apache24", which is the location where the Apache program is decompressed and stored. (Note that a forward slash is used here, which is different from the path separator in Windows, the same below)

// Row 3 ServerRoot "$ {SRVROOT}" similarly changed to ServerRoot "C:/Web/Apache24"

(2) row 220th # ServerName localhost: remove "#" before 80

(3) change "$ {SRVROOT}/htdocs" to DocumentRoot "C:/www" (create a www folder under drive C first, that is, the path of the root directory of the website. you can also set it to another path based on your own situation)

245th rows Similarly

(4) change 278th rows of DirectoryIndex index.html to DirectoryIndex index.html index. php index.htm to support more pages including php.

3. start Apache: open cmd and enter the command as shown in. if httpd. if the conf configuration is correct, enter httpd and press enter without any prompt (note: You cannot close this command window; otherwise, apache will close it)

Http://jingyan.baidu.com/article/4f7d57129fa86e1a201927de.htmlsolution

Open a cmd window as an administrator and enter the command as shown in. the string after-n is the service name. you can also define it as another one, after the installation is successful, a prompt will be displayed in cmd, and you can see a service named "Apache24" in "service". then you can manage the Apache service here.

Run cmd in administrator mode.

(4) after the installation, we can use apachemonitor.exe under the Apache24 \ binfolder to manage the Apache service. this software will also be displayed in the taskbar to facilitate the management of Apache running.

Http://pan.baidu.com/s/1o6zKHmi

1. the downloaded file is a compressed package, which can be directly decompressed to the desired location. (Take C: \ Web \ PHP as an example)

2. copy php. ini-development and change it to PHP. ini.

3. open httpd. conf under Apache24 \ conf and add

# 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"

It is used to support PHP. the content of the two strings is the PHP path, which needs to be adjusted based on the location of the PHP decompression.

4. restart the Apache server

5. test: delete other files in the C: \ www folder and create an index. php file. the content is as follows:

Phpinfo ();

?>

After saving the file, open the browser and access http: // localhost. if the php information appears, it indicates that php has been successfully installed.

Now the basic PHP installation is complete!

3. install Mysql5.7.2.0

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

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

1. after downloading the package, run the installation file to install it.

2. modify php. ini to support Mysql

(1) line 1 extension_dir = "ext", remove the semicolon ";" and change it to extension_dir = "C: \ Web \ PHP \ ext"

(2) remove rows 871st and 872 from the previous line ";"

Extension = php_mysql.dll

Extension = php_mysqli.dll

Note: There are a lot of DLL in lines 859th to 896th. if you want to use it, remove the previous.

(3) restart Apache

Note: the installation process described in this article passes the test in Win7 x86. the download links provided by Baidu Cloud are all 32-bit installation packages. if necessary...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.