Jump to content


Photo

Looking for sample code for extension-building


  • Please log in to reply
2 replies to this topic

#1 anroy

anroy
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 05 August 2006 - 06:55 PM

Earlier on I started a thread on developing PHP extensions for Windows.
http://www.phpfreaks....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!


#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 06 August 2006 - 07:56 AM

There is a decent example and tutorial available on the zend site here. Good luck.

#3 anroy

anroy
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 08 August 2006 - 04:34 AM

There is a decent example and tutorial available on the zend site here. Good luck.

Thanks, that looks like a good friendly one.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users