Home php教程 php手册 IIS服务器完全配置实现asp,cgi,perl和php+mysql

IIS服务器完全配置实现asp,cgi,perl和php+mysql

Jun 21, 2016 am 09:09 AM
gt mysql perl php quot

cgi|iis|mysql|perl|服务器

IIS服务器完全配置实现asp,cgi,perl和php+mysql

IIS服务器完全配置 现在我们要使IIS实现ASP,CGI,PERL和PHP+MYSQL

所需软件(都要是For Windows的):

ActivePerl、PHP、MYSQL

一.ASP支持:

不用说了吧,什么都不用做,本身就支持ASP运行。

二.CGI,PERL支持:

1.安装ActivePerl
运行下载的ActivePerl一步一步安装(注意:安装路径请选择到根目录的/usr/下(默认是perl),这样对以后调试程序省很多事)

2.配置IIS
打开"Internet 信息服务"(在'管理工具'里),点开默认站点的属性,如图:

选择 "主目录" 选项卡,然后点 "配置(G)...",弹出如图对话框

然后 "添加(D)" 如下图:

推荐"c:\usr\bin\perl.exe" 记得一定要在后面加上" %s %s ",不然没法执行cgi的,确定后。用同样的方法添加扩展名.pl,如图:

完成后如图:

现在你的IIS已经支持cgi,perl了!


三.PHP、MYSQL支持:

1.安装PHP和MYSQL
运行下载的PHP和MYSQL一步一步安装就行了(装到哪里都行,一般现在网上流行的都是安装过的PHP,没有安装程序,你只需要把下载的压缩包解压缩出来就行了,放到如:c:\php下)

2.PHP支持:

2.1 拷贝php目录下dlls文件夹里所有文件到c:\windows\system32下

2.2配置IIS:和刚才配置cgi一样,添加.php 如下图:

完成后如下图:

最后,把如图:

这里的 "执行权限" 该成:"脚本和可执行文件" 然后确定ok! 现在你的IIS已经完全支持PHP+MYSQL了!

一、下载MySQL数据库(ODBC)驱动程序和MySQL数据库系统程序

1.MySQL数据库(ODBC)驱动程序下载地址为: http://mysql.com/Downloads/MyODBC/myodbc-2.50.36-nt.zip 、 http://download.sourceforge.net/pub/mirrors/mysql/Downloads/MyODBC/myodbc-2.50.36-nt.zip 或者 http://www.fykx.net/download/php/myodbc-2.50.36-nt.zip(1457KB)

2.MySQL数据库系统程序下载地址为: http://www.mysql.com/Downloads/MySQL-3.23/mysql-3.23.30-gamma-win.zip (9632KB)或者是 http://www.fykx.net/download/php/mysql-3.23.30-gamma-win.zip

二、程序安装

1.安装MySQL数据库(ODBC)驱动程序(Windows系统下必须安装)

2.安装MySQL数据库系统程序,一般安装在系统默认位置“C:\MySQL”,但要考虑你的服务器是否作为网络数据库服务器,如果要在此服务器上建立上百个数据库用户,就应该安装在空间比较大硬盘分驱上,以免今后不必要的麻烦和繁琐的设置。

三、程序的启动

执行“[系统安装盘符]:\MySQL\Bin\winmysqladmin.exe”这个程序来启动MySQL数据库系统和管理器,第一次启动时,系统会出现“快速设置”窗口,要求建立第一个数据库用户帐号,如下图。在User name中输入第一个MySQL数据库帐号的用户名,在Password中输入第一个MySQL数据库帐号的密码,最好你记住输入的值,然后进入MySQL数据库管理窗口,过一会儿程序自动最小化窗口到系统的托架处(任务栏的右边有个“红绿灯”图标),系统已经正常启动(Windows2000还要检查一下“组件服务管理器”中“MySQL组件服务”是否启动)。这时,程序还在启动组里添加了一个快捷方式,下次启动计算机就自动启动MySQL数据库系统。

四、数据库的建立

第一次启动数据库,系统就自动建立了名称为MySQL和test的两个数据库,你可以用以下的方法建立其它名称的数据库:

右键单击系统托架“红绿灯”图标=>>单击“Show me”打开MySQL数据库管理窗口=>>选择“Databases”标签=>>选择数据库服务器=>>右键单击一下=>>选择“Create database”菜单项=>>在弹出的添加数据库对话框中键入数据库名称(Database name)=>>单击“Create the datebase(创建这个数据库)”,一个新的数据库就建立了。如下图


五、数据库用户帐号管理

第一次启动数据库就建立了一个数据库用户帐号,如果你的服务器要让多个用户使用的话,就必须建立多个数据库用户帐号,步骤如下:

