Skip to main content

Installing sqlsrv module from PHP Pecl Issue

Comments

9 comments

  • cPanelMichael
    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: yum install unixODBC unixODBC-devel
    Thank you.
    0
  • sayedsoft
    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: yum install unixODBC unixODBC-devel
    Thank you.

    unixODBC unixODBC-devel is installed in my host
    0
  • cPanelMichael
    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.
    0
  • cPanelMichael
    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.
    0
  • solcre
    Is this fixed? It is possible to install SQLSRV on a Cpanel running on Centos 6?
    0
  • cPanelMichael
    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 [QUOTE]The PDO_SQLSRV extension is only compatible with PHP running on Windows. For Linux, see " 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): yum install ea-php70-php-odbc
    Thank you.
    0
  • Apel
    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.
    0
  • cPRex Jurassic Moderator
    @Apel - can you let me know which PHP version you're using so I can test this on my end?
    0
  • cPRex Jurassic Moderator
    While doing some additional research on this I found the following article about getting this installed:
    0

Please sign in to leave a comment.