On my distribution of Kali (2016.2) there was a PHP package v7.0.11 pre-installed. I'd like to use version 5.6 instead. What is the best way to remove it?
I've already tried, looking for some guides online, but PHP 7 is still pretty fresh, so there are not too many threads about it, especially while using Kali. Nevertheless, I found some clues but I didn't manage to do it properly, apparently. A lot of mess with dependencies, and overall, my whole Kali install is now broken.
After purging PHP 7, I'd like to install PHP 5.6, is there an easy way to do it with apt?
This will remove all php7 version, be it php 7.0 or php 7.1 etc..
sudo apt-get purge php7.*
I installed php 5.6 following this tutorial : http://www.drupal8.ovh/en/tutoriels/178/how-to-install-php-on-linux
To remove php 7, you can try:
sudo apt-get purge php7.0-common
I prefer to use apt remove php7.0*
This will remove php7 and related packages. It will also downgrade the version to the subsequent (lower) php version.
Related
Please help with php 7 extensions on CentOS 7.
When trying to isntall extension, for example memcache and memcached using the command yum --enablerepo=remi-php74 install php-memcache php-memcached I got the message that this packages are already installed.
php --modules also shows they are present. But I can't find them in /etc/opt/remi/php74/php.d and /opt/remi/php74/root/lib64/php/modules.
I attached screenshot of phpinfo() as well phpinfo, there are no additional extensions...
Please advice what I'm doing wrong, I'm not very strong in this DevOPS things :-)
Also added php --ini response php --ini
For a proper installation please follow the Wizard instructions
If you need a single version, php-* packages are simpler to install and use
If you need multiple versions, php74-php-* are available
You can read the repository FAQ: Difference between php-* and php##-php-* packages ?
So as you are running php74-php you need
yum install php74-php-pecl-memcache php74-php-pecl-memcached
But if you need a single version, probably better to remove all php74* packages and only use php-* ones.
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
I have an Ubuntu 18.04 server with Apache, PHP7.3, and MariaDB.
Now I need to install phpmyadmin and I tried to do that using the code below:
apt install phpmyadmin
But this command will install and replace the PHP7.4 with PHP7.3, whereas I need to keep using PHP7.3.
How can I do this?
How have you installed PHP 7.4, since Ubuntu Bionic (18.04) includes PHP 7.2 (https://packages.ubuntu.com/bionic/php)?
You seem to have gone outside of the standard packages (perhaps you're using the excellent effots provided by Ondřej Surý at https://deb.sury.org/). In this case, it's going to cause you some amount of grief to mix and match the newer PHP with the distribution's phpMyAdmin, because of these dependency problems.
You could force the matter. This is probably going to cause you problems, since Bionic packages phpMyAdmin 4.6.6, which is only supported up to PHP 7.1. https://serverfault.com/questions/250224/how-do-i-get-apt-get-to-ignore-some-dependencies has some instructions on ignoring the dependencies. I recommend avoiding this solution.
You could install your own phpMyAdmin. Download the source from phpmyadmin.net and uncompress it to your web root. You may need to add a short configuration file, config.inc.php, but mostly it just works with the default settings. https://docs.phpmyadmin.net/en/latest/setup.html has a quick start section.
You could downgrade your PHP, but you've already stated this isn't a good option for you, and I'm not sure how the Ubuntu package managers get phpMyAdmin working with this newer PHP version.
Clearly, I think the best solution for you to is to install your own phpMyAdmin.
I updated my server from PHP 5.5 to PHP 7. Now Orange HRM is not Working.
Production is on hr.oyasys.com . Error happen only after login (http://hr.oyasys.com/index.php/dashboard)
stack trace
at ()
in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/sfController.class.php line 182 ...
if ($this->getActionStack()->getSize() >= $this->maxForwards)
{
// let's kill this party before it turns into cpu cycle hell
throw new sfForwardException('Too many forwards have been detected for this request.');
}
I don't think OrangeHRM has accounted for updates to PHP 7. mysql_* functions were also removed and I ran into an error or install.
https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7
OrangeHRM uses the legacy mysql_connect extension which was deprecated in PHP 5.5 and was completely removed from PHP 7.
If you need to run OrangeHRM, you will have to downgrade your PHP version to 5.x or move OrangeHRM to a different compatible server.
I solved in this way to install orangehrm 3.3.0 on ubuntu 16.04
Added PPA repository
sudo add-apt-repository ppa:ondrej/php
Installed php5.6
sudo apt-get update
sudo apt-get install php5.6
Installed some modules
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
Enabled php 5.6 module in apache2
Installation works fine
Downgrading is not really solving the issue, it's just working around the issue. There are a lot of people that cannot simply downgrade due to restrictions with other software running, and in some cases, IT policy.
It sucks, but we're not getting any love or a real solution until OrangeHRM does the changes necessary to support being run under PHP 7.
I'm a UBUNTU and CLI Noob.
I'm running UBUNT 12.04 LTS
I'm trying to get CURL to work for my PHP install and come to find out that PHPCURL does not work with the Dotdeb version of PHP that installed on my server.
Everything I've read so far says to remove the DOtdeb version of PHP and replace it with an official Ubuntu version however I'm not seing any clear instructions on this.
Is there an easy command to remove the Dotdeb version?
Should I just run sudo apt-get -y purge php*? I'm afraid that it will remove stuff I didn't intend to remove but I'm not sure.
Also, how do I know that the new PHP5 package I install is an official Ubuntu package?
First remove Dotdeb.org from your source list.
Next your need to uninstall php5
aptitude purge php5
Now run a simple update
aptitude update
Now reinstall php5
aptitude install php5
This really is the only way to go about it. You really need to do a purge, because simply removing it using normal uninstall does not get rid of the dotdeb config files that sometime remain.
You might just not have the php curl library installed. sudo apt-get install php5-curl will fix that.