Build a PHP extension development environment in Windows

Source: Internet
Author: User
Tags vc9
Php-sdk is the first to download php-sdk. The new php-sdk-binary-tools-20151115.zip is downloaded to the f: php_stdiophp-sdk directory. Note: After decompression, the bin and script sub-directories should exist in this directory. Open a cmd window, switch to the f: php_stdiophp-sdk directory, run vcvarsall. bat to set

2. Compile PHP to download php-sdk first, download the newer php-sdk-binary-tools-20151115.zip, and decompress it to the f: \ php_stdio \ php-sdk directory. Note: After decompression, the bin and script sub-directories should exist in this directory. Open a cmd window, switch to the f: \ php_stdio \ php-sdk directory, and run vcvarsall. bat to set it.

2. Compile PHP

Download php-sdk first, download the newer php-sdk-binary-tools-20151115.zip, and decompress it

F: \ php_stdio \ php-sdk

Directory. Note: After decompression, the bin and script sub-directories should exist in this directory.

Open a cmd window, switch to the f: \ php_stdio \ php-sdk directory, and run vcvarsall. bat to set the compiling environment variable.

VS2008 installation path \ VC \ vcvarsall. bat

The specific directory of vcvarsall. bat depends on your installation location.

Next, go to the cmd window and continue to run the following command:

Bin \ phpsdk_setvars.bat

Bin \ phpsdk_buildtree.bat php54dev

In this way, an additional php54dev directory is added to the f: \ php_stdio \ php-sdk directory.

Decompress deps

F: \ php_stdio \ php-sdk \ php54dev \ vc9 \ x86 \

Directory. All subdirectories in the deps directory under this directory are empty. After decompression, copy them to many necessary library files for modules/extensions.

Next, copy the PHP-5.4.5 source code directory

F: \ php_stdio \ php-sdk \ php54dev \ vc9 \ x86 \

Directory. Go to the php source code directory

Cd f: \ php_stdio \ php-sdk \ php54dev \ vc9 \ x86 \ php-5.4.5.

Run

Buildconf

Then you can compile php first. At the very beginning, we usually compile as few modules as possible so that the core can be compiled properly:

Configure -- disable-all -- enable-cli


The main purpose of this step is to generate config. w32.h. If you need to generate PHP, you can continue to execute

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.