Need 2 PHP versions for using Drupal on LAMP












0















I need to run 2 different PHP versions (5.6 and 7) because of Drupal 6 & 8.
Actually I use a LAMP server Ubuntu 16.04 with PHP 5.6.
So these are my needs:




  • How can I install 2 differents PHP versions ?

  • How can I assign/choose a specific PHP version for each website depending on the drupal version ?


This for starting.



Thanks










share|improve this question


















  • 1





    I personally try to avoid to taint my system with project specific installations. A really nice alternative to installing PHP is to run it inside a docker container with XDebug enabled while mounting the working dir into it. But this takes a bit more time to setup.

    – Christoph Grimmer-Dietrich
    Dec 13 '18 at 17:00
















0















I need to run 2 different PHP versions (5.6 and 7) because of Drupal 6 & 8.
Actually I use a LAMP server Ubuntu 16.04 with PHP 5.6.
So these are my needs:




  • How can I install 2 differents PHP versions ?

  • How can I assign/choose a specific PHP version for each website depending on the drupal version ?


This for starting.



Thanks










share|improve this question


















  • 1





    I personally try to avoid to taint my system with project specific installations. A really nice alternative to installing PHP is to run it inside a docker container with XDebug enabled while mounting the working dir into it. But this takes a bit more time to setup.

    – Christoph Grimmer-Dietrich
    Dec 13 '18 at 17:00














0












0








0








I need to run 2 different PHP versions (5.6 and 7) because of Drupal 6 & 8.
Actually I use a LAMP server Ubuntu 16.04 with PHP 5.6.
So these are my needs:




  • How can I install 2 differents PHP versions ?

  • How can I assign/choose a specific PHP version for each website depending on the drupal version ?


This for starting.



Thanks










share|improve this question














I need to run 2 different PHP versions (5.6 and 7) because of Drupal 6 & 8.
Actually I use a LAMP server Ubuntu 16.04 with PHP 5.6.
So these are my needs:




  • How can I install 2 differents PHP versions ?

  • How can I assign/choose a specific PHP version for each website depending on the drupal version ?


This for starting.



Thanks







php drupal lamp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 '18 at 10:06









webmaster pfwebmaster pf

189114




189114








  • 1





    I personally try to avoid to taint my system with project specific installations. A really nice alternative to installing PHP is to run it inside a docker container with XDebug enabled while mounting the working dir into it. But this takes a bit more time to setup.

    – Christoph Grimmer-Dietrich
    Dec 13 '18 at 17:00














  • 1





    I personally try to avoid to taint my system with project specific installations. A really nice alternative to installing PHP is to run it inside a docker container with XDebug enabled while mounting the working dir into it. But this takes a bit more time to setup.

    – Christoph Grimmer-Dietrich
    Dec 13 '18 at 17:00








1




1





I personally try to avoid to taint my system with project specific installations. A really nice alternative to installing PHP is to run it inside a docker container with XDebug enabled while mounting the working dir into it. But this takes a bit more time to setup.

– Christoph Grimmer-Dietrich
Dec 13 '18 at 17:00





I personally try to avoid to taint my system with project specific installations. A really nice alternative to installing PHP is to run it inside a docker container with XDebug enabled while mounting the working dir into it. But this takes a bit more time to setup.

– Christoph Grimmer-Dietrich
Dec 13 '18 at 17:00












1 Answer
1






active

oldest

votes


















2














PHP 5.6 security updates will end at the end of this year. Starting January 1st, PHP 5.6 is considered not secure. Before anything else, please consider migrating your Drupal 6 installation to PHP 7 instead of running a two tiered solution.



To find out more about why you shouldn't use PHP 5.6 under Drupal 6, see this 3rd-party announcement of PHP7 support: https://www.mydropwizard.com/blog/drupal-6-year-2020-and-php-7-support



If for some reason you still wish to run different versions of PHP, and are running mod-php, you can do so by specifying the version in the .htaccess file of each Drupal installation. Full details at how to change php version in htaccess in server



For the modern PHP-FPM setups, you'll likely need to set the version in the virtual hosts file...



Good luck on your mission!






share|improve this answer


























  • thanks for this information, if I can use a Drupal 6 version compatible with PHP7, it will be better and easier for me.So I go to learn how to update php 5.6 to 7 on my lamp server.

    – webmaster pf
    Nov 27 '18 at 9:12













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390582%2fneed-2-php-versions-for-using-drupal-on-lamp%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














