Compile PHP into Static Binary

我的未来我决定 提交于 2019-12-03 10:44:18

I have found a solution although it's a bit messier than I would like. I am leaving the libxml as a shared object and just including it with my code package and using the LD_LIBRARY_PATH environment variable so that it loads my shared library objects instead of the ones installed on the system.

Ideally I would like just a single binary file but this solution works. It also has the slight advantage of using the system libraries if those are suitable (i.e. my code package doesn't have to include all the shared libraries). But I would still be interested in knowing if there is a way to compile a completely static php binary.

It was suggested to me a long time ago to try out http://statifier.sf.net/ or http://magicErmine.com

They make a static binary out of any executable.

I think that's how the folks over at magento made that php 5.2 binary.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!