NotionCommotion Posted September 13, 2016 Share Posted September 13, 2016 Am I able to install PHP7 and keep PHP5 on my server without creating a virtual server? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/302175-using-both-php5-and-php7/ Share on other sites More sharing options...
Jacques1 Posted September 13, 2016 Share Posted September 13, 2016 If you compile PHP from source, you can have as many different versions as you want. If you use some package manager, it may be more challenging, but I'm sure Google knows the answer to that as well. Quote Link to comment https://forums.phpfreaks.com/topic/302175-using-both-php5-and-php7/#findComment-1537492 Share on other sites More sharing options...
NotionCommotion Posted September 13, 2016 Author Share Posted September 13, 2016 I've never configured Apache to utilize more than one version, but based on your response, I take it that it is possible (and not that difficult). Quote Link to comment https://forums.phpfreaks.com/topic/302175-using-both-php5-and-php7/#findComment-1537505 Share on other sites More sharing options...
kicken Posted September 14, 2016 Share Posted September 14, 2016 It is possible sure. For example I use PHP 5.4, 5.6, and 7.0 on my development box for different applications in order to better match what they run in production. Each virtual host configures which version to use with a directive like: FcgidInitialEnv PATH "W:/PHP7.0;C:/Windows/system32;C:/Windows;C:/Windows/System32/Wbem" FcgidInitialEnv PHPRC "W:/PHP7.0" <Files ~ "\.php$>" SetHandler fcgid-script FcgidWrapper "W:/PHP7.0/php-cgi.exe" </Files> That's using mod_fcgid. The exact configuration you'd use would depend on what kind of Apache setup you are using. Using mod_proxy_fcgi with php-fpm would be different for example. Quote Link to comment https://forums.phpfreaks.com/topic/302175-using-both-php5-and-php7/#findComment-1537536 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.