wreckman Posted January 29, 2004 Share Posted January 29, 2004 Hi ! I have to write an external module for PHP.... I wanted to do it under windows first, and then port it under linux... I've found a shell script called ext_skel_win32.php, and I can't make it work... 1) If somebody knows an other way to it, please let me know... I also tried to built it under linux (Mandrake 9.1) But I'm not sure to have a "full" working environement (I have PHP-4.3.4 sources, Bison & Flex) 2) What tools are needed ? 3) How to build an empty project ? (I think it's a good start ?!) I can't even generate an empty module, here is what I did : php/ext> ./ext_skel monmodule // Creates empty files PHP_ARG_ENABLE(monmodule, for module support, [--with-my-module ... PHP_NEW_EXTENTION(monmodule, monmodule.c, $ext_shared) // Uncommented these lines of the .m4 file ./buildconf --force // re-generates the .m4 file 4 configure Then make fails..... (the only function inside should be the module's compilation function check) (4) DID I DO SOMETHING WRONG ? PLEASE GIVE ME AN ANSWER ! THANKS!!! PS : I'm not very familiar with Zend & PHP : so don't blame me ! PS2 : Send any comments if you want to romain.fabbri@caramail.com Quote Link to comment https://forums.phpfreaks.com/topic/1638-requierements-4-php-modules-writting/ Share on other sites More sharing options...
daeken Posted January 29, 2004 Share Posted January 29, 2004 First, I suggest you not use AOLbonics like '4' in place of 'for' and others as laziness is one of the attributes a programmer can _not_ afford to have. Second, don't use caps, it's offensive and your question is _not_ that important. Third, there are many entries on the php-dev mailing list about the basics of extension building for windows, and my ext_skel replacement will help you quite a bit. Happy Hacking, Lord Daeken M. BlackBlade (Cody Brocious) Quote Link to comment https://forums.phpfreaks.com/topic/1638-requierements-4-php-modules-writting/#findComment-5381 Share on other sites More sharing options...
wreckman Posted January 30, 2004 Author Share Posted January 30, 2004 Sorry, I was a bit stressed by that first big project I have to do both for work & school, (I'm a french alternating student). But, thanks a lot, I'll try to take care about your advice. Quote Link to comment https://forums.phpfreaks.com/topic/1638-requierements-4-php-modules-writting/#findComment-5385 Share on other sites More sharing options...
gizmola Posted January 30, 2004 Share Posted January 30, 2004 Sorry, I was a bit stressed by that first big project I have to do both for work & school, (I'm a french alternating student). But, thanks a lot, I'll try to take care about your advice. I picked up that you were not a native english speaker. I understand Cody's points, but I also get the feeling you were not trying to use "Dewdspeak" or any of the other annoying things that often help indicate that the person is just going to end up wasting our time. Also, we did outline in our forum posting guidelines that it is never ok here to mention your urgency. Nobody here could care less about the deadlines of people asking for free help. With that said, one key point not to overlook, is the availability of Cody's ext_skel replacement, that he rather humbly mentioned. Read the past messages in this forum for more details. Best of luck. Quote Link to comment https://forums.phpfreaks.com/topic/1638-requierements-4-php-modules-writting/#findComment-5386 Share on other sites More sharing options...
Derek Posted February 11, 2004 Share Posted February 11, 2004 Obviously modules are written in C (as PHP itself is written in C), but you can also use C++. You don't need anything "extra" to write modules, and don't even need CVS access if you want it to be released with core, as you can send in patches to the mailing lists for others to commit. You don't need any special software, other than a compiler (heh), and there isn't anything 'special' required besides the header files and libraries in the php core (unless you're wrapping other software, of course). Most of the times, if you write it for linux it will work in windows (if you're careful). Just try not to use libraries and such that aren't available in windows and vice versa. Quote Link to comment https://forums.phpfreaks.com/topic/1638-requierements-4-php-modules-writting/#findComment-5458 Share on other sites More sharing options...
Fordiman Posted November 11, 2004 Share Posted November 11, 2004 Note: If you write a module in C++ for PHP (using VC6>), make sure you're still using the C naming conventions (/c), as not doing so will cause massive memory leaks and an ultimately failed compile. Quote Link to comment https://forums.phpfreaks.com/topic/1638-requierements-4-php-modules-writting/#findComment-6685 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.