Is it possible to install the Memcached extension for PHP 7 alongside a PHP 5.6 install? - memcached

Is it possible to install the Memcached extension for PHP 7 on CentOS7 alongside a Memcached with PHP 5.6 install? The server is running DirectAdmin custombuild 2.0 which lets you run 2 PHP versions alongside each other.
And this Memcached installation guide is for Debian, what would be different / would it work for CentOS7?

Related

i can't able to run composer install command under my /var/www/html/magento2

i am facing problem while setting up the magento server on Centos7 i have php 7.3 install in my centos ec2 instance
installed php 7.3.5, also tried to update composer using $composer update command it doesn't work
composer install
Magento 2 does not support php 7.3 as of yet. A significant numer of core modules specify the php versions they will allow. You will need to change your php version. See this link for the supported versions. https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html

How do I get PHP 7.1 to talk to PostgreSQL on RHEL 7?

Running a Laravel installation on a RedHat Enterprise Linux 7 server using PHP 7.1. I can see php-pgsql.x86_64 listed in the available yum packages, but it doesn't appear to be compatible with PHP 7.1 (and indeed is listed as version 5.4.16-43.el7_4.1).
On a lark, I tried installing it anyway and physically moved the pgsql.ini and pdo_pgsql.ini files from /etc/php.d into the relevant PHP 7.1 folder /etc/opt/rh/rh-php71/php.d/ (and did the same with the .so files they reference), but that returns an error indicating that the package couldn't be read (undefined symbol: file_globals_id in Unknown on line 0).
Has anyone managed to get PHP 7.1 talking to PostgreSQL on RHEL 7?
The sysadmin who originally created the server for me set me straight. The problem was I was looking in the wrong repository for the packages I needed for my particular PHP installation. Running the following two commands did the trick:
sudo yum install --disablerepo=* --enablerepo=rhui-REGION-rhel-server-rhscl rh-php71-php-odbc
sudo yum install --disablerepo=* --enablerepo=rhui-REGION-rhel-server-rhscl rh-php71-php-pgsql
We then added those two packages to the Ansible playbook so future generations would not suffer needlessly.

Want to install SOAP on PHP5.5

I am working on ubuntu 16.04 with PHP version 5.5 now I want to use SOAP library in it.
I have already installed php-soap package(with ref. How do I enable --enable-soap in php on linux?) and tried to enable it. but it won't works for me anyway.
By searching I found php soap package are available for PHP version 5.6, 7.0, 7.1.but am working on PHP version 5.5 and in situation that I can't change PHP version of my system.
Any way or suggestion to install soap for PHP5.5 would be great help.
The SOAP package is available for all versions of PHP since at least 4 something. There are two options on how to install/enable it depending on the way your PHP was installed initially.
If your PHP was installed via the distribution's package manager you just have to install the package php-soap. On your Ubuntu this should be:
sudo apt-get install php-soap
If your PHP was compiled on your machine you will have to compile it again passing in the switch --enable-soap .This switch could differ depending on your PHP verison. Check the documentation of make in PHP's source if this is the case.

PHP 5.3.29 on Ubuntu 16.04 in order to run Joomla 1.5 locally

I'm working on a Joomla 1.5 website, which was developed with PHP 5.3. Now I'm having some incompatibilities issues with some components.
My machine runs Ubuntu 16.04.
The version of Joomla is 1.5.
PHP versions are 5.6 and 7.0 (apache is configured to run PHP 5.6)
I can't find a way to download and install it. The apt command only shows 5.5, 5.6, 7.0 and 7.1 PHP versions.
Can anyone help me?
I have joomla 1.5 on a website running. My config shows that PHP 5.4.16 is in use. Therefore, why dont you try it with PHP 5.4 and get it from the download page:
http://php.net/releases/
If you have troubles to install it on your computer. Take a look here:
https://serverfault.com/questions/353550/how-to-install-old-php-version
The link explains how you install a old php version on linux. Btw.: in the link it is only explained how to replace a PHP version. But it is possible to run different versions on a server.

How to install MongoDB on amazon linux and connect it to Laravel-jenssegers MongoDB?

I followed this for installing mongodb on Amazon Linux. I have a laravel project to host on my amazon Linux server. Jenssegers mongoDB is already installed in the framework while developing the web app (in Ubuntu).
The web app was developed in Ubuntu 12.04 LTS, and it was working properly.
When I hosted it on the server I am getting error:
Class 'MongoClient' not found
My questions are
1. How can I configure mongodb on amazon linux?
(now when i do sudo service mongod restart it is showing FAILED)
2.What all are the configurations that must be changed in the web app(which is done in Ubuntu) in order to use mongodb?
I am using PHP54
httpd 24
Laravel 4.2
Mongo client is not included in the base PHP API. Instead it needs to be installed as extension.
Its not part of the base repository, but it is part of EPEL which can be enabled on Amazon Linux. You can also install it via pecl (Provided you have installed the tools to compile extensions). Use one of the two commands to install the extension:
yum install php-pecl-mongo --enablerepo=epel
OR
pecl install mongo
Once the installation is complete, restart apache and/or php.