Access the function from .so file

0 views
Skip to first unread message

Ramesh Dahiya

unread,
Sep 30, 2009, 8:55:46 AM9/30/09
to php_mysql_usergroup, professional-php, bang-...@yahoogroups.com, php...@googlegroups.com
hi,

I m using centos5.3 and php 5.16.
I have complied a C program and genrates a .so file , now i want to use the function present inside my .so file from the php script.
For achiving this I make a myfunc.ini file and placed inside /etc/php.d/ containing extension=myfunc.so
and the myfunc.so file present inside the  /usr/lib/php/modules/

Does any one have idea ho to create a proper .so file from the C source that can be utilze from the php as module extension.

Any help or information are most welcome
--
Thanks
Ramesh Kumar Dahiya
::Give your best and the Best will come to you::

Sandeep Kadam

unread,
Sep 30, 2009, 9:04:08 AM9/30/09
to php...@googlegroups.com, php_mysql_usergroup, professional-php, bang-...@yahoogroups.com
Hi Ramesh,

Thats good innovative thing you are trying to built. I have never worked on it but this link will help you.

http://www.codebelay.com/blog/2008/07/03/how-to-make-your-own-php-extension-quick-and-dirty/

Check above article which will help you.


Thanks & Regards
----------------------------------
Sandeep
www.sandykadam.com
www.phpjobs.co.in
www.punephpjobs.com
http://tech.groups.yahoo.com/group/codingmentor/

Ramesh Dahiya

unread,
Oct 6, 2009, 9:37:54 AM10/6/09
to php...@googlegroups.com
Thanks Sandeep ,

Your links gives me ,exactly what ,I m looking for. Now i can develop my own compiled module in php.
If somebody wants to do more in this please check these link also.


Extension Writing Part I: Introduction to PHP and Zend
http://devzone.zend.com/node/view/id/1021

Extension Writing Part II: Parameters, Arrays, and ZVAL
http://devzone.zend.com/node/view/id/1022

Extension Writing Part III: Resources
http://devzone.zend.com/node/view/id/1024
--
Regard's
Reply all
Reply to author
Forward
0 new messages