Question

php -v is 7.0.11 and phpinfo() is 5.5.9

I have updated php to 7.0. php -v return 7.0.11. But phpinfo() return 5.5.9.

Can anyone help me?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Did you switched PHP modules on Apache? You should first disable PHP5.6 module then enable PHP7 module and restart Apache. To disable PHP5.6 on Apache execute :

  1. sudo a2dismod php5.6

Now you should enable PHP7 ones:

  1. sudo a2enmod php7.0

To reflect changes Apache restart is required:

  1. sudo systemctl restart apache2

Try again phpinfo, and report is it or we need to try something other. :) Edit: try with php5.5 if php5.6 returns not exist module, I noticed it late :P