windows8.1 Construction Configuration Apache+php+mysql

Source: Internet
Author: User
Tags mysql connect

Software version:

Apache:apache 2.4.10 Win64 Http://www.apachelounge.com/download/VC11/binaries/httpd-2.4.10-win64-VC11.zip

PHP:VC11 x64 Thread Safe http://windows.php.net/downloads/releases/php-5.6.0-Win32-VC11-x64.zip

mysql:5.5 Win64

Visual C + + redistributable for visual Studio Http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAA B-fe9ac1f60237/vsu4/vcredist_x64.exe

MySQL Installation:

Double-click Run, set user name, password, encoding (UTF8), step omitted!

PHP Configuration:

1, unzip the downloaded zip file to a directory, this tutorial is: D:\Program files\php

2, copy the file php.ini-development and renamed to PHP.ini;

3. Search for the keyword php_mysqli.dll in the php.ini file, remove the ";" in front of the line, and open the MySQL extension (using MySQL database);

4, search keyword Extension_dir, modified to: Extension_dir = "D:/program files/php/ext" (depending on the specific directory);

5, in turn, modify

Support Session:session.save_path = "E:/temp"
Upload file directory configuration: upload_tmp_dir = "E:/temp"
Time zone configuration: Date.timezone = Asia/shanghai

Apache Configuration:

0. Install Visual C + + redistributable for Visual Studio 2012

1. Unzip the downloaded zip file to the C drive: C:\Apache24

2, Conf directory httpd.conf file, navigate to LoadModule, add after it: (directory depending on the specific PHP directory and modified)

LoadModule php5_module "D:/program files/php/php5apache2_4.dll"
Phpinidir "D:/program files/php"

3. Locate the AddType and add the following:

AddType application/x-httpd-php. php
AddType application/x-httpd-php. html

4, if you want to modify the Apache port, navigate to Listen 80, for example, modified to: Listen 8088

5, install Apache service.

As an administrator to open a DOS window, if not an administrator, will be an error. Win8 and win8.1 systems can be searched on the start page by C, first: command prompt, right-click, select Run as Administrator.

The default path for the command prompt is: C:\windows\system32, assuming that you put the Apache24 folder in the C packing directory as described above, enter at the command prompt: CD c:\apache24\bin, enter the Bin folder, Then enter: Httpd.exe-k install. (Of course, start | stop | Restart, you need to use the-K parameter, that is, Httpd.exe-k Start|stop|restart. )

If the installation is successful, you can then go to the bin in your Apache directory and double-click ApacheMonitor.exe to manage the Apache service.

Test configuration:

Browse http://localhost/index.html, (if you have modified the port, for example: http://localhost:8088/index.html in this tutorial), display "It works!", indicating that Apache started successfully.

In the directory: C:\Apache24\htdocs, (Apache default site Directory) new index.php file,

<? PHP Phpinfo ();? >

Browse: http://localhost/index.php, if the port has been modified, for example in this tutorial: http://localhost:8088/index.php

Displays the PHP version information page, which is the success:

To test the MySQL connection, in just the directory new file mysql.php, as follows:

<? PHP $connect=new mysqli ("localhost", "root", "root", "test"); if (! $connect Echo "Mysql Connect error!" ; Else Echo "MySQL success"; $connect-Close ();? >

Page open mysql.php, successful output MySQL success

windows8.1 Construction Configuration Apache+php+mysql

Related Article

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.