Change apache2 php path
<p>I am using <a href="https://github.com/wilmoore/php-version" rel="nofollow">https://github.com/wilmoore/php-version</a> to switch between php versions on my local machine, installed within <code>~/php/versions</code>. Currently setting up separate VMs with different versions of php installed is not an option.</p>

<p>When I switch php version through the command line using the linked tool, I see it listed as php 7. This also works when using <code>php -v</code>. I have restarted terminal and the machine and it still says php 7.</p>

<p>I have updated <code>composer.json</code> to require php 7.0.2 and greater. Yet when I use <code>phpinfo()</code> in my laravel application, it always states the default <code>PHP Version 5.5.9-1ubuntu4.14</code>.</p>

<p>Where is laravel pointing to the php distribution in my Ubuntu 14.04.3 machine and where can I change this path?</p>

<p><strong>EDIT:</strong> I am using Apache. I can see in the <code>phpinfo()</code> output that it is reading the <code>ini</code> file from <code>/etc/php5/apache2/php.ini</code>. I have looked in this file but cannot see where to point to the php distribution.</p>