Can't install lsphp56 on Ubuntu 18.04 - php

I tried to install PHP 5.6 with LiteSpeed SAPI for my OpenLiteSpeed Webserver on Ubuntu 18.04 from an official repository using this guide: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:apt
But after adding the LiteSpeed Debian Repository command sudo apt search lsphp56 gave me no result (the earliest version I can find is lsphp 7.0). Am I did something wrong or OLS stop to support lsphp56? Is there another way to install lsphp 5.6 on OLS?

Related

Linux add PHP 7.4 to Webmin/Virtualmin

My current setup of Webmin/Virtualmin has PHP 5.6 and 7.2. More and more composer packages have a requirement of PHP 7.4. I don't want to have 7.4 as the default PHP, I have sites on the server that need 5.6 (I know, not great but it's the way it is), so I'm trying to get 7.4 installed in the same structure as 7.2, in the /opt/rh folder.
The version of Linux is "CentOS Linux release 7.8.2003 (Core)"
I've tried to do this about 5 times and failed each time, there is just no information (that I can find) out there to say how to do this. Any help would be massively appreciated.
If you need to keep default version of PHP, make sure to install PHP 7.4 from [remi-safe] repos.
Install Remi Release repo and clear cache:
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm && yum clean all
Install PHP 7.4 packages:
yum -y install php74-php-{cli,pdo,fpm,zip,gd,xml,mysqlnd}
It's clearly described in our documentation page on how to install different versions of PHP for Virtualmin.
You can have couple version of php running in the same time.
Check this
Multiple PHP Version on Centos

Installing PHP 7.4 on macOS Sierra without brew?

I am unable to find any info on installing PHP 7.4, all the info seems to go untill 7.3 but that has not been helpful.
What I have done so far is execute:
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.4
And this is the message I got:
It doesn't seem to install. How can I solve this problem?
If you check the script https://php-osx.liip.ch/install.sh you can see it only support 7.3
Yes, you can install and upgrade to latest php version on mac without homebrew.
For me I use MacPorts a package manager for MacOS which is similar to HomeBrew but more stable.
Example to upgrade to php74:
sudo port install php74
Install the extensions you need
sudo port install php74-cgi php74-gd php74-curl php74-intl php74-iconv php74-gettext php74-mbstring php74-imap php74-mcrypt php74-xmlrpc php74-mysql php74-openssl php74-sockets php74-zip php74-tidy php74-opcache php74-xsl php74-sqlite
Select php74 as the active PHP version. With this command you can have multiple php version and quickly switch from one to the other.
sudo port select php php74
Check which PHP binary is used (should return /opt/local/bin/php). Perhaps you may need to restart you terminal.
which php
Check the version (should return “PHP 7.4.XX (cli)…”)
php --version
Also, If you use XAMPP ensure to restart Apache Web server.
(Article Reference)

Is PHP Tidy still available in Centos 7

I'm currently trying to install PHP Tidy on a CentOS 7 server (I'm running PHP Version 5.4.16 if that helps as well), but am having problems with the install.
I've been running (as per the documentation)
yum install php-tidy
but get the following error:
No package php-tidy available.
Error: Nothing to do
I've found someone having the same problem here, and the answer is listed as
When I installed via CentOS tidy.x86_64 and php-tidy.x86_64 were installed but Red Hat could not find the php-tidy.x86_64 rpm and I had to add the EPEL repository, then I managed to install php-tidy.x86_64 and it worked
...but I'm not sure what to make of that.
I've also found via the official Tidy documentation:
On Redhat-ish linux, you must install both libtidy and libtidy-devel (PHP 5.x):
sudo yum install libtidy libtidy-devel
...however I also get the same "No package..." error.
My only lead is that it doesn't appear that any of the documentation has to do with CentOS 7 (I believe they use CentOS 6 or 5, or an older version of PHP) and some of the suggestions are that some systems require yum install php5-tidy instead. So hence my original question on if Tidy is supported on CentOS 7, or if there is something else I might be doing incorrectly.
Use the webtatic repo ... PHP 5.6 on CentOS/RHEL 7.1 and 6.7 via Yum
https://webtatic.com/packages/php56/
php56w-tidy

php56 - CentOS - Remi Repo

I just installed php 5.6 on a test box, and the normal cli php interpreter doesn't appear to exist:
$ -> php -v
-bash: php: command not found
$ -> php56 -v
PHP 5.6.13 (cli) (built: Sep 3 2015 13:41:04)
If I try to do a yum install php --enablerepo=remi then it tries to install php 5.4.
So it's obvious that php56 is a cli interpreter, but I've always been used to just typing php vs php56. Is this the new norm, or is there another step for installing php56 on CentOS (6.7)? Is it as simple as creating a symlink? ln -s /usr/bin/php56 /usr/bin/php
Steps to upgrade:
$ -> yum remove php* --enablerepo=remi
$ -> yum install php56* --enablerepo=remi
Thx to Remi for the push in the right direction, here's what my repo config looks like:
[upstream_remi54]
name=Remi - CentOS - $releasever/$arch
baseurl=http://mirrors.mediatemple.net/remi/enterprise/$releasever/remi/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
[upstream_remi56]
name=Remi - CentOS - $releasever/$arch
baseurl=http://mirrors.mediatemple.net/remi/enterprise/$releasever/php56/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
This works well if you want to completely replace existing PHP, vs running versions in parallel. I have to keep PHP 5.4 in place for Roundcube and Postfix Admin, as some of the modules necessary for those to work have not yet been ported, so that server has to stay 5.4 for now.
php-* are base packages, 1 repository per version
"remi" => php 5.4
"remi-php55" => php 5.5
"remi-php56" => php 5.6
"remi-php70" => php 7.0 (Release Candidate, not ready for prod)
php56-* packages are Software Collections, parallel installation allowing to run multiple versions of PHP.
See : http://blog.remirepo.net/pages/English-FAQ
So, if you only want a single php version 5.6
yum --enablerepo=remi-php56 install php-cli (and other needed modules)
And you can also enable the repository for future update (as the "remi-php56" is safe and only provides php 5.6 and its extension)
yum-config-manager --enable remi-php56

Ubuntu 12.04 PHP 5.5 and apache2 2.4

I'm on Ubuntu 12.04 64 bit, I decided to upgrade to PHP 5.5 from 5.3 and apache2 2.2 to 2.4. I did something similar to Installing apache 2.4 and php 5.5 on ubuntu 12.04. Long story short something's broken and it's not working correctly so I want to go back to PHP 5.3 and apache2 2.2.
Is it just a case of uninstalling PHP and Apache, removing the sources I added, do a package update and then reinstalling PHP and Apache using apt? I just want to go back to a version of PHP and Apache that work correctly and are supported by 12.04.
Thanks.
Remove the files in /etc/apt/sources.list.d/ that matches the ppa names you added. You should find one like ondrej
Run then sudo apt-get update && sudo apt-get install php5 apache2 and you should have all back working
I've used ondrej ppa too (There are apache 2.4 and mysql 5.6 too from the same author which works really well for me, https://launchpad.net/~ondrej)

Categories