Page 1 of 1

Multiple PHP Versions Ubuntu 18.04 Problem

Posted: Tue Dec 05, 2023 1:17 pm
by elnaw
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?

Re: Multiple PHP Versions Ubuntu 18.04 Problem

Posted: Sun Mar 03, 2024 4:58 pm
by laguaz
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.

Re: Multiple PHP Versions Ubuntu 18.04 Problem

Posted: Sat Jun 01, 2024 6:49 am
by jenny
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.

Re: Multiple PHP Versions Ubuntu 18.04 Problem

Posted: Fri Jun 07, 2024 7:00 am
by mikeman
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.

Re: Multiple PHP Versions Ubuntu 18.04 Problem

Posted: Fri Jul 12, 2024 8:21 am
by jenny
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.

Re: Multiple PHP Versions Ubuntu 18.04 Problem

Posted: Thu Aug 22, 2024 12:12 pm
by mikeman
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.

Re: Multiple PHP Versions Ubuntu 18.04 Problem

Posted: Sun Sep 22, 2024 10:12 am
by jenny
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.

Re: Multiple PHP Versions Ubuntu 18.04 Problem

Posted: Wed Oct 02, 2024 2:09 pm
by mikeman
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

Re: Multiple PHP Versions Ubuntu 18.04 Problem

Posted: Thu Nov 21, 2024 11:43 am
by jenny
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.

Re: Multiple PHP Versions Ubuntu 18.04 Problem

Posted: Tue May 27, 2025 6:44 am
by mikeman
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.