english version is below!
php auf windows kompilieren geht einigermaßen leicht, wenn man weiß wie:
- visual studio 2008 (egal welche version – express, pro oder so; es gehen alle) besorgen und installieren
- windows sdk 6.1 besorgen
- einen php 5.3 snapshot herunterladen (noch nicht entpacken!)
- einen ordner “
c:\php-sdk” erstellen - in diesen ordner dieses archiv entpacken. jetzt sollte es nen ordner “
bin” und nen ordner “script” geben - die “windows sdk 6.1 shell” öffnen, erreichbar über’s startmenü
setenv /x86 /xp /releasecd c:\php-sdk\bin\phpsdk_setvars.batbin\phpsdk_buildtree.bat php53dev- jetzt den snapshot in
C:\php-sdk\php53dev\vc9\x86entpacken, und zwar so, dass folgender ordner rauskommt:C:\php-sdk\php53dev\vc9\x86\php5.3-xyz - in der windows-sdk-shell:
- cd
C:\php-sdk\php53dev\vc9\x86\php5.3-xyz buildconf- jetzt
configure --help, um eine übersicht über die optionen zu erhalten configure --disable-all --enable-cli --enable-$rest(achtung: einige extensions benötigen libraries und anderen kram, keine ahnung wie das geht!)nmake- falls man alles benötigte gezippt haben will:
nmake snap - das kompilierte php findet sich unter
C:\php-sdk\php53dev\vc9\x86\php5.3-200812271930\Release_TS, ebenso das zip, falls erstellt.
In English:
it’s easy to compile php on windows, at least if you know how:
- get visual studio 2008 (no matter what version – express, pro or others; all should work) and install it
- get and install windows sdk 6.1
- get a php 5.3 snapshot (do not extract yet!)
- create the folder “
c:\php-sdk“ - unpack this archive into this directory, there should be one sub-directory called “
bin” and one called “script“ - open the “windows sdk 6.1 shell” (it’s available from the start menu group) and execute the following commands in it:
setenv /x86 /xp /releasecd c:\php-sdk\bin\phpsdk_setvars.batbin\phpsdk_buildtree.bat php53dev- now extract the snapshot from 3) to
C:\php-sdk\php53dev\vc9\x86with your favourite unpacker (winrar should handle it) so that the following directory gets created:C:\php-sdk\php53dev\vc9\x86\php5.3-xyz - run in the windows-sdk-shell:
- cd
C:\php-sdk\php53dev\vc9\x86\php5.3-xyz buildconf- now
configure --help, to get an overview of the compiling flags configure --disable-all --enable-cli --enable-$remains(warning: some extensions need libraries, header files and helper apps, i have NO idea how to get these working!)nmake- if you want the resulting php to be zipped (comes handy for redist, believe me!), run after this also “
nmake snap" - the compiled php is now under
C:\php-sdk\php53dev\vc9\x86\php5.3-SNAPSHOTTIME\Release_TS, same as the zip file (if you created it).
credits go to pierre from freenode channel #php-dev-win for hours of support for this. thanks man.
