ssh2: Unable to initialize module - ssh

I install ssh2 on my server
but when i check the result is :
PHP Warning: PHP Startup: ssh2: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20090626
These options need to match in Unknown on line 0
I uses centos 6 and directadmin

libssh2 is notoriously difficult to install. Personally, I would recommend you try phpseclib, a pure PHP SSH2 implementation.

You could try to install ssh2 through yum, enabling remi.repo if required:
$ sudo yum install php-pecl-ssh2
It will install php-pecl-ssh2 package of the same version as your PHP is.
But it also possible to install it through pecl if you have any reasons to do it:
# yum install php-devel
# pecl channel-update pecl.php.net
# pecl install ssh2
Tested for Oracle Linux 7.

Related

How to install mod_wsgi for apache2.4 with python 3.6 in centos?

I am a new to web development.I have created Django(-v 2.2) web application and I want to deploy it on my linux server(OS Centos).After installation apache2, when I was going to install libapache2-mod-wsgi-py3, it says that no package available. Is there different name for libapache2-mod-wsgi-py3 for OS Centos?
It is always recommended to install mod_wsgi directly into the python3 package using pip3.
pip3 install mod_wsgi
If you install mod_wsgi into the OS, it could cause conflict and unexpected behavior.
Do you have apache2-dev installed?
Also, for mod_wsgi it is better to go the CMMI path (configure-make-make install) in order to compile it with the correct version and load it in Apache as a module. This worked for me on Debian VPS:
To do so,
wget https://github.com/GrahamDumpleton/mod_wsgi/archive/4.6.5.tar.gz
tar xvfz 4.6.5.tar.gz
cd mod_wsgi-4.6.5
whereis apxs
whereis python3
./configure --with-apxs=/usr/bin/apxs --with-python=/usr/bin/python3.5
make
sudo make install
Double check the path for apxs and python, and run make install as sudo.
When it’s all ready, check the last line of prompt results, as there will be a path to a file: /usr/lib/apache2/modules/mod_wsgi.so
To cleanup after installation, run:
make clean
If you need to build the module for a different version of Apache, you should run:
make distclean
If you have a httpd.conf file, you should edit and add this line:
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
If not, create it and paste that line, and edit /etc/apache2/apache2.conf. file, by adding this line:
Include /etc/apache2/httpd.conf
You don't need that file to configure apache, but you can create it if other software relies on it being there.
You should restart Apache and check the log
sudo tail /var/log/apache2/error.log
as there should be a line that says:
Apache/2.4.25 (Debian) mod_wsgi/4.6.5 Python/3.5 configured -- resuming normal operations

How to fix: fatal error: openssl/opensslv.h: No such file or directory in RedHat 7

I have RedHat Enterprise Linux Server 7, and I downloaded the linux kernel version 4.12.10 which I am trying to compile but when I execute the following command:
make modules
I get the following error:
scripts/sign-file.c:25:30: fatal error: openssl/opensslv.h: No such file or directory
Does anyone have an idea to fix this please ?
To fix this problem, you have to install OpenSSL development package, which is available in standard repositories of all modern Linux distributions.
To install OpenSSL development package on Debian, Ubuntu or their derivatives:
$ sudo apt-get install libssl-dev
To install OpenSSL development package on Fedora, CentOS or RHEL:
$ sudo yum install openssl-devel
Edit :
As #isapir has pointed out, for Fedora version>=22 use the DNF package manager :
dnf install openssl-devel
For Alpine Linux:
apk add openssl-dev
On CYGwin, you can install this as a typical package in the first screen. Look for
libssl-devel
for resolving this issue install:
# yum install openssl openssl-devel
and then try again to do make bzImage.

Which file extension should be in for MediaWiki installation for pecl issue

I am trying to install Mediawik in my ubuntu apache2 server.
As the Mediawiki installation page shows up
Warning: The intl PECL extension is not available to handle Unicode normalization, falling back to slow pure-PHP implementation.
I had followed some searched article as follow :
sudo apt-get install php-pear
You will be prompted to confirm the install. Just press “y” and enter. If all goes well you should see it download and install the php-pear package.
Now you will need to install the php5-dev package to get the necessary PHP5 source files to compile additional modules. Enter the following from a shell prompt:
sudo apt-get install php5-dev
If you do not install the php5-dev package and try to install a PECL extension using “pear install”, you will get the following error:
sh: phpize: not found
ERROR: `phpize’ failed
The PECL_HTTP extension requires an additional dependency package to be installed. You can probably skip this for other extensions:
sudo apt-get install libcurl3-openssl-dev
Now we are finally ready to actually install the extension. From a shell prompt enter following but substitute “pecl_http” with the PECL extension name you are installing:
sudo pecl install pecl_http
now I can't figure out what file extension name should go in the "pecl_http" side.
Try sudo apt-get install php5-intl.

Not able to install mod_perl module on the server

In my site I am getting an error : an error occurred while processing this directive
It was working fine before moving to the new server. So when I checked I found that mod_perl module is missing. So I tried to install it by downloading the module to the server and then tried to run using Perl Makefile.pl but it was asking for apache src and I was not able to find it. I can see /usr/bin/apache/ folder but no source file inside the folder.
So I tried to install the module from Cpanel but I got the following error:
The C compiler is not functional and auto repair failed. Perl module installs require a working C compiler. Please repair the C compiler and try again.
Please let me know how to install it as I have tried most of the cases searching the net.
Thanks in advance
It's probably best to use your distro's packaging system to install mod_perl, especially, if apache is installed from a package too.
Yum based systems:
yum install mod_perl
Deb based systems
apt-get install mod_perl
you may need to enable the module using a2enmod
Mostly gcc is either corrupted or not present on your system. Please try to re/install gcc on your system
sudo apt-get update
sudo apt-get install build-essential
On Redhat:
yum update
yum install devtoolset-2-toolchain
It seems like a problem with your installation of gcc. You're using CloudLinux, so you should use yum to reinstall gcc.
$ sudo -i yum install gcc
But you don't need gcc if you install the pre-build packages.
$ sudo -i yum install mod_perl
Either way, you're going to need to get to grips with package installation for your system - and for that you're going to need root access.

Centos 6.7 install PHP module for Apache

Im using a vagrant build vm and trying to install mod_php.
yum install mod_php
.....
Error: php70u-common conflicts with php-common-5.6.17-1.el6.remi.x86_64
Error: httpd24u conflicts with httpd-2.2.15-47.el6.centos.1.x86_64
Error: httpd24u-tools conflicts with httpd-tools-2.2.15-47.el6.centos.1.x86_64
I guess hes trying to download the module for php 7?
How can i install it for php 5.6?
you're installing the wrong version of mod_php. try: yum install mod_php70u