<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#0b5394">Yeah manage them separately on different VM's or containers.  I try to spec my VM's out as close to the production server's specs as possible to try and minimize the "Well, it worked on my system" syndrome.  That means potentially dozens of different settings and versions all down the LAMP stack to and including the Linux operating system.  This could mean a lot of different instances.  This is why I got familiar with Vagrant.  Or even easier learn Docker and build containers.  They are fast and very efficient.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#0b5394"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 27, 2016 at 6:13 PM, JD Austin <span dir="ltr"><<a href="mailto:jd@twingeckos.com" target="_blank">jd@twingeckos.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#3333ff">I typically use virtual machines for this because the production environment won't have both versions and the interdependence issues you can run into having conflicting packages from both versions of PHP can be infuriating.  Make a VM with PHP 5.6, get the app working, clone the VM, upgrade PHP to version 7, fix whatever issues you have to, have your firewall port forward to each VM.</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#3333ff"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#3333ff">JD</div><img src="http://t.sidekickopen65.com/e1t/o/5/f18dQhb0S7ks8dDMPbW2n0x6l2B9gXrN7sKj6v5dfcjW8qC8cn3MhMbFN1qMxdTd3_yKW1_3_3Q1k1H6H0?si=5477687619747840&pi=409b1201-8104-459c-f98b-fb7bd09a7899" style="display:none!important" height="1" width="1"></div><div class="gmail_extra"><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div>-- JD Austin<br>Voice: <a href="tel:480.269.4335" value="+14802694335" target="_blank">480.269.4335</a> (480 2MY Geek)<br><a href="mailto:jd@twingeckos.com" target="_blank">jd@twingeckos.com</a></div><br></div></div></div></font></span><div><div class="h5">
<br><div class="gmail_quote">On Tue, Sep 27, 2016 at 5:56 PM, Keith Smith <span dir="ltr"><<a href="mailto:techlists@phpcoderusa.com" target="_blank">techlists@phpcoderusa.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Interesting approach!!  Thank you for your feedback!!<div><div><br>
<br>
On 2016-09-27 09:41, Matt Graham wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2016-09-26 20:24, Keith Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I need to test using PHP 5.6 and PHP 7. I have a computer that I will<br>
be configuring as a test server.  I will make [it] public facing<br>
periodically - just for testing and for a short time.  I want to use<br>
Ubuntu 16.4.<br>
<br>
Is there any way to configure one server to give access to two<br>
different versions of PHP, possibly by some Apache config?<br>
</blockquote>
<br>
I tried to have apache load modules for PHP 5.6 and 7 at the same time<br>
and got segfaults for my trouble.  It's probably also not possible to<br>
associate .php files with both versions of the module at the same<br>
time.<br>
<br>
That said, there's probably a reasonable way to make this work.  Copy<br>
the apache config that's currently working to a separate directory,<br>
like /etc/httpd2/ .  Go into that dir and change the Listen port to<br>
something other than 80, like 81.  Change the PHP configuration such<br>
that it loads the PHP 7 module instead of the 5.6 module.  Change the<br>
ServerRoot to /etc/httpd2 .  Change the PidFile to run/httpd2.pid .<br>
Fix the Log directives such that httpd2 isn't writing to the same log<br>
files as the first httpd.  Then you can start this alternate apache up<br>
with "apachectl -f /etc/httpd2/conf/httpd.conf", and view how<br>
everything looks in PHP 7 on <a href="http://servername:81/whatever.php" rel="noreferrer" target="_blank">http://servername:81/whatever.<wbr>php</a> .  (Or<br>
there'll be something I've forgotten, and it'll barf and write stuff<br>
to the error log....)<br>
<br>
This is kind of a pain, but it should work properly for testing stuff.<br>
</blockquote>
<br>
-- <br></div></div><span><font color="#888888">
Keith Smith</font></span><div><div><br>
------------------------------<wbr>---------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.or<wbr>g</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mail<wbr>man/listinfo/plug-discuss</a><br>
</div></div></blockquote></div><br></div></div></div>
<br>------------------------------<wbr>---------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.<wbr>org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/<wbr>mailman/listinfo/plug-discuss</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font color="#0b5394">James</font><div><br><span style="color:rgb(255,255,255)"><span style="background-color:rgb(11,83,148)"><b><a href="http://www.linkedin.com/pub/james-h-dugger/15/64b/74a/" target="_blank"><span style="background-color:rgb(255,255,255)"><span></span><span style="color:rgb(11,83,148)">Linkedin<span></span></span></span></a></b></span></span><br></div></div></div>
</div>