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!
[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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.