I have just upgraded to ubuntu 16.04. Now I have in /etc a folder for php5.6, one for 7.0 and one for 7.1 each with their mods-available subfolder.

I have installed the php7.0-zip extension and I see it in the mods-available subfolder for php7.0.

How to enable it? phpenmod will look in 5.6 version mods-available only...

  • it depends on where you are going to use it, there are extensions for php-cli, php-fpm and so on
    – M.Mass
    Commented Oct 13, 2017 at 13:54
  • I am using it in php-cli mode. Commented Oct 13, 2017 at 13:55
  • and what does php7.0-cli -m say? (I can confuse commands a bit in favor of usual php-cli -m for php5, but it has to show modules you have currently loaded for your cli side)
    – M.Mass
    Commented Oct 13, 2017 at 13:59

1 Answer 1


Have you tried phpenmod -v 7.0 extension?

Alternatively, you can create the symlink yourself (which is what phpenmod does internally):

ln -s /etc/php/7.0/mods-available/extension.ini /etc/php/7.0/apache2/conf.d/extension.ini
  • +1 for just creating the link yourself. Don't forget to restart Apache so it re-reads config, etc.
    – ivanivan
    Commented Oct 13, 2017 at 15:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .