Table of Contents
开始前准备
编译步骤
Home php教程 php手册 Windows下源码编译PHP

Windows下源码编译PHP

Jun 13, 2016 am 10:33 AM
micro php windows Down thing Prepare start Source code compile need

seaprince.cn

开始前准备

开始之前,你需要准备如下东西:

  1. Microsoft Visual C++, 建议Visual C++ 2008, 速成版或专业版都可以。
  2. Windows SDK,下载地址:aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en 不建议用那个网络安装,慢死,还不知道什么时候能完。还有就是建议全部安装。
  3. 其他工具,下载地址:http://pecl2.php.net/downloads/php-windows-builds/php-libs/binary-tools.zip

编译步骤

  1. 下载并安装VC++ 2008,并安装。
  2. 安装windows sdk 6.1
  3. 下载php5.3,下载地址:http://cn.php.net/get/php-5.3.0.tar.bz2/from/this/mirror
  4. 创建文件夹,比如C:php-sdk
  5. 把上面第三步下载的包解压到这里,解压完时C:php-sdk里应该有两个子目录bin, script
  6. 在开始菜单处打开Microsoft Windows SDK v6.1/CMD Shell,输入命令:
    setenv /x86 /xp /release
    cd c:php-sdk
    binphpsdk_setvars.bat
    binphpsdk_buildtree.bat php53dev
  7. 上一步会创建一些目录。进入vc9x86,把php5.3.0解压在这里,解压后目录结构:vc9x86php5.3.0
  8. 在WIN-SDK的命令行下输入:
    cd C:php-sdkphp53devvc9x86php5.3.0
    buildconf
  9. 到了这一步,就和linux下差不多了,你可以看一下编译的选项帮助:
    configure –help
  10. 好,我们来一个最小化的编译:
    configure –disable-all –enable-cli
    nmake
  11. 这一步在php wiki上是没有问题,但由于我们是中文环境,会报下面的错误:
  12. 用Editplus打开extstandardrowscap.c这个文件,

    选是,并选择Western European (Windows)
    然后另存为UTF-8编码。
  13. 重新nmake编译,然后用nmake snap编译成最终二进制包。二进制包在php-5.3.0Release_TS下。可能的名字是php-5.3.0-Win32-VC9-x86.zip
  14. 测试一下:

下一篇文章再写怎么编译pecl扩展。

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
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)

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Mar 05, 2025 pm 05:57 PM

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

The latest version download of gate.io The latest version download of gate.io Mar 05, 2025 pm 07:51 PM

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.

How to solve the problem of third-party interface returning 403 in Node.js environment? How to solve the problem of third-party interface returning 403 in Node.js environment? Mar 31, 2025 pm 11:27 PM

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...

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

How to download okx trading platform How to download okx trading platform Mar 26, 2025 pm 05:18 PM

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.

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

What kind of disk-viewing software is used for Bitcoin What kind of disk-viewing software is used for Bitcoin Mar 17, 2025 pm 04:27 PM

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.

How to avoid third-party interfaces returning 403 errors in Node environment? How to avoid third-party interfaces returning 403 errors in Node environment? Apr 01, 2025 pm 02:03 PM

How to avoid the third-party interface returning 403 error in the Node environment. When calling the third-party website interface using Node.js, you sometimes encounter the problem of returning 403 error. �...

See all articles