These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for PHP Upgrade on the new forum.
This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
Which distro/version is it that you're using there?
We don't generally recommend removing the existing PHP version that comes with your distro, but there are supported ways of installing new/additional PHP versions alongside your existing PHP version.
I have 7.0, 7.1,7.2, and 5.6 running on debian server.
7.1 doesnt seem to be working properly but the others are.
I have kept 5.6 because im surprised at how often i am finding programs that still need it.
AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin
I tried 7.2 and 7.1 , and found lots didn't work, on Centos 7. Got it installed but a pile of sites did not work or could i get them to work.
so i reverted back to 7.0 along with 5.6 as well.
not sure what plans for 7.2 support there will be because i believe ubuntu 18 now thats the version it starts with is 7.2.
Feel free to let us know what issues you are running into. While we're not familiar with the applications you're using, we may be able to help sort out what is going wrong based on the log messages.
If that happens again, take note of any errors that are showing up in $HOME/logs/error_log, you're welcome to share those here.
I need to upgrade to PHP 7.1 or to install this version and I do :
add-apt-repository ppa:ondrej/php && apt-get update
and
apt-get install php7.1 php7.1-mysql php7.1-cgi php7.1-cli
But I get :
Reading package lists ... Done Building the dependency tree Reading status information ... Done Some packages can not be installed. This can mean that you asked for the impossible, or, if you use the unstable distribution, that some packages have not yet were created or did not come out of Incoming. The following information should help you resolve the situation:
The following packages contain unmet dependencies: php7.1-cgi: Depends: php7.1-opcache but will not be installed Depends: libc6 (> = 2.27) but 2.24-11 + deb9u3 will need to be installed php7.1-cli: Depends: php7.1-opcache but will not be installed Depends: libc6 (> = 2.27) but 2.24-11 + deb9u3 will need to be installed E: Unable to fix problems, defective packages are in "keep as is" mode.
Install the new PHP version yum install php72u-cli php72u-common php72u-fpm php72u-gd php72u-imap php72u-mbstring php72u-mysqlnd php72u-pdo php72u-process php72u-xml php72u-xmlrpc php72u-opcache php72u-json php72u-zip php72u-pspell php72u-pecl-apcu php72u-pecl-memcached php72u-ioncube-loader
Please note that I installed some extensions that I needed, so you can just install that you need or just copy the extensios that were removed on the previous command and install here.
Then go to you Virtualmin page and Recheck the configurations
Howdy,
Which distro/version is it that you're using there?
We don't generally recommend removing the existing PHP version that comes with your distro, but there are supported ways of installing new/additional PHP versions alongside your existing PHP version.
This should help get you started:
https://www.virtualmin.com/documentation/web/multiplephp
i am using CentOS Linux 7.5.1804, PHP versions 5.6.25, 7.0.31
Okay, perfect... what I'd do is use the instructions above, but just substitute PHP 7.2 when it refers to PHP 7.0, and you should be good to go!
I have 7.0, 7.1,7.2, and 5.6 running on debian server. 7.1 doesnt seem to be working properly but the others are.
I have kept 5.6 because im surprised at how often i am finding programs that still need it.
https://ajecreative.com.au
I tried 7.2 and 7.1 , and found lots didn't work, on Centos 7. Got it installed but a pile of sites did not work or could i get them to work. so i reverted back to 7.0 along with 5.6 as well.
not sure what plans for 7.2 support there will be because i believe ubuntu 18 now thats the version it starts with is 7.2.
Feel free to let us know what issues you are running into. While we're not familiar with the applications you're using, we may be able to help sort out what is going wrong based on the log messages.
If that happens again, take note of any errors that are showing up in $HOME/logs/error_log, you're welcome to share those here.
I need to upgrade to PHP 7.1 or to install this version and I do :
add-apt-repository ppa:ondrej/php && apt-get update
andapt-get install php7.1 php7.1-mysql php7.1-cgi php7.1-cli
But I get :Reading package lists ... Done
Building the dependency tree
Reading status information ... Done
Some packages can not be installed. This can mean
that you asked for the impossible, or, if you use
the unstable distribution, that some packages have not yet
were created or did not come out of Incoming.
The following information should help you resolve the situation:
The following packages contain unmet dependencies:
php7.1-cgi: Depends: php7.1-opcache but will not be installed
Depends: libc6 (> = 2.27) but 2.24-11 + deb9u3 will need to be installed
php7.1-cli: Depends: php7.1-opcache but will not be installed
Depends: libc6 (> = 2.27) but 2.24-11 + deb9u3 will need to be installed
E: Unable to fix problems, defective packages are in "keep as is" mode.
what do you recommend ? Thank you
I'm runing on Centos 7 and with PHP 7.2.11 from IUS Repository, I think its managed by Rackspace team, right?
What I did is that step-by-step:
Install IUS repository
rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm
Remove PHP default versions
yum remove php* rh-php*
Install the new PHP version
yum install php72u-cli php72u-common php72u-fpm php72u-gd php72u-imap php72u-mbstring php72u-mysqlnd php72u-pdo php72u-process php72u-xml php72u-xmlrpc php72u-opcache php72u-json php72u-zip php72u-pspell php72u-pecl-apcu php72u-pecl-memcached php72u-ioncube-loader
Please note that I installed some extensions that I needed, so you can just install that you need or just copy the extensios that were removed on the previous command and install here.
Then go to you Virtualmin page and Recheck the configurations
Here is the page of repository for all PHP7 extensions:
https://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/repoview/letter_p.group.html
Works. Remember to: sudo systemctl restart php72-php-fpm.service