I think we've faced with a serious problem in works. Yesterday night I was working on integration of the php-tsql module with the tikirisql library. I was faced with a situation where it's hard to compile the integrated php module since it's makefile is an auto generated one. I think our tikirisql library makes us troubles since it's coded for a general purpose. I directly called the tikirisql's functions inside the php-tsql module. Then I compiled and placed it in my php extensions directory. When I try to run a testing php script in apache server which uses our php modules functions, the php file's going to be downloaded without rendering on the browser.
I think most probably the reason should be the usage of tikirisql's C files and header files within the php module. There may be some restrictions by the creators of php about the way we create extensions to the php.
Sometimes the same problem may have been encountered by the MySQL community who use a very simple php module which does only the exchanging of the web client's queries to MySQL server and results back to clients browser. They doesn't do parsing stuff in php module. I looked at the mysql module in php. It's very simple with only the standard source files. Those standard files are in each and every module in php. As I understand everything the mysql people has changed is the content in those source files. They have written new functions and called them. Therefore I think there may be a big reason for not using external libraries inside php modules.
I think we have to study more about the php internals to understand the problem and to find a possible solution.
Finally I found the way to integrate external C libraries to php extension. Follow this link to the article for it.
ReplyDeletehttp://recolog.blogspot.com/2010/08/php-tsql-project-linking-external.html