Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/1638-requierements-4-php-modules-writting/
Share on other sites

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)

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.

  • 2 weeks later...

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

 

:ph34r:

  • 9 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.