I have set-up multiple PHP versions on single apache ubuntu instance using below tutorial.


Both PHP versions working fine but php-geoip and php-redis extensions are missing.

How can I compile both extensions from source.

Is there any way to enable PHP extensions and modules from source


You can compile php-redis following these steps and for GeoIP you can follow these steps and as a general rule each compilation process should generate a *.so file which you should move it to the extensions directory then enable it in php.ini for example extension="redis.so" this will make php.ini load the .so file from the extension dir that is configured for your php version. (sometimes make install will do that for you when you compile an extension)

Please note that php-redis, geoip is available through pecl in case you don't want to compile them

  • I'm using PHP 5.5 and 5.6. Is there any versions compatibility – adminz May 13 '17 at 10:29
  • download the source code that is compatible with your version from pecl then compile it or use pecl to install them without compilation – Mostafa Hussein May 13 '17 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.