Home > Article > Operation and Maintenance > Detailed explanation of configuring PHP and MySql database in IIS6 under windows2003
First ensure the window2003 SP2 system and IIS6, and download the PHP5 compressed package and MySql5 version install package
Configure php :
1. Unzip the php file to the root directory of the windows installation disk, such as C:\php
3. Copy C:\php\php.ini-dist to C:\Windows, and php.ini -dist is renamed to php.ini and creates a shortcut to C:\php (mainly to modify the configuration)
4. Find php.ini and modify:
extension_dir = "C:\php\ext"
session.save_path = "C:Windows\Temp" Open session (optional)
display_errors = On Open error display (optional)
short_open_tag = On Open short tag (optional)
Search for ;extension= and remove the dll items you need to use. For example, if you use mysql database, remove extension=php_mysql.dll extension=php_mysqli.dll. ;
5. Web service extension-Add a new Web service extension-Extension name: php5isapi-Click Add-Enter C:\php\php5isapi.dll, set the extension status is allowed
6. Right-click the website-Home Directory-Configuration-Add-Executable File: C:\php\php5isapi.dll-extension.php-limited to HEAD,GET ,POST
7. Right-click the website-Document-Add-index.php
8. Right-click the website corresponding to php-Permissions-user user check write-Internet guest account uncheck Deny write check
9. After installing MySql5, if port 3306 is banned during the installation of mysql, please enter the control panel-windows firewall-exceptions-add port-mysql-3306
10. Restart the server
Test:
Create a new test.php, enter
and the code is as follows:
<?php phpinfo (); ?> <br /> <?php $link= mysql_connect ('localhost','root','你mysql的root密码'); if (!$link) echo "失败!"; else echo "成功!"; mysql_close (); ?>
The above is the detailed content of Detailed explanation of configuring PHP and MySql database in IIS6 under windows2003. For more information, please follow other related articles on the PHP Chinese website!