Configuration steps of Apache + Php + MySQL under windows8.1, windows8.1apache _ PHP Tutorial

Source: Internet
Author: User
Tags mysql connect
In windows8.1, configure Apache + Php + MySQL and windows8.1apache. For configuration steps of Apache + Php + MySQL under windows8.1, run apache: Apache2.4.6Win64PHP: PHP5.5VC11x64NonThreadSafeMySql: 5.5win64Mysql to install: Double-click Apache + Php + MySQL under windows8.1 to configure windows8.1apache.

Software version:

Apache: Apache 2.4.6 Win64

PHP: PHP 5.5 VC11 x64 Non Thread Safe

MySql: 5.5 win64

Mysql installation:

Double-click "run" to set the user name, password, and encoding (utf8 ).

PHP configuration:

1. decompress the downloaded zip file to a directory. in this tutorial, enter D: \ server \ php.

2. copy the php. ini-development file and change it to php. ini;

3. search for the keyword php_mysqli.dll in the php. ini file, remove ";" before the row, and enable mysql extension (using mysql database );

4. search for the keyword extension_dir and change it to extension_dir = "D:/server/php/ext" (depending on the specific directory );

5. modify in sequence

Support session: session. save_path = "D:/service/temp"Note:Create a folder and have the write permission (otherwise, cross-page session is lost ).

Upload file directory configuration: upload_tmp_dir = "D:/service/temp"

Time zone configuration: date. timezone = Asia/Shanghai

Apache configuration:

1. decompress the downloaded zip file to the server folder of drive D.: D: \ server \ Apache24

2. locate the httpd. conf file in the conf directory and add the file to the LoadModule. The directory is modified according to the php directory.

LoadModule php5_module "D:/server/php/php5apache2_4.dll" // phpfensi.com

PHPIniDir "D:/server/php"

3. locate AddType and add the following content to it:

AddType application/x-httpd-php.php

AddType application/x-httpd-php.html

Default homepage settings: DirectoryIndex. php index.html

4. if you want to modify the apache port, locate Listen 80. for example, change it to Listen 8081.

5. install the apache service.
Open a dos window as an administrator. if it is not an administrator, an error is reported. The win8 and win8.1 systems can search by C on the start page,First:Command Prompt, right-click, and select run as administrator.
The default command prompt path is:C: \ windows \ system32Assume that you have added the apache24 folder to the C root directory by following the preceding steps. enter: cd c: \ apache24 \ bin in the command prompt and press enter to enter the bin folder, then enter httpd.exe-k install. (Of course, start | stop | restart is always used for the "-k" parameter and httpd.exe-k start | stop | restart" parameter .)
If the installation is successful, you can double-click apachemonitor.exe under your apachedirectory to manage the apache service.
Test configuration:
View http: // localhost/index.html. (if you have modified the port, for example, http: // localhost: 8088/index.html in this tutorial, "It works!" is displayed !", Indicates that apache is successfully started.
Create an index. php file in the directory C: \ Apache24 \ htdocs (default apache website directory,
<? Phpphpinfo ();?>
Browse: http: // localhost/index. php. if you have modified the port, for example, http: // localhost: 8088/index. php in this tutorial
Display the php version information page, that isSuccessful:
Test the mysql connection. create the mysql. php file in the directory just now, as shown below:

<?php$connect=new mysqli("localhost","root","root","test");if(!$connect) echo "Mysql Connect Error!";else echo "mysql success";$connect->close();?>

Page opensMysql. php, Output if successfulMysql success

The above is the configuration steps of Apache + Php + MySQL in windows8.1. There may be some shortcomings. I hope you can add them.

Ghost software version: apache: Apache 2.4.6 Win64 PHP: PHP 5.5 VC11 x64 Non Thread Safe MySql: 5.5 win64 Mysql installation: Double-click to run...

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.