PHP + MySQL + Apache configuration in win7

Source: Internet
Author: User

Love is free, just like the heart of beauty. In the software industry, open-source software is free of charge, so it is not surprising that open-source software is gaining traction.

In the programmer's world, as a leader in open-source software, the Apache server, the programming language PHP, MySQL database can be said to have no one knows, no one knows, no one does not love. Even many IT industry outsiders want to see their elegance. However, many people are unable to deploy Windows systems, and finally, in the face of repeated defeats, they can't help but bow their heads. Although many experts are constantly developing a one-click deployment platform that is just as good as Wamp from the perspective of new users, the feeling of having to get rid of the tiger's point is always as though they are always eating food. Forget it, start from scratch ......

As a result, after countless failures and standing on the shoulders of giants, I finally successfully deployed the three-in-one platform under Windows 7. The record is as follows, hoping to help those who are interested in Apache, PHP, and MySQL, but are still stuck.

Grain and grass are not active. Before installation, you must download the Windows 7 version on the Apache, MySQL, and PHP software official websites. After the download is complete, it is just a breeze-configuration. Only focus.

1. Configure httpd. Cong of Apache

1. Add the PHP module.

Loadmodule php5_module dir:/PHP/php5apache2.2. dll/(DIR indicates the PHP installation/Decompression directory)

Phpinidir "dir:/PHP" (directory of the php. ini file)

Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP. html (apachewill execute PHP code in the. html file)
Addtype application/X-httpd-PHP. txt (apachewill execute PHP code in the. txt file)

2. Modify the website root directory (DocumentRoot)

DocumentRoot "dir:/yourwebsite"

3. Modify <directory ""> to make it consistent with DocumentRoot.

<Directory "dir:/yourwebsite">

4. Modify the directoryindex (Directory Index. When you enter localhost/in the address bar, the first index will give priority to loading)

DirectoryIndex index.php index.html

2. Modify PHP. ini (renamed by the php. ini-recommended or PHP. ini-development or PHP. ini-production file)

1. Tell the Apache server the directory where the PHP extension file is located

; Directory in which the loadable extensions (modules) reside. (directory where the extension file can be loaded)
Http://php.net/extension-dir
; Extension_dir = "./"
; On Windows:
Extension_dir = "dir: \ PHP \ Ext" (add this line .)

2. Add PHP extensions that support MySQL

; Extension = php_mysql.dll
Remove the semicolon, that is
Extension = php_mysql.dll

With the above simple settings, you can successfully use Apache + MySQL + PhP three muskeys in win7.

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.