启动“ODBC 数据源管理器”(WindowsNT系统下“ODBC 数据源管理器”在“管理工具”里,Windows98 or Me系统下“ODBC 数据源管理器”在“控制面板”里)=>>在第一个标签“用户DSN”中单击“添加”按钮=>>在数据源驱动程序列表中选择“MySQL”=>>单击“完成”按钮=>>在“数据库驱动程序配置”对话框“Windows DSN name”中填入“动感教育网”(表示为动感教育网开的帐号),在MySQL host(Name or IP)填入服务器的主机名或者IP地址,在MySQL database name中填入数据库名称,在User中填入数据库帐号的用户名,在Password中填入数据库帐号的密码,其它的为默认设置=>>单击“OK”。一个新的数据库帐号就建立起来了。

六、调试程序(以版面风格美化后的vBulletin Version 1.1.5 中文标准版为代理例)

1.修改Admin/Config.php文件,具体内容如下:


// 目前只支持MySQL
$dbservertype="mysql";
// hostname或服务器ip
$servername="localhost";
// 登录数据库的用户名和密码
$dbusername="xiaozhang";
$dbpassword="123456";
// 数据库名
$dbname="mysql";
//允许在控制面板查看/编辑密码
// 0 = 不可见或编辑
// 1 = 不可见,但可以编辑
// 2 = 可见和可以编辑
$pwdincp=2;

?>
(转自http://bbs.iduba.net)



Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1670
14
PHP Tutorial
1274
29
C# Tutorial
1256
24
MySQL: The Database, phpMyAdmin: The Management Interface MySQL: The Database, phpMyAdmin: The Management Interface Apr 29, 2025 am 12:44 AM

MySQL and phpMyAdmin can be effectively managed through the following steps: 1. Create and delete database: Just click in phpMyAdmin to complete. 2. Manage tables: You can create tables, modify structures, and add indexes. 3. Data operation: Supports inserting, updating, deleting data and executing SQL queries. 4. Import and export data: Supports SQL, CSV, XML and other formats. 5. Optimization and monitoring: Use the OPTIMIZETABLE command to optimize tables and use query analyzers and monitoring tools to solve performance problems.

What is the significance of the session_start() function? What is the significance of the session_start() function? May 03, 2025 am 12:18 AM

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

Steps to add and delete fields to MySQL tables Steps to add and delete fields to MySQL tables Apr 29, 2025 pm 04:15 PM

In MySQL, add fields using ALTERTABLEtable_nameADDCOLUMNnew_columnVARCHAR(255)AFTERexisting_column, delete fields using ALTERTABLEtable_nameDROPCOLUMNcolumn_to_drop. When adding fields, you need to specify a location to optimize query performance and data structure; before deleting fields, you need to confirm that the operation is irreversible; modifying table structure using online DDL, backup data, test environment, and low-load time periods is performance optimization and best practice.

How to uninstall MySQL and clean residual files How to uninstall MySQL and clean residual files Apr 29, 2025 pm 04:03 PM

To safely and thoroughly uninstall MySQL and clean all residual files, follow the following steps: 1. Stop MySQL service; 2. Uninstall MySQL packages; 3. Clean configuration files and data directories; 4. Verify that the uninstallation is thorough.

How to use MySQL functions for data processing and calculation How to use MySQL functions for data processing and calculation Apr 29, 2025 pm 04:21 PM

MySQL functions can be used for data processing and calculation. 1. Basic usage includes string processing, date calculation and mathematical operations. 2. Advanced usage involves combining multiple functions to implement complex operations. 3. Performance optimization requires avoiding the use of functions in the WHERE clause and using GROUPBY and temporary tables.

An efficient way to batch insert data in MySQL An efficient way to batch insert data in MySQL Apr 29, 2025 pm 04:18 PM

Efficient methods for batch inserting data in MySQL include: 1. Using INSERTINTO...VALUES syntax, 2. Using LOADDATAINFILE command, 3. Using transaction processing, 4. Adjust batch size, 5. Disable indexing, 6. Using INSERTIGNORE or INSERT...ONDUPLICATEKEYUPDATE, these methods can significantly improve database operation efficiency.

Detailed explanation of the installation steps of MySQL on macOS system Detailed explanation of the installation steps of MySQL on macOS system Apr 29, 2025 pm 03:36 PM

Installing MySQL on macOS can be achieved through the following steps: 1. Install Homebrew, using the command /bin/bash-c"$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)". 2. Update Homebrew and use brewupdate. 3. Install MySQL and use brewinstallmysql. 4. Start MySQL service and use brewservicesstartmysql. After installation, you can use mysql-u

Composer: The Package Manager for PHP Developers Composer: The Package Manager for PHP Developers May 02, 2025 am 12:23 AM

Composer is a dependency management tool for PHP, and manages project dependencies through composer.json file. 1) parse composer.json to obtain dependency information; 2) parse dependencies to form a dependency tree; 3) download and install dependencies from Packagist to the vendor directory; 4) generate composer.lock file to lock the dependency version to ensure team consistency and project maintainability.

See all articles