Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Multiple PHP Versions Ubuntu 18.04 Problem

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
10 posts • Page 1 of 1
elnaw
Posts: 1
Joined: Sun Sep 13, 2020 4:43 am

Os: Ubuntu 17x
Web: apache + nginx
Multiple PHP Versions Ubuntu 18.04 Problem
  • Quote

Post by elnaw » Tue Dec 05, 2023 1:17 pm

Hi,
I am running php7.2 & 8.2 and I want to install phpcgi and php8.0 but nothing there but php8.0-common.
Any solution?
Top

laguaz
Posts: 8
Joined: Fri Dec 06, 2019 4:51 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Multiple PHP Versions Ubuntu 18.04 Problem
  • Quote

Post by laguaz » Sun Mar 03, 2024 4:58 pm

elnaw wrote: ↑
Tue Dec 05, 2023 1:17 pm
Hi,
I am running php7.2 &download lagu 8.2 and I want to install phpcgimp3juice and phptubidy8.0 but nothing there but php8.0-common.
Any solution?
Hello, Can anyone answer this? I'm looking for a solution because I have the same problem. If anyone has one, please tag me. Thanks a lot.
Top

jenny
Posts: 7
Joined: Sat May 27, 2023 6:30 am

Os: Ubuntu 18x
Web: apache + nginx
Re: Multiple PHP Versions Ubuntu 18.04 Problem
  • Quote

Post by jenny » Sat Jun 01, 2024 6:49 am

Managing multiple PHP versions on Ubuntu 18.04 can be a common challenge, especially when working with different projects that require different PHP versions. One popular solution for this is to use a tool called phpbrew. Here's how you can set it up and use it with an example:
Install phpbrew:
First, install phpbrew by running the following commands in your terminal:

Code: Select all

sudo apt-get update
sudo apt-get install -y curl php-cli php-mbstring git unzip
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
sudo mv phpbrew /usr/local/bin/phpbrew
phpbrew init
Install desired PHP versions:
Now, let's say you want to install PHP 7.4 and PHP 8.0. You can do this with phpbrew:

Code: Select all

phpbrew install 7.4 +default
phpbrew install 8.0 +default
Switch between PHP versions:
After installation, you can switch between PHP versions using the switch command. For example:

Code: Select all

phpbrew switch php-7.4.24
Use the desired PHP version:
Once you've switched to the desired PHP version, you can verify it by running:

Code: Select all

php -v
This way, you can easily manage multiple PHP versions on Ubuntu 18.04 and switch between them as needed for different projects.
Top

mikeman
Posts: 10
Joined: Thu Jan 05, 2023 7:27 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Multiple PHP Versions Ubuntu 18.04 Problem
  • Quote

Post by mikeman » Fri Jun 07, 2024 7:00 am

jenny wrote: ↑
Sat Jun 01, 2024 6:49 am
Managing multiple PHP versions on Ubuntu 18.04 can be a common challenge, especially when working with different projects that require different PHP versions. One popular solution for this is to use a tool called phpbrew. Here's how you can set it up and use it with an example:
Install phpbrew:
First, install phpbrew by running the following commands in your terminal:

Code: Select all

sudo apt-get update
sudo apt-get install -y curl php-cli php-mbstring git unzip
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
sudo mv phpbrew /usr/local/bin/phpbrew
phpbrew init

Install desired PHP versions:
Now, let's say you want to install PHP 7.4 and PHP 8.0. You can do this with phpbrew:

Code: Select all

phpbrew install 7.4 +default
phpbrew install 8.0 +default
Switch between PHP versions:
After installation, you can switch between PHP versions using the switch command. For example:

Code: Select all

phpbrew switch php-7.4.24
Use the desired PHP version:
Once you've switched to the desired PHP version, you can verify it by running:

Code: Select all

php -v
This way, you can easily manage multiple PHP versions on Ubuntu 18.04 and switch between them as needed for different projects.
Thank you very much for providing the detailed solution for the Multiple PHP Versions Ubuntu 18.04 Problem.
Because as we know that, Managing different PHP versions on Ubuntu 18.04 can be quite a headache, especially when each project demands its specific version. Luckily, there's a handy tool called phpbrew to save the day. Imagine you're working on two projects: one requires PHP 7.4, while the other needs PHP 8.0. With phpbrew, you can smoothly set up and switch between these versions. First, install phpbrew and initialize it in your terminal. Then, it's a breeze to install the desired PHP versions—simply run commands to install PHP 7.4 and PHP 8.0. After installation, toggling between versions is effortless; a quick phpbrew switch php-7.4.24 does the trick. To confirm you're using the right version, just type php -v, and voila! You're all set to tackle various projects without the hassle of version conflicts.
Top

jenny
Posts: 7
Joined: Sat May 27, 2023 6:30 am

Os: Ubuntu 18x
Web: apache + nginx
Re: Multiple PHP Versions Ubuntu 18.04 Problem
  • Quote

Post by jenny » Fri Jul 12, 2024 8:21 am

mikeman wrote: ↑
Fri Jun 07, 2024 7:00 am


