How to build PHP on Windows

How to build PHP on WindowserinusBlockedUnblockFollowFollowingFeb 9for PHP 7.

2+RequirementsMicrosoft Visual Studio 2017Creater workspace folderC:php-sdkDownload PHP SDK from GitHubhttps://github.

com/Microsoft/php-sdk-binary-toolsExtract PHP SDK to C:php-sdkC:php-sdkinC:php-sdklibC:php-sdkmsys2C:php-sdkpgo…Download PHP Sourcehttps://windows.

php.

net/download/Invoke VS 2017 x64 Native Tools Command Prompt with Administrator PrivilegesC:WindowsSystem32> cd C:php-sdkC:php-sdk> phpsdk-starter.

bat -c vc15 -a x64[vcvarsall.

bat] Environment initialized for: ‘x64’PHP SDK 2.

1.

10OS architecture: 64-bitBuild architecture: 64-bitVisual C++: 15PHP-SDK path: C:php-sdkC:php-sdk$ phpsdk_buildtree php-devExtract PHP SourceC:php-sdkphp-devvc15x64php-7.

2.

15-srcDownload DependenciesC:php-sdk$ cd C:php-sdkphp-devvc15x64php-7.

2.

15-srcC:php-sdkphp-devvc15x64php-7.

2.

15-src$ phpsdk_deps -uConfiguration: 7.

2-vc15-x64-stableProcessing package ICU-63.

1-vc15-x64.

zipProcessing package apache-2.

4.

28-vc15-x64.

zip…Processing package zlib-1.

2.

11-vc15-x64.

zipProcessing package libsodium-1.

0.

16-vc15-x64.

zipUpdates performed successfully.

Old dependencies backed up into ‘C:php-sdkphp-devvc15x64deps.

201902091501’.

CompileC:php-sdkphp-devvc15x64php-7.

2.

15-src$ C:php-sdkphpsdk-vc15-x64.

bat[vcvarsall.

bat] Environment initialized for: ‘x64’PHP SDK 2.

1.

10OS architecture: 64-bitBuild architecture: 64-bitVisual C++: 15PHP-SDK path: C:php-sdkC:php-sdkphp-devvc15x64php-7.

2.

15-src$ buildconfRebuilding configure.

jsNow run ‘configure –help’C:php-sdkphp-devvc15x64php-7.

2.

15-src$ configure –disable-all –enable-cliPHP Version: 7.

2.

15Saving configure options to config.

nice.

batChecking for cl.

exe … <in default path>Detected compiler MSVC15 (Visual C++ 2017)Detected 64-bit compilerChecking for link.

exe … C:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.

16.

27023inHostX64x64Checking for nmake.

exe … <in default path>Checking for lib.

exe … <in default path>Checking for bison.

exe … <in default path>Checking for sed.

exe … <in default path>Checking for re2c.

exe … <in default path>Detected re2c version 1.

1.

1Checking for zip.

exe … <in default path>Checking for lemon.

exe … <in default path>Checking for mc.

exe … C:Program Files (x86)Windows Kits10in10.

0.

17763.

0x64Checking for mt.

exe … C:Program Files (x86)Windows Kits10in10.

0.

17763.

0x64Enabling multi process buildBuild dir: C:php-sdkphp-devvc15x64php-7.

2.

15-srcx64Release_TSPHP Core: php7ts.

dll and php7ts.

libChecking for wspiapi.

h … <in default path>Enabling IPv6 supportEnabling SAPI sapicliChecking for library edit_a.

lib;edit.

lib … .

depslibedit_a.

libChecking for editline/readline.

h … C:php-sdkphp-devvc15x64depsincludeEnabling extension extdateEnabling extension extpcreEnabling extension ext
eflectionEnabling extension extsplChecking for timelib_config.

h … ext/date/libEnabling extension extstandardCreating build dirs…Generating files…Generating MakefileGenerating main/internal_functions.

cGenerating main/config.

w32.

hGenerating phpizeDone.

…Type ‘nmake’ to build PHPC:php-sdkphp-devvc15x64php-7.

2.

15-src$ nmakeOutputC:php-sdkphp-devvc15x64php-7.

2.

15-srcx64Release_TS.. More details

Leave a Reply