PHP 5.6 security updates will end at the end of this year. Starting January 1st, PHP 5.6 is considered not secure. Before anything else, please consider migrating your Drupal 6 installation to PHP 7 instead of running a two tiered solution.



To find out more about why you shouldn't use PHP 5.6 under Drupal 6, see this 3rd-party announcement of PHP7 support: https://www.mydropwizard.com/blog/drupal-6-year-2020-and-php-7-support



If for some reason you still wish to run different versions of PHP, and are running mod-php, you can do so by specifying the version in the .htaccess file of each Drupal installation. Full details at how to change php version in htaccess in server



For the modern PHP-FPM setups, you'll likely need to set the version in the virtual hosts file...



Good luck on your mission!






share|improve this answer


























  • thanks for this information, if I can use a Drupal 6 version compatible with PHP7, it will be better and easier for me.So I go to learn how to update php 5.6 to 7 on my lamp server.

    – webmaster pf
    Nov 27 '18 at 9:12


















2














PHP 5.6 security updates will end at the end of this year. Starting January 1st, PHP 5.6 is considered not secure. Before anything else, please consider migrating your Drupal 6 installation to PHP 7 instead of running a two tiered solution.



To find out more about why you shouldn't use PHP 5.6 under Drupal 6, see this 3rd-party announcement of PHP7 support: https://www.mydropwizard.com/blog/drupal-6-year-2020-and-php-7-support



If for some reason you still wish to run different versions of PHP, and are running mod-php, you can do so by specifying the version in the .htaccess file of each Drupal installation. Full details at how to change php version in htaccess in server



For the modern PHP-FPM setups, you'll likely need to set the version in the virtual hosts file...



Good luck on your mission!






share|improve this answer


























  • thanks for this information, if I can use a Drupal 6 version compatible with PHP7, it will be better and easier for me.So I go to learn how to update php 5.6 to 7 on my lamp server.

    – webmaster pf
    Nov 27 '18 at 9:12
















2












2








2







PHP 5.6 security updates will end at the end of this year. Starting January 1st, PHP 5.6 is considered not secure. Before anything else, please consider migrating your Drupal 6 installation to PHP 7 instead of running a two tiered solution.



To find out more about why you shouldn't use PHP 5.6 under Drupal 6, see this 3rd-party announcement of PHP7 support: https://www.mydropwizard.com/blog/drupal-6-year-2020-and-php-7-support



If for some reason you still wish to run different versions of PHP, and are running mod-php, you can do so by specifying the version in the .htaccess file of each Drupal installation. Full details at how to change php version in htaccess in server



For the modern PHP-FPM setups, you'll likely need to set the version in the virtual hosts file...



Good luck on your mission!






share|improve this answer















PHP 5.6 security updates will end at the end of this year. Starting January 1st, PHP 5.6 is considered not secure. Before anything else, please consider migrating your Drupal 6 installation to PHP 7 instead of running a two tiered solution.



To find out more about why you shouldn't use PHP 5.6 under Drupal 6, see this 3rd-party announcement of PHP7 support: https://www.mydropwizard.com/blog/drupal-6-year-2020-and-php-7-support



If for some reason you still wish to run different versions of PHP, and are running mod-php, you can do so by specifying the version in the .htaccess file of each Drupal installation. Full details at how to change php version in htaccess in server



For the modern PHP-FPM setups, you'll likely need to set the version in the virtual hosts file...



Good luck on your mission!







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 14 '18 at 11:37

























answered Nov 22 '18 at 9:56









BytechBytech

514216




514216













  • thanks for this information, if I can use a Drupal 6 version compatible with PHP7, it will be better and easier for me.So I go to learn how to update php 5.6 to 7 on my lamp server.

    – webmaster pf
    Nov 27 '18 at 9:12





















  • thanks for this information, if I can use a Drupal 6 version compatible with PHP7, it will be better and easier for me.So I go to learn how to update php 5.6 to 7 on my lamp server.

    – webmaster pf
    Nov 27 '18 at 9:12



















thanks for this information, if I can use a Drupal 6 version compatible with PHP7, it will be better and easier for me.So I go to learn how to update php 5.6 to 7 on my lamp server.

– webmaster pf
Nov 27 '18 at 9:12







thanks for this information, if I can use a Drupal 6 version compatible with PHP7, it will be better and easier for me.So I go to learn how to update php 5.6 to 7 on my lamp server.

– webmaster pf
Nov 27 '18 at 9:12






















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390582%2fneed-2-php-versions-for-using-drupal-on-lamp%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to pass form data using jquery Ajax to insert data in database?

National Museum of Racing and Hall of Fame

Guess what letter conforming each word