Install php5-mcrypt on Ubuntu - php

I want to install the mcrypt on vagrant machine.
The OS is Ubuntu.
Which is the command?

First check php version,
E.g.
php -v
PHP 5.6.38-3+ubuntu18.04.1+deb.sury.org+1 (cli)
Currently php version is 5.6, you will need to install with below command line
sudo apt-get install php5.6-mcrypt
Output

Related

Update php on Oracle Linux Server

I have an Oracle Linux Server. I am trying to install PHP. PHP 5.4 installed on OLS. Is there a way to update to php 7.2? When I run yum install php it installs version 5.4.
UPDATE
I reinstall linux to ubuntu. There is no any problem on ubuntu
sudo yum install oracle-php-release-el7
sudo yum install php
See also: https://yum.oracle.com/oracle-linux-php.html

Unable to install php 5.6 in ubuntu 14.04

I am trying to install php5.6 into my ubuntu 14.04 server.
Using following link
https://tecadmin.net/install-php5-on-ubuntu/
Using following Commands.
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php5.6
but getting following error.
"Unable to locate package php5.6"
"Couldn't find ant package by regex'php5.6' "
Please provide solution.
It was removed from repository. You can`t install it from ondrej/php repository
Ubuntu 14.04 (Trusty), PHP 5.6 and PHP 7.0 going away See also: Ubuntu 14.04 LTS reached end-of-life

Install PHP 5.6.2 (specific version) and mysql 5.6.17 in Ubuntu OS

Install PHP 5.6.2 (specific version) and mysql 5.6.17 in Ubuntu OS. There are ways to install LAMP, but i am looking for the specific versions. Please guide me..
OS version: Ubuntu 15.04
You can install any version using apt-get in this way:
sudo apt-get install <package-name>=<package-version-number>
You can list the versions by using this command:
apt-cache showpkg <package-name>

Unable to install PHP 5.5

I had LAMP Server installed on Ubuntu 12.10 with PHP 5.3. I had to remove it so i used this link.
Now I am trying to install LAMP with PHP 5.4 or higher using the ondrej ppa but i end up installing 5.3.10 again and again. I install using the below commands :
for 5.5 i tried,
sudo add-apt-repository ppa:ondrej/php5
and for 5.4 i tried,
sudo add-apt-repository ppa:ondrej/php5-oldstable
and then the regular update and install
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5
However in the end when i run php -v i see that the version installed is 5.3.10-1ubuntu3.19
I have tried restarting the web server. still noting changes. I dont know where it is going wrong.

uninstall mongodb php driver and install a different version

I'm using Ubuntu Xampp (Lampp) and currently on MongoDB 1.5.3 driver.
I need to downgrade to 1.4.5, but when re-installed the downgraded driver, it does not change in phpinfo(). Yes, I have restarted Apache.
So, how do I uninstall the current one and install the downgraded version?
Update: 2018-06-20:
PECL package mongo is now deprecated, you should use mongodb package instead:
sudo pecl install -f mongodb-1.4.4
Original answer
You can upgrade to a specific version of a driver by using pecl:
sudo pecl install -f mongo-1.4.5
If you get a pecl: command not found error you will need to install PEAR package:
sudo apt-get update && sudo apt-get install php-pear
You can use this command to check that you have the correct version installed:
sudo pecl info mongo
Or you can check php configuration directly with:
php -i | grep -A 1 MongoDB

Categories