Page 1 of 1

Update Vestacp php version to 8.0

Posted: Mon Mar 08, 2021 7:31 pm
by jminsausti
Hello:
I have instaled php 8.0 in my VPS, but i can not select it as my default version for all the users and webs.

I have installed the 8.0 version in my VPS, and if I run in the terminal

Code: Select all

php -v
It returns me

Code: Select all

PHP 8.0.2 (cli) (built: Feb 12 2021 14:48:08) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.2, Copyright (c), by Zend Technologies
When I enter to a domain and i run phpinfo(), it returns me

Code: Select all

PHP Version 7.3.26-1+0~20210112.74+debian9~1.gbpd78724
How can i change it.
Thank you

Re: Update Vestacp php version to 8.0

Posted: Sun Apr 25, 2021 11:46 pm
by Szektor
I haven't tried but maybe this helps:
https://www.trykeith.com/blog-post/how- ... on-vestacp

Re: Update Vestacp php version to 8.0

Posted: Mon Jun 21, 2021 6:44 pm
by saosangmo
I also need this featured but the link is dead.
Szektor wrote:
Sun Apr 25, 2021 11:46 pm
I haven't tried but maybe this helps:
https://www.trykeith.com/blog-post/how- ... on-vestacp

Re: Update Vestacp php version to 8.0

Posted: Thu Jun 09, 2022 1:15 pm
by skorpions2000
saosangmo wrote:
Mon Jun 21, 2021 6:44 pm
I also need this featured but the link is dead.
Szektor wrote:
Sun Apr 25, 2021 11:46 pm
I haven't tried but maybe this helps:
https://www.trykeith.com/blog-post/how- ... on-vestacp

https://web.archive.org/web/20201210164 ... on-vestacp

Re: Update Vestacp php version to 8.0

Posted: Thu Jun 09, 2022 1:48 pm
by skorpions2000

Re: Update Vestacp php version to 8.0

Posted: Mon Jul 03, 2023 2:32 am
by slipchant

Re: Update Vestacp php version to 8.0

Posted: Wed Jul 19, 2023 2:31 pm
by nehavilash
You need to set PHP 8.0 as the default PHP version for Apache and PHP-FPM.
Go to the VestaCP panel > Web > Edit Web Template.
Then, in the Additional NGINX directives field,
add the following lines to set PHP 8.0...

Code: Select all

# PHP 8.0
location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass unix:/run/php/php8.0-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;
}
Save it and apply the changes to all domains using this template.
then rebuild it.

Code: Select all

v-rebuild-web-domains
Finally, restart Apache and PHP-FPM to apply the changes

Code: Select all

service apache2 restart
service php8.0-fpm restart
I'm hoping it works.

Re: Update Vestacp php version to 8.0

Posted: Mon Sep 11, 2023 4:49 pm
by Vegas10128
tried installing this, website is down, and the github repository is not working correctly. while it installs php 8.0, after selecting it in web templates in vesta panel i receive error 500 when visiting website.
using Ubuntu 18.04

I was thinking that it was missing all the extensions,

Code: Select all

sudo apt install php8.0-apcu php8.0-mbstring php8.0-bcmath php8.0-cli php8.0-curl php8.0-gd php8.0-intl php8.0-mcrypt php8.0-mysql php8.0-soap php8.0-xml php8.0-xmlrpc php8.0-json php8.0-zip php8.0-memcache php8.0-memcached php8.0-ldap
however when going to install them via command line I receive the following response.

Code: Select all

E: Unable to locate package php8.0
E: Couldn't find any package by glob 'php8.0'
E: Couldn't find any package by regex 'php8.0'

Re: Update Vestacp php version to 8.0

Posted: Sat Feb 03, 2024 3:38 pm
by laguaz
Thank you so much @skorpions2000 .. It's worked for me..