Windows系统下 IIS+PHP+MYSQL环境配置
首先下载php-5.2.6-Win32.zip,mysql-noinstall-5.0.22-win32.zip和phpMyAdmin-2.9.1.1-all-languages.zip。 下载地址 一、安装php 1) 在D盘新建一个名为PHP的文件夹,解压缩php-5.2.6-win32.zip到D:\PHP。 2) 在D:\PHP文件夹下找到php.ini-dist文件,将其复
首先下载php-5.2.6-Win32.zip,mysql-noinstall-5.0.22-win32.zip和phpMyAdmin-2.9.1.1-all-languages.zip。
下载地址
一、安装php
1) 在D盘新建一个名为PHP的文件夹,解压缩php-5.2.6-win32.zip到D:\PHP。
2) 在D:\PHP文件夹下找到php.ini-dist文件,将其复制一份以做备份。将复制后的文件更名为php-ini。
3) 在php.ini文件中找到以下行:extension_dir = "./"(注:该行指定PHP查找扩展的位置),编辑该行,如下所示:
extension_dir = "D:/PHP/ext"(注:不要这里用的是斜杠/而不是反斜杠\)。
4) 在php.ini文件中找到以下行:;extension=php_mysql.dll(注:该行开始的分号指示PHP忽略该行),删除该行始的分号以启用扩展extension=php_mysql.dll;;extension=php_mbstring.dll 改成 extension=php_mbstring.dll
5) 保存并关闭php.ini文件;将修改好的php.ini文件复制到C:\Windows\文件夹下;
6) 在D:\PHP\文件夹下找到名为php5ts.dll,libmysql.dll的文件,并将其复制到C:\windows\System32文件夹中 (注:IIS处理PHP 5和MYSQL需要该文件)。
至此,PHP安装完毕。
二、安装配置IIS
1) 在控制面板中选择添加/删除程序,然后在弹出的对话框中选择添加/删除windows组件,勾中IIS即可。如果没有安装盘,可以去网下下一个从安装盘中抽取出来的iis包。安装完成后在C盘会有一个Inetpub的文件夹。
2) 在管理工具中打开Internet 信息服务(IIS)管理器,或者在运行对话框中输入"inetmgr"(不包括引号)后确定。
3) 在默认网站下新建虚拟目录,这里可以存放你的php文件。比如新建虚拟目录php指向电脑上的F:\MyPHP目录。在PHP文件夹上单击鼠标右键,选择"属性",依次点单击"虚拟目录"选项卡上的"配置",打开应用程序配置对话框。
4) 在"映射"选项卡上点"添加",打开"添加/编辑应用程序扩展名映射"对话框,点击"可执行文件"后的"浏览",定位到D:\PHP\php5isapi.dll,在"扩展名"后的文本框内输入".php"(注:一定要注意扩展名前的句点),点击确定。
5) 在文档选项卡中添加index.php做为默认文档。也可不添加。
6) 再点"确定",退出"应用程序配置"对话框,再点"确定",退出PHP属性对话框。
至此,IIS配置完毕。
某些配置可能需要重启服务器:cmd下使用:
net stop w3svc
net start w3svc
三、测试PHP安装
1) 在F:\MyPHP下,(该目录在配置IIS时设置了虚拟目录为php)新建记事本文件后打开,输入以下代码:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

Solving the problem of slow Photoshop startup requires a multi-pronged approach, including: upgrading hardware (memory, solid-state drive, CPU); uninstalling outdated or incompatible plug-ins; cleaning up system garbage and excessive background programs regularly; closing irrelevant programs with caution; avoiding opening a large number of files during startup.

How to implement Windows-like in front-end development...

How to distinguish between closing tabs and closing entire browser using JavaScript on your browser? During the daily use of the browser, users may...

Pull vertical guides in Photoshop: Enable ruler view (View > ruler). Hover the mouse over the vertical edge of the ruler, and then the cursor becomes a vertical line with double arrows and hold and drag the mouse to pull out the reference line. Click Delete by dragging the guide, or hovering it into a cross.

The solution to MySQL installation error is: 1. Carefully check the system environment to ensure that the MySQL dependency library requirements are met. Different operating systems and version requirements are different; 2. Carefully read the error message and take corresponding measures according to prompts (such as missing library files or insufficient permissions), such as installing dependencies or using sudo commands; 3. If necessary, try to install the source code and carefully check the compilation log, but this requires a certain amount of Linux knowledge and experience. The key to ultimately solving the problem is to carefully check the system environment and error information, and refer to the official documents.

1.0.1 Preface This project (including code and comments) was recorded during my self-taught Rust. There may be inaccurate or unclear statements, please apologize. If you benefit from it, it's even better. 1.0.2 Why is RustRust reliable and efficient? Rust can replace C and C, with similar performance but higher security, and does not require frequent recompilation to check for errors like C and C. The main advantages include: memory security (preventing null pointers from dereferences, dangling pointers, and data contention). Thread-safe (make sure multi-threaded code is safe before execution). Avoid undefined behavior (e.g., array out of bounds, uninitialized variables, or access to freed memory). Rust provides modern language features such as generics

The main reasons for MySQL installation failure are: 1. Permission issues, you need to run as an administrator or use the sudo command; 2. Dependencies are missing, and you need to install relevant development packages; 3. Port conflicts, you need to close the program that occupies port 3306 or modify the configuration file; 4. The installation package is corrupt, you need to download and verify the integrity; 5. The environment variable is incorrectly configured, and the environment variables must be correctly configured according to the operating system. Solve these problems and carefully check each step to successfully install MySQL.
