Installing sqlsrv module from PHP Pecl Issue

sayedsoft

Registered
Jun 6, 2018
2
0
1
Türkiye
cPanel Access Level
Reseller Owner
hello my name is yaman

i want install sqlsrv module from Home »Software »Module Installers
i have taken this message :

In file included from /usr/local/include/sql.h:19:0,
from /root/tmp/pear/sqlsrv/shared/xplat.h:30,
from /root/tmp/pear/sqlsrv/shared/typedefs_for_linux.h:23,
from /root/tmp/pear/sqlsrv/shared/xplat_winnls.h:24,
from /root/tmp/pear/sqlsrv/shared/FormattedPrint.h:24,
from /root/tmp/pear/sqlsrv/shared/FormattedPrint.cpp:23:
/usr/local/include/sqltypes.h:400:19: error: 'SQLBIGINT' does not name a type
typedef ODBCINT64 SQLBIGINT;
^
/usr/local/include/sqltypes.h:403:20: error: 'SQLUBIGINT' does not name a type
typedef UODBCINT64 SQLUBIGINT;
^
make: *** [shared/FormattedPrint.lo] Error 1
ERROR: `make' failed

how can i install it please help me
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
Hello @sayedsoft,

The sqlsrv PECL module depends on the unixODBC and unixODBC-devel RPMs. You have to install them via YUM before installing the PECL module:

Code:
yum install unixODBC unixODBC-devel
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
Hello @sayedsoft,

It looks like you have an active support ticket open for this topic (#9679899). I'll monitor the ticket and update this thread with the outcome once it's complete.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
Hello,

To update, this looks to relate to internal case EA-7095 where the EasyApache 4 freetds RPM doesn't include libtdsodbc.so. I'll monitor this case and update this thread with the outcome once it's available. In the meantime, the suggested workaround in the support ticket was to install the freetds RPM from the EPEL YUM repo or to use the alt-freetds RPM as provided with CloudLinux.

Thank you.
 

solcre

Registered
Apr 19, 2011
4
0
51
Is this fixed? It is possible to install SQLSRV on a Cpanel running on Centos 6?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
Is this fixed? It is possible to install SQLSRV on a Cpanel running on Centos 6?
Hello @solcre,

There's no update to report on the status of internal case EA-7095 at this time. However, note the SQLSRV, and PDO_SQLSRV PECL modules are only compatible with PHP running on Windows. This is noted on the following document:

PHP: MS SQL Server (PDO) - Manual

The PDO_SQLSRV extension is only compatible with PHP running on Windows. For Linux, see ODBC and » Microsoft's SQL Server ODBC Driver for Linux.
As an alternative, you can use the ODBC EA4 RPM. The following command will install this RPM (PHP 7.0 is the version in the example below):

Code:
yum install ea-php70-php-odbc
Thank you.
 

Apel

Registered
Mar 8, 2021
1
0
1
BD
cPanel Access Level
Root Administrator
Same Problem:

In file included from /usr/local/include/sql.h:19:0,
from /root/tmp/pear/pdo_sqlsrv/shared/xplat.h:30,
from /root/tmp/pear/pdo_sqlsrv/shared/typedefs_for_linux.h:23,
from /root/tmp/pear/pdo_sqlsrv/shared/xplat_winnls.h:24,
from /root/tmp/pear/pdo_sqlsrv/shared/FormattedPrint.h:24,
from /root/tmp/pear/pdo_sqlsrv/shared/FormattedPrint.cpp:23:
/usr/local/include/sqltypes.h:400:19: error: 'SQLBIGINT' does not name a type
typedef ODBCINT64 SQLBIGINT;
^
/usr/local/include/sqltypes.h:403:20: error: 'SQLUBIGINT' does not name a type
typedef UODBCINT64 SQLUBIGINT;
^
make: *** [shared/FormattedPrint.lo] Error 1
ERROR: `make' failed

yum install unixODBC unixODBC-devel already installed in my server.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,151
523
273
cPanel Access Level
Root Administrator
While doing some additional research on this I found the following article about getting this installed:


Can you work through that and let me know if that helps?