Possible to install mcrypt in PHP 7.1 on Oracle Linux 7? - php

Is it possible to install mcrypt in PHP 7.1 running on Oracle Linux 7? This is not listed in the repo here.
I thought that I might be able to install it using "yum install epel-release" and "yum -y install php-mcrypt", however the package is listed as unavailable:
yum -y install php-mcrypt
Loaded plugins: langpacks, ulninfo
No package php-mcrypt available.

Related

Install PHP Packages On Linux

I have Php 7.3 installed and I am trying to install the below packages but I am getting an error "No Package available". Can someone please help?
Command
sudo yum install php73-common php73-cli php73-gd php73-gd php73-mysqlnd php73-ldap php73-soap php73-mbstring
Error
No package php73-common available.
No package php73-cli available.
No package php73-gd available.
No package php73-gd available.
No package php73-mysqlnd available.
No package php73-ldap available.
No package php73-soap available.
No package php73-mbstring available.
You need to enable Remi's PHP7.3 repository first
sudo yum-config-manager ––enable remi–php73
sudo yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql –y
You can update the packages as per your requirement.
Here is a detail doc

Install mongodb driver for php 7.1 on RHEL 7.1

I am trying to install mongodb driver for php 7.1 but not found any solution.
Used following command
pecl install mongodb
But gives , pecl command not found. Tried to install pecl by
yum install pecl
But given no package available
Try install php-pear package. pecl is included on it.
P.S. See https://pkgs.org/download/php-pear
You can also use yum packages:
yum install php71-php-pecl-mongodb.x86_64 -y

How to install all required PHP extensions for Laravel?

I need to make my Ubuntu 16.04. Is there a way using the GUI or is the simplest way to do this by using terminal?
I have already installed PHP 7.1, MariaDB.
I need to enable:
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
The Laravel server requirements specify the PHP extensions, including BCMath, Ctype, cURL, DOM, Fileinfo, JSON, Mbstring, OpenSSL, PCRE, PDO, Tokenizer, and XML, are required. These extensions are usually included and enabled during a PHP installation.
You can use the following command in Ubuntu to check the necessary extensions.
sudo apt install openssl php-bcmath php-curl php-json php-mbstring php-mysql php-tokenizer php-xml php-zip
Installation specific to a particular version of PHP (such as PHP 8.2)
sudo apt install openssl php8.2-bcmath php8.2-curl php8.2-json php8.2-mbstring php8.2-mysql php8.2-tokenizer php8.2-xml php8.2-zip
Additional PHP extensions may require for your composer packages. Refer to the links below for more information.
PHP extensions for Ubuntu 22.04 LTS (Jammy Jellyfish)
PHP extensions for Ubuntu 20.04 LTS (Focal Fossa)
PHP extensions for Ubuntu 18.04 LTS (Bionic)
PHP extensions for Ubuntu 16.04 LTS (Xenial)
**
New requirements for installing Laravel 8 and PHP 8:
**
sudo apt install php8.0-common php8.0-dom php8.0-bcmath openssl php8.0-mbstring
Run the below command. It will install all required php8.1 extensions in Ubuntu
sudo apt install php8.1 php8.1-cli php8.1-common php8.1-mysql php8.1-zip php8.1-curl php8.1-gd php8.1-mbstring php8.1-xml php8.1-bcmath php8.1-fpm php8.1-phpdbg php8.1-cgi libphp8.1-embed libapache2-mod-php8.1
You can install PHP extensions like this:
sudo apt-get install php-xsl php-pgsql
Here is Extension with Name and Commands for UBUNTU
Install or enable PHP's curl extension
sudo apt install phpy-curl
Install or enable PHP's simplexml extension.
sudo apt install php-xml
Install or enable PHP's gd extension
sudo apt-get install php-gd
Install or enable PHP's zip extension
sudo apt install php-zip

Dependency problems between php 5.3 and php 5.6

Originally I had php 5.3 installed in my centos machine (version 6.4) .. however I upgraded the version of php to be 5.6 using these commands lines :
yum remove php-common
yum install php56w
yum install php56w-mysql
yum install php56w-common
yum install php56w-pdo
yum install php56w-opcache
Actually when I run php -v it gives me : 5.6.
However when I'm trying to install the package php-devel:
sudo yum install php-devel --skip-broken
it gives me :
Packages skipped because of dependency problems:
php-5.3.3-47.el6.x86_64 from base
php-cli-5.3.3-47.el6.x86_64 from base
php-common-5.3.3-47.el6.x86_64 from base
php-devel-5.3.3-47.el6.x86_64 from base
How may I correct this dependency problem ?
Thanks
You should install the 5.6 version of php-devel.
sudo yum install php56w-devel
On this link you can see the list of packages for centos and php5.6 on the "packages" section:
https://webtatic.com/packages/php56/

Update PHP Mongo Extension to 1.5 on Ubuntu 14

PHP and Mongo are working correctly however the php5-mongo extension needs updating.
Currently it is version 1.4.5, version 1.5.x is required to be compatible with the latest https://github.com/doctrine/mongodb/
Running does not update the version.
sudo apt-get install php5-mongo
Additional info
mongod --version db version v2.6.12
php --version PHP 5.5.9-1ubuntu4.14
How can the extension be updated? Is pecl required to perform the update?
Try with PECL
sudo pecl install mongodb
Sometime you may get SSL error when connecting to the mongodb so please install dependencies before the pecl installation
sudo pecl channel-update pecl.php.net
sudo pecl uninstall mongodb
sudo apt-get install libcurl4-openssl-dev pkg-config libssl-dev
sudo pecl install mongodb
You should add "extension=mongodb.so" to php.ini
Verify the MongoDB extension and module by using
sudo php --ri mongodb | grep version
sudo apt-cache policy php-mongodb

Categories