Windows compiles PHP5.4 and Xdebug full records, Php5.4xdebug
In fact, my ultimate goal is to compile the php_xdebug.dll that support PHP5.4, and before that, it is necessary to compile PHP5.4 successfully.
Compilation environment and related packages:
1.Microsoft Visual C + + 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 a VC6 build environment, then you need to install Visual C + + 6.0, and the SDK needs to be replaced by:
Windows Server 2003 PSDK
Compile process:
Get ready for coffee, coke, and maybe a few hours ...
Installing VC + + 2008 and Windows SDK 6.1
Create the following directory:
Copy the Code code as follows:
D:\php-sdk
D:\php-sdk\php54dev
D:\php-sdk\pecl
Unzip all files in the Php-sdk-binary-tools-20110915.zip to D:\PHP-SDK
Extract the Deps directory from the deps-5.4-vc9-x86.7z to D:\php-sdk\php54dev
Decompression php5.4 source code to D:\php-sdk\php54dev, directory name, such as PHP-5.4.0RC3
Xdebug Source Stacking to D:\php-sdk\pecl\xdebug
The final directory structure is probably the same:
Copy the Code code 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, execute: setenv/x86/xp/release, if you are a 64-bit system, then this command is necessary, do not try to change the parameters to/x64, or the subsequent make stage, you will see thousands of WARNING ...
Set Path:set path=d:\php-sdk\bin;%path%
Switch the SHELL directory to D:\php-sdk\php54dev\php-5.4.0rc3> Execute buildconf generate Configure script:
Copy the code code as follows:
d:\php-sdk\php54dev\php-5.4.0rc3>buildconf
Rebuilding configure.js
Now run ' Configure--help '
D:\ Php-sdk\php54dev\php-5.4.0rc3>
Executes configure build make script, you can view configure–help for more compilation options:
Copy Code The code is as follows:
D:\php-sdk\php54dev\php-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
I used –disable-snapshot-build to turn off snapshot mode because this command would force a lot of useless options for me, like Aolserver,apache SAPI, Finally I added –with-xdebug=shared, before using this option it is best to confirm the location of Xdebug source code is correct, if there is no problem, buildconf, in configure–help you can see this option, shared Represents the compilation 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 to the PECL directory, and re-execute buildconf.
If configure is not a problem, finally execute NMAKE to start the compilation process, good luck! :)
The final step is NMAKE snap, which organizes the directory structure of all compiled files (that is, the structure of the PHP binaries you normally download), and packs them in zip.
The resulting file location: D:\php-sdk\php54dev\php-5.4.0RC3\Release (_TS)
Error handling:
The NMAKE process produces a lot of Warning, so long as it's not interrupted, then it's okay to ignore it.
Coding problems with CALENDAR.C and jewish.c:
Copy code code as follows:
Ext\calendar\calendar.c:warning c4819:the file contains a character that cannot is 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
ext\ Calendar\jewish.c:warning c4819:the file contains a character that cannot being represented in the current code page (936) . Save the file in Unicode format to prevent data loss
Ext\calendar\jewish.c (324): Error c2001:newline in constant
E XT\CALENDAR\JEWISH.C (325): Error c2001:newline in constant
EXT\CALENDAR\JEWISH.C (326): Error c2001:newline in const Ant
Ext\calendar\jewish.c (327): Error c2001:newline in constant
nmake:fatal error U1077: ' C:\Program Files (x86 ) \microsoft Visual Studio 9.0\vc\bin\cl.exe "': Return code ' 0x2 '
Stop.
These two files use ANSI encoding, which contains some special characters for Latin, which do not exist in the GBK character set.
Available EditPlus Open, encoding selection: West European (Windows), Save as UTF-8.
http://www.bkjia.com/PHPjc/978729.html www.bkjia.com true http://www.bkjia.com/PHPjc/978729.html techarticle Windows compiles PHP5.4 and Xdebug full records, Php5.4xdebug actually my final goal is to compile the php_xdebug.dll that supports PHP5.4, and before that, it is necessary to compile PHP5.4 successfully. ...