Win7 (64-bit) php5.5-apache2.4-mysql5.6 environment installation

Source: Internet
Author: User
Tags phpinfo

Original link http://jingyan.baidu.com/article/9faa723152c5d6473d28cb47.html tools/raw materials
  • php-5.5.10-win32-vc11-x64.zip:http://windows.php.net/download/

  • httpd-2.4.7-win64-vc11.zip:http://www.apachelounge.com/download/

  • mysql-5.6.16-winx64.zip:http://dev.mysql.com/downloads/mysql/

    Method/Step
    1. 1

      First, installation configuration Apache2.4.7 (Httpd-2.4.7-win64-vc11.zip)

      1. Unzip the downloaded installation package: Httpd-2.4.7-win64-vc11.zip put it in its own installation directory (my directory D:\phpEnv\Apache24)

    2. 2

      2. Then modify the http.conf (D:\phpEnv\Apache24\conf\http.conf) configuration file-use Notepad to open the line

      (1) Modify the root path of the ServerRoot Apache:

      (37 lines) ServerRoot "C:/apache24" changed to =>serverroot "D:/phpenv/apache24"

      (2) modify servername your host name:

      (217 lines) SERVERNAMEWWW.EXAMPLE.COM:80 removes the previous #, which is required when launching Apache from the command line.

      (3) modify DocumentRoot Apache access to the home folder directory, is the location of PHP, HTML code files. Apache default path is under Htdocs (D:\phpEnv\Apache24\htdocs), there will be a simple entry file index.html. This path can be modified on its own, and I will configure it in my own new folder, www (D:\phpEnv\www).

      (247 lines) DocumentRoot "C:/apache24/htdocs"

      <directory "C:/apache24/htdocs" >

      Change to =

      DocumentRoot "D:\phpEnv\www"

      <directory "D:\phpEnv\www" >

      (4) Modify the Portal file configuration: DirectoryIndex generally we are index.php, index.html, index.htm as the portal for Web projects. Apache Default portal only index.html need to add the other two support, of course, the settings of this portal file can be increased or decreased according to their own needs, if the requirements are more stringent can only write a index.php, so that the entry in the project can only be index.php

      (274 lines) <IfModuledir_module>

      Directoryindexindex.html

      </IfModule>

      Change to =

      <IfModuledir_module>

      DirectoryIndex index.php index.htm index.html

      </IfModule>

      (5) set the Serverscript directory:

      (358 lines) scriptalias/cgi-bin/"c:/apache24/cgi-bin/" to = = scriptalias/cgi-bin/"D:/phpenv/apache24/cgi-bin"

      (6) (380 lines)

      <directory "C:/apache24/cgi-bin" >

      AllowOverride None

      Options None

      Require all granted

      </Directory>

      Change to =

      <directory "D:/phpenv/apache24/cgi-bin" >

      AllowOverride None

      Options None

      Require all granted

      </Directory>

    3. 3

      3. You can start Apache next.

      Start---Run, enter cmd, and open a command prompt. Then enter the D:\phpEnv\Apache24\bin directory to enter httpd enter.

      You can test without an error (Keep the command window open).

      Put the index.html in the Apache24\htdocs directory in the D:\phpEnv\www directory, access to the browser will appear "It works" that the Apache has been properly installed and started. You can also write a simple index.html file or open it yourself.

    4. 4

      4. Add Apache to the window service startup and set it to boot

      Close the HTTPD service first (Close the command window)

      Reopen a new command window into the D:\phpEnv\Apache24\bin directory:

      The command to add the HTTP service is: Httpd.exe-kinstall-n "ServiceName" ServiceName is the name of the service, I added: Httpd.exe-k install-n "Apache24" After the command succeeds, you will be prompted to see the Apache24 Service in the Window service startup item.

      Then click on to start, if you do not want to set up the boot, you can also modify the startup type to Manual.

      If you want to uninstall this service, first stop the service and then enter Httpd.exe-k uninstall-n "Apache24" to uninstall the service.

      Of course, you can also start Apache by D:\phpEnv\Apache24\bin the ApacheMonitor.exe below, and there's not much to say.

      So the Apache configuration is basically done.

      END
    Method/Step 2
    1. 1

      two, installation configuration php5.5.10 (Php-5.5.10-win32-vc11-x64.zip)

      1, php-5.5.10-win32-vc11-x64.zip downloaded   extracted to the installation directory my is (D:\phpEnv\php)

      2, Copy the Php.ini-development file in the directory and rename it to php.ini. He is a PHP configuration file

      3, add PHP support for Apache services

      Open Apache configuration file http.conf at the end of the add

      # php5 support

      Loadmodulephp5_module d:/phpenv/php/php5apache2_4.dll

      addtypeapplication/ x-httpd-php. php. html. htm

      # configure Thepath to php.ini

      Phpinidir "d:/phpenv/php"

       

      Here I add in LoadModule below

      To ensure that your Php5apache2_4.dll file does exist php5.5 earlier version of the file does not have this, but the high version is already available, you can open the PHP installation directory to find this file

      Phpinidir "d:/phpenv/php" This is your PHP root directory

    2. 2

      4. Restart the Apache server.

      5. Test. Delete other files in www, create a new index.php, the content is <?php phpinfo ();?> Save, access the information that appears in PHP indicates that PHP has been successfully installed.

      Note:

      Some common configuration changes in PHP: (D:\phpEnv\php\php.ini)

      Settings for time zone: Date.timezone = Asia/shanghai

      Error Reporting level: Error_reporting = E_all This can all be opened in development mode.

      END
    Method/Step 3
    1. 1

      three, installation configuration mysql5.6.16 (Mysql-5.6.16-winx64.zip)

      1. Install MySQL

      64-bit MySQL temporarily did not find the MSI installation package, so directly extracted to the installation directory, and then configure the relevant environment variables, modify the configuration file, Add window service on the line, here is not detailed. Here to put my configuration file for everyone to refer to:

          [mysqld]

           Loose-default-character-set = UTF8  

          basedir = d:/program/mysql-5.6

           datadir = d:/program/mysql-5.6/data

          port = 3306

           sql_mode=no_engine_substitution,strict_trans_tables 

          character_ Set_server = UTF8

          

          [client]   

           loose-default-character-set = UTF8

      Note: Basedir is the root directory of MySQL and DataDir is the data storage directory for MySQL. I'm not going to explain the rest.

      There is no graphical user interface for installing MySQL, and it is possible to install a navicat for MySQL software, which may seem a bit more convenient.

    2. 2

      2, after the installation of MySQL, add MySQL support for PHP

      Open PHP configuration file php.ini (D:\phpEnv\php\php.ini)

      (1) (721 lines); Extension_dir = "ext", remove the front ";" and change to Extension_dir = "D:\phpEnv\php\ext" to open PHP extension support, Ext folder has a lot of PHP extension support. dll files, interested students can look.

      (2) then the MySQL extension that opens PHP

      (875, 876 lines) remove the front ";"

      Extension=php_mysql.dll

      Extension=php_mysqli.dll

      Of course you can also open 881 rows of Php_pdo_mysql.dll enable PHP PDO support I usually use this.

      Note: There are many expansion options in lines No. 863 through No. 888, what you need to use, and remove the previous ";" You can do it. Of course if you want to add additional extension support such as Redis support, PHP itself may not provide the corresponding DLL files, you need to find the appropriate version of the DLL to add to the Ext folder, and then add a extension= in the configuration file ...

      When you are finished, restart Apache

      You can see it when you visit phpinfo.

      END
    Method/Step 4
      1. 1

        Iv. Summary:

        PHP environment installed on the internet has a lot of information, their own in contact with PHP is also shaking the check, in their own computer also installed many times, the beginning of the time also with the integration of software packages, WAMP, Appserv and so on, later PHP version upgrade, found to want to upgrade the integration package PHP is very troublesome, Therefore, it is strongly recommended that you do a separate configuration under the environment to better understand the connection between Apache, PHP, and MySQL.

        END
    Precautions
      • Install the computer to support VC11

      • The number of profile lines involved may vary slightly depending on the version or individual changes

Win7 (64-bit) php5.5-apache2.4-mysql5.6 environment installation

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.