windows8.1 Build Configuration apache+php+mysql,windows8.1apache_php Tutorial

Source: Internet
Author: User
Tags mysql connect php development environment

windows8.1 Construction Configuration Apache+php+mysql,windows8.1apache


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,

 
  PHPphpinfo();? >

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


Win7 use mysql+ apache2+php5 build PHP development environment, detailed process?

1. Install Apache_2.2.4-win32-x86-no_ssl.msi to d:\phpWeb\APACHE\
Step: Next Step
2. Install Php-5.2.0-win32.zip to D:\phpWeb\php\
Step: (1) Unzip the package to D:\phpWeb\php\
(2) Locate the php.ini-dist in the PHP directory and rename it to php.ini and copy it to the Windows directory.
(3) Copy the Php5ts.dll,libmysql.dll in PHP directory to the System directory (SYSTEM/SYSTEM32)
3. Configure Apache
Step: (1) Open d:\phpWeb\APACHE\conf\httpd.conf this file
(2) Find DocumentRoot "D:/phpweb/apache/htdocs" to change it to your Web directory (you can change it sometimes and it will go wrong)
(3) Find DirectoryIndex index.html This line, add Index.html.var index.htm index.php in the back
(4) Find #loadmodule ssl_module modules/mod_ssl.so This line, add a line at the back: LoadModule php5_module D:/phpweb/php/php5apache2_2.dll
(5) Find AddType application/x-gzip gz. tgz line, add a line at the back: AddType application/x-httpd-php. php
4. Configure PHP
Steps: (1) Find the C:\windows\php.ini and open it (just copied in)
(2) Find Extension_dir = "./" To Extension_dir = "D:/phpweb/php/ext"
(3) to find; Extension=php_mysql.dll to remove the preceding;
(4) Locate; Session.save_path = Remove the front, and set the path "D:/phpweb/php/session_temp" and create a new folder under the path session_temp

5.MySQL is ready.

Apache+php+mysql installation and configuration under Windows

Landlord, Hello, beginners are recommended to integrate the environment directly with PHP, such as Wampserver, in addition, if this aspect does not understand, the environment is set up, will not use, suggest you to php100 study, free and comparative system, personal feel good. Hope can help you, I wish you success!

http://www.bkjia.com/PHPjc/878814.html www.bkjia.com true http://www.bkjia.com/PHPjc/878814.html techarticle windows8.1 build configuration Apache+php+mysql,windows8.1apache software version: Apache:apache 2.4.10 Win64 http://www.apachelounge.com/ Download/vc11/binaries/httpd-2.4.10-win64-vc1 ...

  • 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.