Windows Apache PHP5安装详细教程
下载的apache要记得下OPENSSL的
httpd-2.2.19-win32-x86-openssl-0.9.8r.msi
下载的PHP记得下线程安全的,这样才便于搭建http服务
php教程-5.2.17-Win32-VC6-x86.msi
下面就是转载的了
此文章的安装方法适用于Windows XP下的Apache+PHP+MySQL安装,同时也适用于Windows 2003系统下的安装和配置。
1. 安装环境
操作系统是 Windows XP 中文版, Apache, PHP, MySQL 的最新版本是截止到 2007.09.07,分别在其官网下载的:
* Apache 2.2.6:http://apache.mirror.phpchina.com/httpd/binaries/win32/
* PHP 5.2.4 (Windows Binaries PHP 5.2.4 zip package): http://www.php.net/downloads.php
* MySQL 5.0.45 Windonws: http://dev.mysql教程.com/downloads/
2. 安装的目录结构规划
为了方便维护,可以将服务器软件安装在系统盘(C盘)而把自己的文件定位到其他盘,这样对于以后的维护很重要。
3. 在 Windows XP 下安装 Apache 2.2.6
Windows XP 下的安装
1. 运行 apache 2.2.6 的安装程序,根据提示一路 Next 即可。在 Server Information 的 Network Domain、Server Name 字段随便填上一个域名即可,如php.com,然后根据提示一路 Next 完成即可。
2. 在安装结束时,会弹出一个 DOS 窗口,然后就消失了,这是系统apache自动启动了。
4. 在 Windows XP 下安装 php 5.2.4
1. 将下载的 php 5 ZIP 包直接解压,我直接将 PHP 5.2.4 zip 文件解压到 d:php 目录下面。安装 php 不建议使用 win32 安装程序(主要是以后安装扩展麻烦)。
2. 在资源管理器中进入 php 的安装目录,将 php.ini-dist 或 php.ini-recommended 复制一份,命名为 php.ini。然后打开 php.ini。
3. 找到:
;extension=php_mysql.dll
将前面的 ; 号去掉, 改成:
extension=php_mysql.dll
4. 找到:
extension_dir = “./”
将其改为你的 php 安装目录下 ext 子目录的绝对路径。例如我的:
extension_dir = “D:/php/ext/”
这步很重要 。否则接下来 php 会找不到 php_mysql.dll 模块,无法装载。
5. 在“控制面板”->“系统”->“高级”->“环境变量”,在“系统变量”里面找到path,编辑path的变量值,添加你的php目录D:php,前面一定要用分号(;)把它和前面的值分开。
5. 配置 Apache 和 PHP
打开 Apache 安装目录下的 conf 子目录中的 httpd.conf 文件。
1. 找到:
DocumentRoot “xxxxxxx”
改成你本机的网站内容的目录。例如我的:
DocumentRoot “E:/web”
改完之后往下稍微拉动一下,找到“# This should be changed to whatever you set DocumentRoot to.”,然后把下面这个地方也改过来
PHPIniDir “D:/PHP”这个不要了,免得apache服务器启动不起
3. 找到:
DirectoryIndex index.html
修改为:
DirectoryIndex index.php index.html
4. 找到:
AddType application/x-gzip .gz .tgz
添加这两行:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
5. 保存 httpd.conf
6. 在你的网站目录中(例如我的是 E:/Web/),手工建立一个 index.php 的文件,内容:
phpinfo();
?>
7. 在 dos 窗口中启动 apache 服务(假设Apache安装在了C:Program FilesApache Software FoundationApache2.2)
#如果之前启动了,先将其 stop
C:Program FilesApache Software FoundationApache2.2bin> httpd -k stop
或者是:net stop apache2.2
#启动 apahce 服务
C:Program FilesApache Software FoundationApache2.2bin> httpd -k start
或者是:net start apache2.2
8. 打开 http://localhost/index.php,即可看到测试输出结果。
6. Windows XP 下安装 MySQL 5.0.45
MySQL 的安装比较简单,它提供了一个 win32 的安装包。下载后根据提示一路安装,也可以在安装类型处选 Custom,指定安装目录,这里直接默认安装在了C盘。
安装完成后,会问你要不要到官网注册,跳过即可。然后会问你是否 Configure the MySQL Server now,选中并继续,然后根据提示,设定 字符集,以及 root 管理员的密码即可。

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