Thank you very much for providing the detailed solution for the Multiple PHP Versions Ubuntu 18.04 Problem.
Because as we know that, Managing different PHP versions on Ubuntu 18.04 can be quite a headache, especially when each project demands its specific version. Luckily, there's a handy tool called phpbrew to save the day. Imagine you're working on two projects: one requires PHP 7.4, while the other needs PHP 8.0. With phpbrew, you can smoothly set up and switch between these versions. First, install phpbrew and initialize it in your terminal. Then, it's a breeze to install the desired PHP versions—simply run commands to install PHP 7.4 and PHP 8.0. After installation, toggling between versions is effortless; a quick phpbrew switch php-7.4.24 does the trick. To confirm you're using the right version, just type php -v, and voila! You're all set to tackle various projects without the hassle of version conflicts.
Thanks a lot. This is really helpful.
Top

mikeman
Posts: 10
Joined: Thu Jan 05, 2023 7:27 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Multiple PHP Versions Ubuntu 18.04 Problem
  • Quote

Post by mikeman » Thu Aug 22, 2024 12:12 pm

jenny wrote: ↑
Fri Jul 12, 2024 8:21 am
mikeman wrote: ↑
Fri Jun 07, 2024 7:00 am


Thank you very much for providing the detailed solution for the Multiple PHP Versions Ubuntu 18.04 Problem.
Because as we know that, Managing different PHP versions on Ubuntu 18.04 can be quite a headache, especially when each project demands its specific version. Luckily, there's a handy tool called phpbrew to save the day. Imagine you're working on two projects: one requires PHP 7.4, while the other needs PHP 8.0. With phpbrew, you can smoothly set up and switch between these versions. First, install phpbrew and initialize it in your terminal. Then, it's a breeze to install the desired PHP versions—simply run commands to install PHP 7.4 and PHP 8.0. After installation, toggling between versions is effortless; a quick phpbrew switch php-7.4.24 does the trick. To confirm you're using the right version, just type php -v, and voila! You're all set to tackle various projects without the hassle of version conflicts.
Thanks a lot. This is really helpful.
Thanks very much for the appreciation.
Top

jenny
Posts: 7
Joined: Sat May 27, 2023 6:30 am

Os: Ubuntu 18x
Web: apache + nginx
Re: Multiple PHP Versions Ubuntu 18.04 Problem
  • Quote

Post by jenny » Sun Sep 22, 2024 10:12 am

mikeman wrote: ↑
Thu Aug 22, 2024 12:12 pm
jenny wrote: ↑
Fri Jul 12, 2024 8:21 am
mikeman wrote: ↑
Fri Jun 07, 2024 7:00 am


Thank you very much for providing the detailed solution for the Multiple PHP Versions Ubuntu 18.04 Problem.
Because as we know that, Managing different PHP versions on Ubuntu 18.04 can be quite a headache, especially when each project demands its specific version.Luckily, there's a handy tool called phpbrew to save the day. Imagine you're working on two projects: one requires PHP 7.4, while the other needs PHP 8.0. With phpbrew, you can smoothly set up and switch between these versions. First, install phpbrew and initialize it in your terminal. Then, it's a breeze to install the desired PHP versions—simply run commands to install PHP 7.4 and PHP 8.0. After installation, toggling between versions is effortless; a quick phpbrew switch php-7.4.24 does the trick.To confirm you're using the right version, just type php -v, and voila! You're all set to tackle various projects without the hassle of version conflicts.
Thanks a lot. This is really helpful.
Thanks very much once again.
Top

mikeman
Posts: 10
Joined: Thu Jan 05, 2023 7:27 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Multiple PHP Versions Ubuntu 18.04 Problem
  • Quote

Post by mikeman » Wed Oct 02, 2024 2:09 pm

jenny wrote: ↑
Sun Sep 22, 2024 10:12 am
mikeman wrote: ↑
Thu Aug 22, 2024 12:12 pm
jenny wrote: ↑
Fri Jul 12, 2024 8:21 am
Thanks a lot. This is really helpful.
Thanks very much once again.
I try this above It's helpful guide. Thanks
Top

jenny
Posts: 7
Joined: Sat May 27, 2023 6:30 am

Os: Ubuntu 18x
Web: apache + nginx
Re: Multiple PHP Versions Ubuntu 18.04 Problem
  • Quote

Post by jenny » Thu Nov 21, 2024 11:43 am

mikeman wrote: ↑
Wed Oct 02, 2024 2:09 pm
jenny wrote: ↑
Sun Sep 22, 2024 10:12 am
mikeman wrote: ↑
Thu Aug 22, 2024 12:12 pm
Thanks very much once again.
I try this above It's helpful guide. Thanks
You are welcome. Also Thanks once again.
Top

mikeman
Posts: 10
Joined: Thu Jan 05, 2023 7:27 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Multiple PHP Versions Ubuntu 18.04 Problem
  • Quote

Post by mikeman » Tue May 27, 2025 6:44 am

jenny wrote: ↑
Thu Nov 21, 2024 11:43 am
mikeman wrote: ↑
Wed Oct 02, 2024 2:09 pm
jenny wrote: ↑
Sun Sep 22, 2024 10:12 am
I try this above It's helpful guide.
Thanks
You are welcome. Also Thanks once again.
Great Thanks to you too for this valuable guidance.
Top


Post Reply
  • Print view

10 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password