


Full records of compiling PHP5.4 and xdebug under Windows, php5.4xdebug_PHP tutorial
Full records of compiling PHP5.4 and xdebug under Windows, php5.4xdebug
In fact, my ultimate goal is to compile php_xdebug.dll that supports PHP5.4, but before that , is necessary to successfully compile PHP5.4.
Compilation environment and related software packages:
1.Microsoft Visual C 2008 Express Edition with SP1
2.Windows SDK 6.1
3.PHP SDK Binary Tools
4.Dependable libs
5.PHP5.4 Sources
6.Xdebug 2.2.0-dev
If you need the VC6 compilation environment, then you need to install Visual C 6.0, and the SDK needs to be replaced with:
Windows Server 2003 PSDK
Compilation process:
Get your coffee and cola ready, it may take several hours...
Install VC 2008 and Windows SDK 6.1
Create the following directory:
Copy code The code is as follows:
D:php-sdk
D:php-sdkphp54dev
D:php-sdkpecl
Unzip all files in php-sdk-binary-tools-20110915.zip to D:php-sdk
Extract the deps directory in deps-5.4-vc9-x86.7z to D:php-sdkphp54dev
Unzip the php5.4 source code to D:php-sdkphp54dev, and choose any directory name, such as php-5.4.0RC3
The source code of xdebug is placed in D:php-sdkpeclxdebug
The final directory structure probably looks like this:
Copy code The code is as follows:
D:php-sdk>tree D:php-sdk
Folder PATH listing for volume DISK_VOL2
Volume serial number is 0C74-AD73
D:PHP-SDK
├───bin
├───php54dev
│ ├───deps
│ │ ├───bin
│ │ ├───include
│ │ ├───lib
│ │ └───sybase
│ ├───pecl
│ │ └───xdebug
│ └───php-5.4.0RC3
├───script
└───share
Open the Windows SDK CMD Shell and execute: setenv /x86 /xp /release. If you are a 64-bit system, this command is necessary. Do not try to change the parameters to /x64, otherwise you will Saw thousands of WARNINGs…
Set PATH: set PATH=D:php-sdkbin;%PATH%
Switch the SHELL directory to D:php-sdkphp54devphp-5.4.0RC3> and execute buildconf to generate the configure script:
Copy code The code is as follows:
D:php-sdkphp54devphp-5.4.0RC3>buildconf
Rebuilding configure.js
Now run 'configure --help'
D:php-sdkphp54devphp-5.4.0RC3>
Execute configure to generate the Make script. You can view configure –help for more compilation options:
Copy code The code is as follows:
D:php-sdkphp54devphp-5.4.0RC3>configure --disable-snapshot-build --disable-debug-pack --disable-ipv6 --disable-zts --disable-isapi --disable-nsapi --without-t1lib --without-mssql --without-pdo-mssql --without-pi3web --without-enchant --enable-com-dotnet --with-mcrypt=static --disable-static-analyze --with-xdebug=shared
Here I used –disable-snapshot-build to turn off the snapshot mode, because this command will force open many options that are useless to me, such as aolserver, apache sapi, etc. Finally, I added –with-xdebug= shared. Before using this option, it is best to confirm that the location of the xdebug source code is correct. If there is no problem, you can see this option in configure –help after buildconf. Shared means compiling into a dynamic link library.
If you want to compile other pecl extensions (such as apc, bcompiler, etc.), you only need to download the relevant source code and put it in the pecl directory and re-execute buildconf.
If there is no problem with configure, finally execute nmake to start the compilation process, Good Luck! :)
The last step is nmake snap, which organizes the directory structure of all compiled files (that is, the structure of the PHP binary package you usually download) and packages it with zip.
The final generated file location: D:php-sdkphp54devphp-5.4.0RC3Release(_TS)
Error handling:
A lot of Warnings will be generated during the nmake process. As long as they are not interrupted, just ignore them.
About the encoding issues of calendar.c and jewish.c:
Copy code The code is as follows:
extcalendarcalendar.c : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
dow.c
easter.c
french.c
gregor.c
jewish.c
extcalendarjewish.c : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
extcalendarjewish.c(324) : error C2001: newline in constant
extcalendarjewish.c(325) : error C2001: newline in constant
extcalendarjewish.c(326) : error C2001: newline in constant
extcalendarjewish.c(327) : error C2001: newline in constant
NMAKE: fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio 9.0VCBincl.exe"' : return code '0x2'
Stop.
These two files use ANSI encoding and contain some Western special characters that do not exist in the GBK character set.
It can be opened with editplus, encoding selection: West European (Windows), and saved as UTF-8.

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



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

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.

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

The problem of comparing and synchronizing BeyondCompare files: Case sensitivity failure when using Beyond...

Why can't my code get the data returned by the API? In programming, we often encounter the problem of returning null values when API calls, which is not only confusing...

Mastering Debian system log monitoring is the key to efficient operation and maintenance. It can help you understand the system's operating conditions in a timely manner, quickly locate faults, and optimize system performance. This article will introduce several commonly used monitoring methods and tools. Monitoring system resources with the sysstat toolkit The sysstat toolkit provides a series of powerful command line tools for collecting, analyzing and reporting various system resource metrics, including CPU load, memory usage, disk I/O, network throughput, etc. The main tools include: sar: a comprehensive system resource statistics tool, covering CPU, memory, disk, network, etc. iostat: disk and CPU statistics. mpstat: Statistics of multi-core CPUs. pidsta

Choice of Python Cross-platform desktop application development library Many Python developers want to develop desktop applications that can run on both Windows and Linux systems...

Efficient reading of Windows system logs: Reversely traverse Evtx files When using Python to process Windows system log files (.evtx), direct reading will be from the earliest...
