1

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 Oct 13 '17 at 13:54
  • I am using it in php-cli mode. – Lelio Faieta Oct 13 '17 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 Oct 13 '17 at 13:59
3

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
|improve this answer|||||
  • +1 for just creating the link yourself. Don't forget to restart Apache so it re-reads config, etc. – ivanivan Oct 13 '17 at 15:21

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.