Steps for installing Apache PHP MySQL manually

Source: Internet
Author: User
Tags apache download apache php php mysql

From http://hi.baidu.com/sink_cup/blog/item/31ad363fb2bc24e455e72302.html

 

Step 1: automatically install Apache

Download the Apache Automatic Installation Package
Official Apache download: http://httpd.apache.org/download.cgi (containing MSI installer words ),
After installation, start Apache.
Install to D: \ Wamp \ apache2.2

Step 2: manually install PHP

Download the PHP compressed package (manual installation package)
PHP official download: http://php.net/downloads.php (Windows binaries zip package, starting from Version 5.3, extensions need to download http://pecl.php.net/packages.php separately)
PHP official Chinese manual-installation instructions: http://cn.php.net/manual/zh/install.windows.manual.php
Manual installation.
Decompress the package to D: \ Wamp \ PHP.
Copy PHP. ini-recommended to PhP. ini.
Edit D: \ Wamp \ PHP. ini
Changed display_errors = off
Display_errors = on
Extension_dir = "./"
Extension_dir = "D: \ Wamp \ PHP \ Ext" or extension_dir = "../PHP/EXT"

Step 3: integrate PHP and Apache

Edit D: \ Wamp \ apache2.2 \ conf \ httpd. conf
Change directoryindex index.html

Directoryindex index.html index. php
Add the following lines at the end of the httpd. conf file:

# Import the PHP Module
Loadmodule php5_module "D:/Wamp/PHP/php5apache2_2.dll"

# Add file types for PHP Syntax Parsing
Addtype application/X-httpd-PHP. php
# Configure the php. ini path
Phpinidir "D:/Wamp/PHP"

Step 4: automatically install MySQL

Download the MySQL Automatic Installation Package
In general, MySQL 5 and above are acceptable. libmysql. dll connected to MySQL in PHP is 5.0.51a,
MySQL 5.0.51a download: http://mysql.cdpa.nsysu.edu.tw/Downloads/MySQL-5.0/mysql-5.0.51a-win32.zip

Step 5: connect PHP and MySQL

MySQL is not enabled by default. Therefore, you must activate the php_mysql.dll dynamic Connection Library in PHP. ini.
Edit D: \ Wamp \ PHP. ini
; Extension = php_mysql.dll
; Extension = php_mysqli.dll
Delete the semicolon, that is, change it:
Extension = php_mysql.dll
Extension = php_mysqli.dll

In addition, PHP also needs to access the mysql client connection library. The root directory of PHP contains libmysql. dll. To enable PHP to talk to MySQL, this file must be placed in the Windows system path.
There are two methods:
Method 1: Copy libmysql. dll in the PHP Directory to the c: \ windows \ system32 directory.
Method 2: Add D: \ Wamp \ PHP to Environment Variable-system variable-path (recommended, but it takes effect only after the computer is restarted)
References: http://cn.php.net/manual/zh/faq.installation.php#faq.installation.addtopath
References: http://cn.php.net/manual/zh/ref.mysql.php#mysql.installation.windows
The PHP Directory contains libmcrypt. DLL, libmhash. DLL, libpq. DLL. If method 1 is used and environment variables are not used, you need to copy these DLL files to the c: \ windows \ system32 directory.

Step 6: connect MySQL and Apache

Apache connects to MySQL. Apache searches libmysql. dll in the bin directory under the Apache installation directory. If it cannot be found, it will be found in the directory of the environment variable.
If you have added D: \ Wamp \ PHP to the environment variable in step 5, Apache will call D: \ Wamp \ PHP \ libmysql. dll;
Otherwise, copy libmysql. DLL to D: \ Wamp \ apache2.2 \ bin.

Wamp is installed now.

Install phpMyAdmin. FAQs:
(1) The mcrypt extension cannot be loaded. Check the PHP configuration.
Solution: Edit PHP. ini
Remove the semicolon before; Extension = php_mcrypt.dll and change it to extension = php_mcrypt.dll.

(2) No PHP extension settings mbstring were found, and the current system seems to be using the wide character set. PhpMyAdmin without mbstring Extensions cannot correctly identify strings and may produce unexpected results.
Solution: Edit PHP. ini
Remove the semicolon before; Extension = php_mbstring.dll and change it to extension = php_mbstring.dll.

(3) the configuration file now requires a top secret phrase password (blowfish_secret ).
Error cause: No cookie encrypted characters are set
Solution: Edit PHPmyAdmin/config. inc. PHP: Modify $ cfg ['blowfish _ secret'] = ''. Enter any letter in the quotation marks on the right of the equal sign, for example, $ cfg ['blowfish _ secret'] = 'whatever'; (whatever can be any string here ).
If the config. Inc. php file does not exist in the directory, copy the config. sample. Inc. php file in the phpMyAdmin root directory and rename it to the config. Inc. php file in the root directory.

(4) phpMyAdmin-error: MySQL extension cannot be loaded. Please check the PHP configuration-document
error cause: libmysql cannot be found in Apache. DLL
solution: Add D: \ Wamp \ PHP to the environment variable, or add libmysql. DLL is copied to the bin directory of Apache.

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.