By flesh
I tried several ways to upgrade PHP on my Ubuntu 14.04 machine from 5.5.9 to 5.6. It was not easy, at least it worked like described on http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-ubuntu.html.
Typing php -v shows
codePHP 5.6.25-2+deb.sury.org~trusty+1 (cli)
Copyright © 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright © 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright © 1999-2016, by Zend Technologiescode
looks good so far…
But phpinfo still shows
codePHP Version 5.5.9-1ubuntu4.19code
How can I enforce apache to use PHP 5.6??
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!
In my case i needed to work with php 7.0 and the following worked:
sudo a2dismod php5; sudo a2enmod php7.0; sudo service apache2 restart;
Hope this helps !
Hey
Don’t know if you guys already resolved the problem, but here is how i did:
sudo a2dismod php5 sudo a2enmod php5.6 sudo service apache2 restart
As described here by michaelpporter https://www.digitalocean.com/community/questions/how-to-upgrade-from-php-v-5-5-9-to-v-5-6
Cheers
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.