Avatar of chrislindsay
chrislindsay
Flag for United Kingdom of Great Britain and Northern Ireland asked on

PHP 5.6 and 7.x

Hi Experts,

Can I run PHP 5.6 and 7.x for the same website on IIS 8.  

I have a lot of legacy code which I want to keep but my all new development I want to utilize PHP 7.x

Is this possible in a production environment

Thanks

Chris
PHPMicrosoft IIS Web Server

Avatar of undefined
Last Comment
chrislindsay

8/22/2022 - Mon
SOLUTION
skullnobrains

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Dan McFadden

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Ray Paseur

in a production environment
Not to be flip, but if you have to ask the question, the answer is "no!"  Depending on your level of PHP and your diligence with security, modernity, etc., there may be breaking changes in PHP7, so you want to take some careful steps to accomplish the upgrade.

First, know why you want to upgrade.  Set measurable goals so you can see the advantages you want to get from the upgrade, and measure your progress against these goals.

Second, be certain that you have (as near as possible) complete code coverage in your tests, and a sturdy test data set that you can exercise quickly and easily.

Third, read the migration guides. http://php.net/manual/en/migration70.php  Then read them again.

I agree with skullnobrains on this (I usually do): You might want to consider using a different file suffix for the PHP7 code.  I recall using .php and .php5 when PHP5 was introduced.  It helped keep everything well-segregated, and allowed us to make piecemeal changes in the 400+ scripts that required upgrades.  I don't really know much about Windows, but in a Linux environment you can use .htaccess to control PHP versions and settings on a directory-by-directory basis -- very handy!
chrislindsay

ASKER
Thanks Guys.  It looks like updating from 5.6 to 7 is relatively straightforward  and maybe this is the best way to go....
Thanks for you help...
Your help has saved me hundreds of hours of internet surfing.
fblack61