General discussion

Locked

Creating PHP Extensions

By Mike_at_RLH ·
Hi, I am curious to know of other people's experiences with creating and compiling extensions for PHP.

Recently I tried to compile a PHP extension based on the source codes for a PHP extension which I downloaded off the net - it's available as C files, and the corresponding header files.

I've tried to follow the instructions for compiling the extensions manually - as indicated by the PHP manual online for creating extensions, with the source code of PHP at hand, within a Linux environment - but some errors are thrown up, such as files not found, though they are indicated by includes within the header files.

I'm no C/C++ expert, and compiling is new to me, but it seems that the process is more prone or open to error than I would feel is warranted - or am I just naive? Any thoughts on the matter would be great.

For those who are curious enough, the extension files are in http://frink.nuigalway.ie/~framework/Test/Free.zip as a zip. Please right hand click to Save Target As...

The article where the stat package came from: http://www.jstatsoft.org/v02/i01/statistics.pdf - the files were updated this year, though the article is dated 1997.

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Not surprising

by mjf In reply to Creating PHP Extensions

Mike, compiling in C/C++ isn't trivial on any system (Linux, Windows, etc.). If you're familiar with it, you can probably pick out the build errors (such as the ones I suspect you're having) immediately and fix them. If you're not familiar with the build process, though, it will take some experience. You have to tell the compiler where to look for include files, what constants to define, and so on.

Exactly what errors are you getting? Can you post them? Or you could email them to me. I'm no guru, but I may be able to get you by some obvious problems.

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums