Not able to install ssh2 in centos 7 - php

I am not able to install ssh2 in centos.
I using apache2 and PHP 7.3
I using below command and giving me error as below
yum install gcc php-devel libssh2 libssh2-devel php-pear make
pecl install -f ssh2
but it's showing me below error
No package php-devel available.
No package php-pear available.
please tell me what I missing.

In CentOS 7, what about enabling EPEL and then yum install php-pecl-ssh2
EDIT: Looks like CentOS 7 includes PHP 5 by default. The ssh2 page (https://pecl.php.net/package/ssh2) says:
ssh2 1.0 and above is PHP 7 only. To install a version that is PHP 5
compatible you can run 'pecl install ssh2-0.13'

Related

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

Can I install php-ldap 5.3.3 when my php version is 5.4.31?

I have php 5.4.31 installed on a Centos 6 machine.
When I use
yum install php-ldap
The information yum provides me after I run the command is in the picture.
So yum asks whether I want to install php-ldap version 5.3.3-49 and php-common version 5.3.3-49. Can I let yum install these suggested packages?
My server has php version 5.4.31 and I want to keep it like that for now.

how to degrade version of Phalcon 3.2.2 to version 2

From this documentation i have installed the phalcon https://phalconphp.com/en/download/linux
i can that it is successfully installed, but the version is 3.2.2, but i have already inbuilt application which works with version 2..
so i want to degrade the version 3.2.2 to 2 how can i do that.?
this is how i installed:
curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | sudo bash
sudo apt-get install php5-phalcon
# Ubuntu
sudo apt-get install php5-dev php5-mysql gcc libpcre3-dev
Do i need to remove the version 3.2.2.?
then install v 2 please tell uninstalling and installing version 2.?
help is appriciated.

Can't upgrade SSH2 with pecl

My current version of pecl SSH2 is 0.12 and I am trying to upgrade it to 0.13.
I tried both:
pecl upgrade ssh2-0.13
and
pecl install ssh2-0.13
and got
ERROR: pecl.php.net/ssh2 not installed
Not much feedback, what else can I try?
using php 5.6 and PEAR 1.9.5
I am using CentOS and following helped me to upgrade, might help you too
yum install gcc php-devel php-pear libssh2 libssh2-devel
// or in ubuntu(deb) sudo apt-get install ...............
pecl install -f ssh2
Actually i removed my old version and did above. And i installed all the packages that require. Please make sure you have installed all the required packages (gcc, php-devel, php-pear, libssh2, libssh2-devel) and then try to install or upgrade again.

phpize Can't find PHP headers in /usr/include/php

stack: PHP 5.4.23, php-fpm, nginx 1.4.x, centos 6.5
I was trying to install xdebug, had to run phpize command.
I have php5-devl already installed and pecl command works
When I ran the command, it gave me the following error output:
# phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
How to fix this error?
I think you have not installed php-pear . I am not seeing it in that link.
You can do it by yum install php-pear
Info
You can install xdebug also using these steps
1) Install PHP’s devel package for PHP commands execution
yum install php-devel
Make sure you also have php-pear package installed
yum install php-pear
2) Install GCC and GCC C++ compilers to compile Xdebug extension yourself.
yum install gcc gcc-c++ autoconf automake
3) Compile Xdebug
pecl install Xdebug
4) Find the php.ini file using
`locate php.ini`
And add the following line
[xdebug]
zend_extension="/usr/lib64/php/modules/xdebug.so"
xdebug.remote_enable = 1
5) Restart Apache
service httpd restart
6) Test if it works – create test.php with the following code
<?php phpinfo(); ?>
The problem got solved by the PHP version that is used in the system.
My PHP Version was 5.6
So by running the following command I solved the problem
yum install php56-devel
Where "56" is your version of PHP.
If you're on PHP 7 such as in my case just installing php-devel won't solve your problems, but you'll need to install some additional packages:
yum install php-devel pcre-devel gcc make
And then you'll be able to follow Harikrishnan steps to get xdebug working (if not yet configured).
My problem hasn't been solved using
yum install php-devel
But this helped me to solve the problem:
yum --enablerepo=remi,remi-php55 install php55-php-devel

Categories