Installation and configuration of Windows XP + Apache + PhP5 + MySql

Source: Internet
Author: User

Creating a website on Windows is a good thing. Due to the popularity of open-source software, Apache + PHP + MySQL has become the first choice for many people. However, compared with the IIS provided by windows, for the first time users build websites, complicated configurations of these software often become a stumbling block to new users. They often need to read a large number of documents. Therefore, a basic website creation step is summarized based on your own experience. I hope it will be useful to you.

1. Download Apache (http://httpd.apache.org/download.cgi), PHP (http://www.php.net/downloads.php), and MySQL (http://dev.mysql.com/downloads/mysql/4.1.html) respectively ).

2. Install MySQL and configure it according to the wizard. If you need Fulltext search, set the database type to non transactional. It is best to set the character set as standard, that is, Latin1 (which does not affect the storage of Chinese data) to avoid unnecessary troubles during data conversion in the future.

3. install Apache and set the domain name and email address. Note that the forward slash (/) is used in the path.
Modify DocumentRoot and <directory "..."> in httpd. conf to the website root path.
Format:
Alias/virtual directory/"website in computer location (PATH )"

<Directory "website in computer location (PATH)">
Options indexes Multiviews
AllowOverride none
Order allow, deny
Allow from all
</Directory>
For example, the address http: // 127.0.0.1/PHPmyAdmin/web page file on the local machine is stored in D:/PHPmyAdmin/
Alias/PHPmyAdmin/"D:/PHPmyAdmin/" // The website must be in different versions at the end of the computer location (PATH)

<Directory "D:/phpMyAdmin"> // do not add a website in the computer location (PATH) or in different versions.
Options indexes Multiviews
AllowOverride none
Order allow, deny
Allow from all
</Directory>

4. decompress the PhP5 package file to c: \ PHP and add c: \ PHP to the system's environment variable path.

5. Rename PHP. ini-recommended PHP. ini and open it with notepad. Change extension_dir to "C:/PHP/EXT /". Find the line; Extension = php_mysql.dll, and remove the semicolon (comment). (If you need to use other PHP modules, remove the comments of the corresponding modules) if MySQL cannot be used normally using PHP, please exclude (1) MySQL service not started (2) Put libmysql under the PHP Directory. copy the DLL and ext/php_mysql.dll files to C:/Windows/system32 to restart Apache.

6. Add the following statement in httpd. conf as appropriate.

Loadmodule php5_module "C:/PHP/php5apache2. dll"
Addtype application/X-httpd-PHP. php
# Configure the path to PhP. ini
Phpinidir "C:/PHP"

Add index. php after directoryindex index.html. var

7. (optional) in httpd. conf, Set
Customlog "logs/access. log" common
Change
Customlog "| bin/rotatelogs.exe-l c:/progra ~ 1/Apache ~ 1/apache2/logs/access % Y-% m-% d. Log 86400 "common
The purpose of this step is to rotate Website access logs to generate new files every day to avoid excessive files.

8. Start Apache.

9. (optional) create a phpinfo. php file and enter
<? Phpinfo ();?>
Open it in the browser to check the details of the current configuration.

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.