How to compile my own php extension under windows ?

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

How to compile my own php extension under windows ?

Postby Flynn » 21. March 2007 12:17

Hello !

Thank you for this nice package, it's very nice. Nevertheless I request a little help, since I'm mainly used to the php linux environment, and the windows one seems a little bit strange to me :

How do I recompile my own php extension ?
I can't find the "phpize" utility for example -- it's not needed anymore ?
What dev tool should I get ? Is gcc a good start ? or do I need some .net stuff which I really don't known (and don"t wish to :)

Thank you for giving me a clue, I really have none for now !

Thank you in advance for your help, Flynn.
Posts: 2
Joined: 21. March 2007 12:10


Postby Flynn » 22. March 2007 16:50

Ok, I finally found my way through this.

1) get MSVC 6.0 (old Microsoft Visual Studio stuff, unfortunately not free)

2) get the php sources that correspond to the xampp package, in my case that's php-4.4.5

3) create a new extension skeleton in php using ext/ext_skel_win32.php
adapt the sources to this skeleton

4) create a projet file for MSVC ( I did copy and modify manually another extention .dsp file to get this one done)

5) set the projet to add an include directory from the PHP project, and a lib directory to link against from the xampp-win32-devel package

6) try to deal with the reminding errors (I personnaly got some undefined exports "_empty_string" - why do the Zend people have to change everything each release they produce ? grrrmmblll )

7) copy the generated dll in the right place (php/extensions), modify php.ini and I'm done.

Maybe this will be useful to somebody else some day :)

Rgds all.
Posts: 2
Joined: 21. March 2007 12:10

Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 6 guests