Search code examples
phpphp-extension

PHP extension compilation for linux


Is it possible to compile php extension on one linux distro, such as Ubuntu( or other debian) and use same compiled extension on centos?

I want to distribute an extension with my application, is there any way for me to compile it such that once compiled, it can work on all linux distros?


Solution

  • No, As extension can have different dependencies depend on Distro, So there will always be chances that your compiled extension will have problems on other distro. You just ready your source code. So anybody can compiled on their distro using standard extension compilation process.