Build a PHP + Apache + MySQL Environment

Source: Internet
Author: User

Www.php.net
Www.mysql.com
Www.apache.org

Please read all before installation.
Installation sequence: Apache> PhP5> MySQL

Note: Apache should be installed first in PhP5 and later versions, because the Web server type and Apache configuration file path will be prompted during installation of PhP5.
PhP5 installation: Installation Package is: php-5.2.17-Win32-VC6-x86.zip, unzip and put in: C: \ php5-2-7 \
After the installation, after selecting the Apache configuration file (that is, the directory where the \ conf \ httpd. conf file is located), the following will be added to httpd. conf:

# Begin PHP installer edits-remove only on uninstall
Phpinidir ""
Loadmodule php5_module "php5apache2. dll"
# End PHP installer edits-remove only on uninstall

Note that the above configuration is the same as the instructions in the following Apache installation configuration. You can delete the settings in Apache,
After testing, the above phpinidir "" must be changed to the drive letter plus phase path,
-> Phpinidir "C:/php5-2-17 /"
-> Loadmodule php5_module "C:/php5-2-17/php5apache2. dll"

If the version is automatically installed, modify the following content in PHP. ini:
Statement description

Short_open_tag = off on enables PHP to use short tags, as shown in <? ?>, No need to use <? PHP?>
Display_errors = off on is set to display PHP code error messages
Register_globals = off on off the next program should use
$ _ Post ['user _ name'] and $ _ post ['user _ pass']) to accept values;
The next program on can be used directly.
$ User_name and $ user_pass to accept the value.
__________________________________________________________________________________________________
; Date. timezone = PRC PhP5 time difference, where PRC indicates the People's Republic of China.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>< <<
MySQL:
MySQL Installation

Install the mysql-5.5.15-win32.msi and open the MySQL service.

Note: by default, the root user name of MySQL is installed without a password, which is very dangerous. Therefore, please add a password for it.
// Add the root password to port 1234 ABCDE: 3306
Mysql client: mymanager_lite.zip

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>< <<
Apache installation Configuration:
I. Httpd-2.0.64-win32-x86-openssl-0.9.8o.msi, domain at the time of installation, etc.: qwl.com, www.qwl.com qwlong007@163.com
The default installation directory is c: \ Program Files \ apache group \
After the installation, open the httpd. conf file in the [conf] Directory to start our Apache journey. // Go to the [htdocs] Directory,

1. Find directoryindex index.html. var.

Add index. php after it, and add it as follows:

Directoryindex index.html. var index. php

2) Find addtype application/X-gzip. GZ. tgz and add the following lines below:

Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP. html
Addtype application/X-httpd-PHP. htm
Addtype application/X-httpd-PHP-source. PHPs
Addtype image/X-icon. ICO

(. Php,. html,. htm, and so on can be extensions of executable PHP language, can be increased or decreased according to the actual .)
// Another article says that the following can be combined with the above.
Addtype application/X-httpd-PHP. php. phtml. php3. PhP4
Addtype application/X-httpd-PHP-source. PHPs

3. Search and locate:

# Loadmodule ssl_module modules/mod_ssl.so

Add it below (note that if it is the PhP5 installation version, a similar line will be automatically added after hpptd. conf, which can be omitted here ):

Loadmodule php4_module C:/PHP/SAPI/php4apache2. dll

After adding, it should be as follows:

# Loadmodule ssl_module modules/mod_ssl.so

Loadmodule php4_module C:/PHP/SAPI/php4apache2. dll

Here, the configuration of the Apache server can end up. After saving the httpd. conf file, restart the Apache server.

Run the following code to test whether the server is successfully installed:

<? PHP phpinfo ();?>

Save it as a phpinfo. php file and put it in the htdocs directory. Enter the following address in the address bar of the browser: http: // localhost/phpinfo. php, and you will see the relevant information.

The establishment of the php development environment in Windows environment has ended. Welcome to PhP learning and development!

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.