Detailed explanation and installation guide for PiNetwork nodes This article will introduce the PiNetwork ecosystem in detail - Pi nodes, a key role in the PiNetwork ecosystem, and provide complete steps for installation and configuration. After the launch of the PiNetwork blockchain test network, Pi nodes have become an important part of many pioneers actively participating in the testing, preparing for the upcoming main network release. If you don’t know PiNetwork yet, please refer to what is Picoin? What is the price for listing? Pi usage, mining and security analysis. What is PiNetwork? The PiNetwork project started in 2019 and owns its exclusive cryptocurrency Pi Coin. The project aims to create a one that everyone can participate

Need to download the Gate.io app to start your cryptocurrency journey? This guide details the latest version download steps for iOS, Android, and Windows devices. Simply visit the official website, find the download link and select the appropriate option based on your device. For iOS, it will go directly to the App Store, while Android and Windows users will download the APK or installer for manual installation. Once installed, you can launch the app and set up your account to step into the world of cryptocurrency.

Solve the problem of third-party interface returning 403 in Node.js environment. When we use Node.js to call third-party interfaces, we sometimes encounter an error of 403 from the interface returning 403...

Choosing the right Bitcoin market viewing software is crucial, it can help investors grasp market conditions in real time and make smarter investment decisions. This article will guide you how to make a choice, covering personal needs assessment (trading frequency, analysis depth, information needs and budget), software type selection (exchange interface, professional software, market website/APP), core functional considerations (data reliability, chart tools, custom settings, community communication and platform compatibility), and direction recommendations (maturity financial platform, cryptocurrency aggregation platform, community recommendation software). Finally, it is recommended that you try a few more software and compare it to choose the tool that best suits your needs. Please remember that software is only an auxiliary tool, and you must be cautious when investing at your own risk.

The OKX trading platform can be downloaded through mobile devices (Android and iOS) and computers (Windows and macOS). 1. Android users can download it from the official website or Google Play, and they need to pay attention to security settings. 2. iOS users can download it through the App Store or follow the official announcement to obtain other methods. 3. Computer users can download the client of the corresponding system from the official website. Always make sure to use official channels when downloading, and register, log in and security settings after installation.

Binance C2C Trading Guide: Safe and convenient way to deposit and withdraw money in cryptocurrency. This article will explain the Binance C2C (CustomertoCustomer) trading model in detail, explain its security, characteristics and operation procedures, and provide graphic tutorials to help you easily master the Binance C2C deposit and withdraw money in ease. What is Binance C2C? Binance C2C is a user-to-user cryptocurrency trading service provided by the Binance platform, providing users with convenient cryptocurrency and fiat currency exchange channels. Launched in 2019, the service supports multiple cryptocurrencies and fiat currency transactions through a peer-to-peer trading model, and provides enhanced security and multiple features. Compared with traditional OTC trading, Binance C2C platform authenticates both parties to the transaction and provides complete support.

Huobi to Binance Transfer Guide: Safe and conveniently transfer your crypto assets Many investors use Huobi and Binance at the same time. This article will guide you how to safely transfer crypto assets on Huobi (HTX), such as TRUMP and USDT, to the Binance platform. Binance is popular for its high security, rich currency and trading pairs, and world-leading trading volume. Binance Exchange’s advantages: the world’s number one trading volume, accounting for 50% of the global market; transparent reserve assets are mainly mainstream stablecoins such as Bitcoin, Ethereum and USDT; it has effectively avoided the potential risks of the US SEC and is one of the most stable and reliable exchanges at present. This tutorial will take TRUMP and USDT as examples

This article introduces two methods to download the Binance client: official website [adid]9f61408e3afb633e50cdf1b20de6f466[/adid] download and application store download. The official website download method includes visiting Binance official website, finding the download button, selecting the corresponding operating system version (such as Windows or Mac) to download the installation package, and then running the installer to complete the installation.
