Wamp software custom installation notes (Windows Apache MySQL PHP)
1. Installation Steps
① Install Apache first.
Notes for installing Apache:
When entering server and other information, you can fill in according to the above example of the installation instance,
If you enter a domain name, you can enter a domain name based on the instance.
② Step 2 install PHP:
You can directly decompress PHP to install it successfully.
Differences between PHP version V6 and V9:
If Apache + PHP is used in windows, V6 is used,
If IIS + PHP is used in windows, v9.
③ Step 3: Integration of Apach and PHP:
Copy the following code to the httpd. conf file under the conf directory in the Apache directory.
Loadmodule php5_modund ~ PHP installation path/php5apache2_2.dll
Phpinidir "~ PHP module installation path"
Addtype application/x-httpd-php.php.phtml
(I) Replace the Chinese characters:
# Equivalent to loading Apache into the PHP Processing Module
①
Loadmodule php5_module C:/myenv/php-5.3.5/php5apache2_2.dll
# Specify the PHP initialization directory
Phpinidir "C:/myenv/php-5.3.5"
# Identify and process. php files
Addtype application/X-httpd-PHP. php. phtml
②
(Ii) change the php. ini-development file name to PhP. ini.
PHP. INI is used to specify some basic settings of PHP.
③
(3) Specify the extension library path in the PHP. ini file:
Open PHP. ini and search; extension_dir = "Ext"
To:
; Path for adding the PHP extension module
Extension_dir = "C:/myenv/php-5.3.5/EXT"
Step 4: test whether the installation is successful
Create test. php In the htdocs File
Write code <? PHP phpinfo ();?>
Restart Apache and access: http: // localhost/test. php.
The PHP version is described in detail.
⑤ Test whether MySQL is successfully installed:
(I) PHP code
<? PHP
$ Conn = mysql_connect ("localhost", "root", "root ");
If ($ conn ){
Echo "database connection successful! ";
} Else {
Echo "database connection failed! ";
}
?>
If this error occurs:
Fatal error: Call to undefined function mysql_connect ()
In C: \ myenv \ apache \ htdocs \ testdb. php on line 2
This is because PHP does not have the correct configuration.
Modification method:
Open the php. ini file and set
Extension = php_mysql.dll
Extension = php_mysqli.dll
Remove the comments before the two files.
If the MySQL database service is disabled, the connection fails.
(Ii) install phpMyAdmin to check whether phpMyAdmin can be run.
Decompress the package directly to htdocs to shorten the file name display.
Then access http: // localhost/PHPmyAdmin/index. php in the browser.