Welcome to Centmin Mod Community
Become a Member

PHP Multiple PHP Versions on Same Server

Discussion in 'Nginx and PHP-FPM news & discussions' started by skringjer, Aug 13, 2024.

Tags:
  1. skringjer

    skringjer NoobMaster69

    208
    26
    28
    Apr 21, 2019
    Ratings:
    +43
    Local Time:
    8:23 PM
    Nginx 1.21.6
    MariaDB 10.3.x
    Greetings everyone, i am hosting different apps on the server and some can only run on older php while some can only run on newer versions.


    I found this thread to use multiple php on the same server, i have installed php8.2 using this guide.

    GitHub - centminmod/centminmod-php71: testing concurrent PHP (php-fpm) version install for centminmod.com LEMP stacks on CentOS 7 only

    But i dont know how to make my vhost use this 8.2 version, can anyone please help.
     
  2. skringjer

    skringjer NoobMaster69

    208
    26
    28
    Apr 21, 2019
    Ratings:
    +43
    Local Time:
    8:23 PM
    Nginx 1.21.6
    MariaDB 10.3.x
    Sorry i found it, its mentioned in the guide.
     
  3. skringjer

    skringjer NoobMaster69

    208
    26
    28
    Apr 21, 2019
    Ratings:
    +43
    Local Time:
    8:23 PM
    Nginx 1.21.6
    MariaDB 10.3.x
    Now how can i make composer / laravel use this new php :D
     
  4. skringjer

    skringjer NoobMaster69

    208
    26
    28
    Apr 21, 2019
    Ratings:
    +43
    Local Time:
    8:23 PM
    Nginx 1.21.6
    MariaDB 10.3.x
    Fixed that too

    php82 /usr/local/bin/composer create-project laravel/laravel myproject --prefer-dist


    Centmin is so powerful thanks alot @eva2000 amazing job


    Running php 7 as global for my other vhost, and php82 for my specific vhost thats running laravel 11
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    1:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Ah have not tested that experimental code and setup in a long time but glad to here it works. Just note for each php-fpm version you install, your overall php memory usage will increase. So ensure you do have enough memory
     
  6. skringjer

    skringjer NoobMaster69

    208
    26
    28
    Apr 21, 2019
    Ratings:
    +43
    Local Time:
    8:23 PM
    Nginx 1.21.6
    MariaDB 10.3.x
    It works perfect, Yes i read that part about memory usage, i have a very good server with good memory so no issues there.