Jump to content

Looking for sample code for extension-building


anroy

Recommended Posts

Earlier on I started a thread on developing PHP extensions for Windows.
http://www.phpfreaks.com/forums/index.php/topic,92360.msg369800.html#msg369800

This article was an invaluable help.
http://www.devnewz.com/2002/0909.html

I am now creating extensions for Linux.  It is extraordinarily difficult because I barely know how to compile programs in Linux.  There are a lot of environmental issues, especially to do with paths and libraries.

In the PHP source code download, there is an ext folder containing the source for the various extensions that ship with PHP.  Alas, none of them are easy to understand.  I am just looking for the "Hello World" example of extension-building. 

I do not have time to learn much about gcc or Linux generally, I just need an example that works out of the box and I will just change/add the C code.

The C part is a piece of cake for me, whereas the whole environment stuff is taking weeks to figure out.

Does anyone know where such an example can be found?

Thanks!
Link to comment
Share on other sites

[quote author=thorpe link=topic=103106.msg410546#msg410546 date=1154851001]
There is a decent example and tutorial available on the zend site [url=http://www.zend.com/php/internals/extension-writing1.php]here[/url]. Good luck.
[/quote]
Thanks, that looks like a good friendly one.
Link to comment
Share on other sites

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.