Integration of PHP, MySQL, and Apache

Source: Internet
Author: User

Install MySQL

  • Download:MySQL 5.5.28
  • Install MYSQL: Select 'custom' --> next --> specify the installation path --> next --> install (there is nothing to say about installation, mainly MySQL configuration)
  • On the installation completion page, select "Release AE the MySQL server now --> finish" (the MySQL Configuration window will be opened at this time)
  • In this pop-up window, there are two options: detailed configuration (detailed configuration) and standard configuration (standard configuration). We choose: detailed configuration, next
  • At this time, there are three options:
    Developer machine (Development Server) will only use as little memory as possible,
    Server machine (General server), occupying a moderate amount of memory,

    Dedicated MySQL server machine (Database Server), which runs only MySQL and occupies all the memory,
    We can choose the first option, next
  • There are three options:
    Multifunctional database optimizes the database to a good InnoDB (transaction) storage type and an efficient MyISAM (non-transaction) storage type ;,
    The second type of transactional database is only used for transaction processing. It is best to optimize InnoDB, but also supports MyISAM. Only MyISAM supports full-text indexing ;,
    Non-transactional database only; In the development environment, select the one with the most features .,
    Select multifunctional database, next.
  • InnoDB tablespace settings (select the storage location of InnoDB data. We recommend that you do not store the data on disk C, unless your disk C is large. You can also modify the datadir value of my. ini after installation), next;
  • There are three options to define the maximum number of connections:
    Demo-support (DSS)/OLAP: the maximum number of concurrent connections allowed is 20;
    Online Transaction Process (OLTP): the maximum number of concurrent connections allowed is 500;
    Manual setting custom maximum number of concurrent connections;
    We can choose the first one. Next
  • Enable TCP/IP networking (modify the MySQL port. The default MySQL port is 3306, which is not recommended .), Select enable TCP/IP networking and next
  • Set MySQL encoding. You have three options:
    Standard character set (this is the default MySQL encoding: Latin1 ),
    Best support for multilingualism (this UTF-8 Code );
    Manual selected default Character Set/collation (custom encoding, select from the drop-down box below ),
    We recommend using UTF-8, next
  • Both options are selected.
    Install as Windows Service (install MYSQL as a Windows Service );
    Include bin directory in Windows path (add MySQL to Windows environment variables ),
    Next
  • There are two options:
    Modify Security Settings (create the mysql superuser password). This password is very important. Set,
    Create an annomyous account (create an anonymous account.
    Next
  • Execute and finish. MySQL installation is complete.
  • Open CMD and enter mysql-u root-P. If you are prompted to enter the password, the installation is successful.

Install PHP

PHP 5.2.17

  • PHP installation is relatively simple: Decompress the package to a directory. I am called php_home here. For example, if I install it now: "D:/softinstall/PHP"
  • Configure environment variables:
    New: phprc: D:/softinstall/PHP
    Add:; % phprc %; at the end of path;
    Copy libmysql. DDL under php_home to C:/Windows/system32.
    Run php-I under DOS. If the configuration is correct, some basic PHP information will be displayed.
  • Add some basic module support for PHP :.

    Rename PHP. ini-recommended to PhP. ini and open it. Find extension_dir = "./" and Change "./" to "php_home/EXT" (php_home is your PHP decompression directory ).

    Find the string starting with "; Extension =". below is the PHP extension module. ";" indicates that it has been commented out. If it is deleted, it indicates that it has been activated. Here we only need to activate it:

    Php_gd2.dll drawing function library
    Libmysql. dll MySQL connection function library
    Php_mysql.dll MySQL connection function library (old)
    Php_mysqli.dll MySQL connection function library (new)
    Php_mbstring.dll International string processing function library.
    Save. PHP installation is complete.

 

Install Apache

Download Apache 2.2.x from Apache

  • This installation is also very simple: After the download is complete, go directly to the next step and enter some information at will until the installation is complete. You can.
  • Configure the root directory of the Web server:
    DocumentRoot "D:/softinstall/Apache/www"
    <Directory "D:/softinstall/Apache/www">
    <Directory "D:/softinstall/Apache/www">
    Options followsymlinks
    AllowOverride none
    Order deny, allow
    Allow from all(Default value:Deny from all. If so, you cannot access the specified web directory.)
    </Directory>
    After this configuration, you can access the file directory in the browser: So find (more than one ):

    Comment options followsymlinks indexes into: # options followsymlinks Indexes
    Add options none below.
    In this way, you cannot access the file directory.

Integration of MySQL and PHP

    • Copy libmysql. DDL under php_home to C:/Windows/system32.
    • Activate the following modules under PHP. ini:
      Php_mysql.dll MySQL connection function library (old)
      Php_mysqli.dll MySQL connection function library (new)

Integration of Apache and PHP

Reference:Http://php.net/manual/en/install.windows.apache2.php

Open Apache/CONF/httpd. conf (the configuration location is random :)

Added support for the PHP module:
Loadmodule php5_module "C:/PHP/php5apache2_2.dll"

Addhandler application/X-httpd-PHP. php

Specify the php_home directory:
Phpinidir "D:/softinstall/PHP"

Supported PHP types:

Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP. html
Addtype application/X-httpd-PHP. php. phtml. php3. PhP4
Addtype application/X-httpd-PHP-source. PHPs

Added support for index. php:

<Ifmodule dir_module>
Directoryindex index. php index.html
</Ifmodule>

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.