I've tried following commands:
sudo yum -y update
sudo yum install -y libevent libevent-devel
sudo yum install -y memcached
sudo yum install -y php-pecl-memcache
sudo service memcached restart
sudo service httpd restart
I can see only memcache module which is installed after run above commands.
Finally got Solution!
I've done some research on installation any module for php 7.1. I got success while run below command:
sudo yum install -y php71-memcached [use 72 instead of 71(php version) for php7.2]
I think you had tried commands from this link, but all are not working :D
https://devdocs.magento.com/guides/v2.3/config-guide/memcache/memcache_centos.html
Related
For some reason, my php cli switched to 5.6.40 instead of the 7.2 version that I had before. Then I was unable to restart apache2, so I tried to apt purge php7 & php5 to reinstall them.
But now, I only have this error:
(sorry for the French, it says packages have unsatisfied dependencies). How can I clean it ?
I have already tried the following commands :
apt-get -f install
apt-get clean
apt-get update
apt-get upgrade
You have to purge comlete php7.3:
sudo apt-get remove -y --purge php7.3*
add repository (if not exist):
sudo add-apt-repository ppa:ondrej/php
install dependents
sudo apt install php libapache2-mod-php
if you have apache:
sudo systemctl restart apache2
if you have nginx:
sudo service nginx restart
install php:
sudo apt install php-fpm
check php:
sudo service php7.3-fpm status
I am new to Ec2. Where i have installed php 7. Php is running on ec2. But my php files are in 5.6. So whether running the file in php in ec2 linux. Its not working.
So i have decide to downgrade php 7.2 to php 5.6.
How to Downgrade it. or else How can i uninstall php 7. and reinstall php 5.6.
Thanks in Advance...
You can have multiple versions of PHP running on Linux.
$ sudo apt install php5.6
$ sudo apt install php7.0
$ sudo apt install php7.1
Use the update-alternative command to switch and set the default version of PHP you want to run:
sudo update-alternatives --set php /usr/bin/php5.6
Then confirm:
php -v
You could use remi repository. Try with these commands:
#!/bin/bash
yum -y update
sudo yum -y install amazon-linux-extras
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum-config-manager --enable remi-php56
sudo yum -y install php56-gd php56-curl php56-mysql php56-ldap php56-zip php56-fileinfo php56-php-pecl-zip
sudo scl enable php56 bash
You can find a complete guide in this link https://www.tecmint.com/install-php-5-6-on-centos-7/
Actually, I don't understand what's the problem going on
You can install the zip extension for php 7 on ubuntu by using the ssh command line:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
try
sudo apt-get install php-zip
And then you need to restart apache to include this extension:
sudo service apache2 restart
As mentioned, it requires the zip extension.
You can install it by running:
sudo apt-get install php7.2-zip
Upgraded to Ubuntu 16.04 and facing problem after installing PHP5.
Installed PHP-5 with following:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5.5 # for PHP 5.5
Trying to install php-curl but its not working.
sudo apt-get install php5-curl
Error: E: Unable to locate package php5-curl
In Ubuntu 16.04 default PHP version is 7.0, if you want to use different version then you need to install PHP package according to PHP version:
PHP 7.4: sudo apt-get install php7.4-curl
PHP 7.3: sudo apt-get install php7.3-curl
PHP 7.2: sudo apt-get install php7.2-curl
PHP 7.1: sudo apt-get install php7.1-curl
PHP 7.0: sudo apt-get install php7.0-curl
PHP 5.6: sudo apt-get install php5.6-curl
PHP 5.5: sudo apt-get install php5.5-curl
This worked for me.
sudo apt-get install php-curl
This works for me:
sudo apt-get install php5.6-curl
Do:
apt-get update
And then:
apt-get install php5-curl
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php8.0-curl
To Install cURL 7.49.0 on Ubuntu 16.04 and Derivatives
wget http://curl.haxx.se/download/curl-7.49.0.tar.gz
tar -xvf curl-7.49.0.tar.gz
cd curl-7.49.0/
./configure
make
sudo make install
For Ubuntu 18.04 or PHP 7.2 users you can do:
apt-get install php7.2-curl
You can check your PHP version by running php -v to verify your PHP version and get the right curl version.
sudo apt-get install php5.6-curl
and restart the web browser.
You can check the modules by running php -m | grep curl
Recently the new php7 has been released. However, when I am trying to install the gd package, the library can not be found.
I have tried through
sudo apt-get install php70-gd
and
sudo apt-get install php70-php-gd
Does anybody have an idea if gd is available for php 7?
PHP7 packages for Ubuntu including php7.0-gd can be installed via PPA for PHP by Ondřej Surý:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Next, install the desired version:
sudo apt-get install php7.0-gd
# or
sudo apt-get install php7.1-gd
# or
sudo apt-get install php7.2-gd
# or
sudo apt-get install php7.3-gd
# or
sudo apt-get install php7.4-gd
EDIT:
As MacroMan stated, under Ubuntu 16.04 you don't need to add the repository any more. Simply issuing sudo apt-get install php7.0-gd works.
just try
sudo apt-get install php7.0-gd
i got it working that way.
Greetings.
In 2018, there is an alias package for this:
sudo apt-get install php-gd
Use this to retrieve the last version.
my php version is 7.1
sudo apt-get install php7.1-gd
this command is work for me
For
Ubuntu 16.04.4 LTS
this is the command:
sudo apt-get install php7.0-gd
check php verison first using
php -v
It will give version number suppose your version is 7.0.1 then use this command to install GD Library
sudo yum install php70-gd
OR use this command depending upon server specification
sudo apt-get install php7.0-gd