IIS整合PHP

來源:互聯網
上載者:User

首先下載如下檔案
fcgisetup32.msi   IIS中可以使用PHP的串連檔案,在iis.net上可以下載到
php-5.2.6-Win32.zip   PHP的運行檔案, 在php.net上可以下載到
phpMyAdmin-v2.116.rar   如果需要使用PHP管理MYSQL,可以下載這個開源的PHP管理MYSQL的環境,在sourceforge.net上可以下載到

首先安裝fcgisetup32.msi,然後在IIS的網站(或者虛擬目錄)的屬性->“主目錄”頁簽->配置->應用程式配置->應用程式擴充中添加對副檔名為.php的映射為D:\WINDOWS\system32\inetsrv\fcgiext.dll 
然後在D:\WINDOWS\system32\inetsrv下找到fcgiext.ini
修改節點[Types]如下:
[Types]
PHP=E:\PHP5\php\php-cgi.exe
[E:\PHP5\php\php-cgi.exe]
QueueLength=1000
MaxInstances=4
InstanceTimeout=30
InstanceMaxRequests=1000
其中E:\PHP5\php為php-5.2.6-Win32.zip的解壓路徑

最後建立一個副檔名為.php的檔案就可以測試PHP是否被整合到IIS中了
<?php
echo phpinfo();
?>

下面開始配置phpmyadmin
1、首先配置php.ini,在E:\PHP5\php下找到php.ini-dist更名為php.ini,然後在檔案中找到extension=php_mysql.dll,去掉前面的“;”,如果需要使用其它的擴充,也可以去掉相應擴充之前的";",如extension=php_mssql.dll、extension=php_fdf.dll。然後將這個檔案放到D:\WINDOWS下
2、在E:\PHP5\phpMyAdmin下找到config.sample.inc.php,更名為config.inc.php,其部分內容如下:
$cfg['blowfish_secret'] = 'hxh8201'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;
// 顯示在登陸螢幕上的伺服器名字
$conf['servers'][0]['desc'] = 'MySQL';

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
// 伺服器的主機名稱或IP地址。對於 UNIX domain socket 請使用 '' 。
// 對於本地 TCP/IP 連結請使用 'localhost' 。
$cfg['Servers'][$i]['host'] = 'localhost';
// 伺服器的資料庫連結連接埠(3306 是MySQL 的預設連接埠)
$conf['servers'][0]['port'] = 3306;
// SSL 連結選項: disable(禁止), allow(允許), prefer(首選), require(必須)
// $conf['servers'][0]['sslmode'] = 'allow';
// 更改僅在無法串連到 template1 的時候預設連結的資料庫。
// 對於 PostgreSQL 8.1 以上版本的伺服器,你需要將此處設為 'postgres'
// $conf['servers'][0]['defaultdb'] = 'template1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'hxh8201';

現在就可以通過PHPMYADMIN來管理您的MySql了。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.