issue with php 5.4.23 in intl extension installation - php

I have PHP 5.4.23 on my CentOS with Nginx as webserver
and I am trying to install php-intl extension
I ran below command
# yum --enablerepo=remi install php-intl
It ran successfully but still my phpinfo don't show this extension...
please help

Related

Add SQLSRV extension on multiple PHP versions on Ubuntu/NGINX

I had a server set up with the following installed and running:
Ubuntu 20.04
NGINX 1.17.10
PHP 7.4.5
The PHP installation does have the PDO SQLSRV driver installed and working properly.
I needed to add PHP 5.6 to the same server for an older web site. I was able to successfully install PHP 5.6. but I can't seem to get the SQLSRV driver part to install properly.
I had previously installed the mssql tools on the server when setting up PHP 7.4:
apt-get install msodbcsql17 -y
apt-get install mssql-tools
apt install unixodbc-dev
pecl install sqlsrv
pecl install pdo_sqlsrv
In trying to set it up for 5.6, I did follow the steps for the original install. I ran the following commands:
printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/5.6/mods-available/sqlsrv.ini
printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/5.6/mods-available/pdo_sqlsrv.ini
phpenmod -v 5.6 sqlsrv pdo_sqlsrv
pecl config-set php_ini /etc/php/5.6/fpm/php.ini
ls /etc/php/5.6/fpm/conf.d/*sqlsrv.ini
All commands ran successfully. I then added the following lines to the relevant php.ini file /etc/php/5.6/fpm/php.ini
extension=sqlsrv.so
extension=pdo_sqlsrv.so
I reloaded and restarted php5.6-fpm and then restarted NGINX. PHP 5.6 is successfully installed and I can see the info by running phpinfo(). I got no errors during installation. However, under PDO, PDO Drivers is showing no value. I also confirmed that sqlsrv_connect is not recognized.
I know it would be ideal not to have multiple versions of PHP or to have installed them at separate times, but I didn't have a choice on this project. Do I need to install a separate version of sqlsrv and pdo_sqlsrv on the box, or am I just missing something in the installation?

Not able to install ssh2 in centos 7

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'

php extension 'interbase' is not loaded

I searched a lot from the internet but did not find a solution.
I want to define interbase/Firebird in php. (extention) to connect to firebird servers.
but php extension 'interbase' is not loaded.
How can I do that?
thank you so much.
Operating System : Centos 7
Php : Php 5.6.40
Apache : httpd-2.4.6-90.el7.centos.x86_64
[root#server ~]# yum list installed | grep php
cwp-suphp.x86_64 0.7.2-3 #cwp
cwpphp.x86_64 7.0.32-1 #cwp
php.x86_64 5.4.16-46.el7 #base
php-cli.x86_64 5.4.16-46.el7 #base
php-common.x86_64 5.4.16-46.el7 #base
php-interbase.x86_64 5.4.16-9.el7 #epel
php-pdo.x86_64
looks loaded
[root#server ~]# ls /usr/local/lib/php/extensions/no-debug-non-zts-20131226/
opcache.a opcache.so
but not here
You have to install fbclient 2.5, that's expected.
Pdo_firebird loads just fine, PDO is builtin in PHP, there is no need to enable
php_pdo.dll. Are you sure that you did not mix versions?
Try installing a php version 7.0 or 7.1, 7.2
and its modules ...
I don't know if it's available in version 5.4 this extension for Fireburd
Access the terminal (as root) and execute the commands below, according to your system version:
CentOS / RHEL 7.x:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
CentOS / RHEL 6.x:
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Installing php 5.6:
yum install php56w php56w-cli php56w-common php56w-devel php56w-mbstring php56w-pecl-imagick php56w-xml
Enabling php extensions:
Firebird / Interbase:
yum install php56w-interbase
Ldap Module:
yum install php56w-ldap
GD Module:
yum install php56w-gd
MySQL:
yum install php56w-mysql php56w-mysqlnd
MSSQL Server:
yum install php56w-mssql
ODBC:
yum install php56w-odbc
RFQ:
yum install php56w-pdo
PostgreSQL:
yum install php56w-pgsql
Restart apache:
service httpd restart
See that you have a module for Firebird in php 5.6
I advise if you have opportunity upgrade to php 7.0 or 7.1 or 7.2
For 5.6 is already on its way to being discontinued.
Send us news about your success, ok ...
Greetings!

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.

uninstall mongodb php driver and install a different version

I'm using Ubuntu Xampp (Lampp) and currently on MongoDB 1.5.3 driver.
I need to downgrade to 1.4.5, but when re-installed the downgraded driver, it does not change in phpinfo(). Yes, I have restarted Apache.
So, how do I uninstall the current one and install the downgraded version?
Update: 2018-06-20:
PECL package mongo is now deprecated, you should use mongodb package instead:
sudo pecl install -f mongodb-1.4.4
Original answer
You can upgrade to a specific version of a driver by using pecl:
sudo pecl install -f mongo-1.4.5
If you get a pecl: command not found error you will need to install PEAR package:
sudo apt-get update && sudo apt-get install php-pear
You can use this command to check that you have the correct version installed:
sudo pecl info mongo
Or you can check php configuration directly with:
php -i | grep -A 1 MongoDB

Categories