• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Native support to SQL Server

Marcio Nunes

Basic Pleskian
Lost one customer because Plesk don't allow connect to external SQL Server.

Don't have any module to PHP 7 that work with plesk. I test many methods.
PDO, MSSQL and others.. without success!

Is very normal external connections to view specific data internal from business.
SQL server Microsoft is popular BBDD to CRM and database intranet.
 
Sorry. Forget mention Linux.
This feature is important to Plesk Linux. 90% small business use WordPress or Joomla web.
 
Did you try to use Microsoft Drivers for PHP for SQL Server - GitHub - Microsoft/msphpsql at PHP-7.0-Linux ?
I have installed in on Plesk 17.5 without any problems:

# yum install gcc make plesk-php71-devel unixODBC-devel
# /opt/plesk/php/7.1/bin/pecl install sqlsrv
# /opt/plesk/php/7.1/bin/pecl install pdo_sqlsrv
# echo "extension=sqlsrv.so" > /opt/plesk/php/7.1/etc/php.d/sqlsrv.ini
# echo "extension=pdo_sqlsrv.so" > /opt/plesk/php/7.1/etc/php.d/pdo_sqlsrv.ini
# plesk bin php_handler --reread

# /opt/plesk/php/7.1/bin/php -m | grep sqlsrv
pdo_sqlsrv
sqlsrv
 
Try to use plesk-php71-dev and unixodbc-dev names for these packages.
 
First test dont show "$numRegistros", but whitout errors. I need confirm with my customer the data connect MSSQL.

<?php
$dbhost = "xxxxxxxxxxxxxx"; #Nome do host
$db = "xxxx"; #Nome do banco de dados
$user = "xxxx"; #Nome do usuário
$password = "xxxx"; #Senha do usuário

$conninfo = array("Database" => $db, "UID" => $user, "PWD" => $password);
$conn = sqlsrv_connect($dbhost, $conninfo);

$instrucaoSQL = "SELECT id,Codigo from VEtapas WHERE CodPerletivo = 2017 order by Codigo";

$params = array();
$options =array("Scrollable" => SQLSRV_CURSOR_KEYSET);
$consulta = sqlsrv_query($conn, $instrucaoSQL, $params, $options);
$numRegistros = sqlsrv_num_rows($consulta);

echo "Esta tabela contém $numRegistros registros!\n<hr>\n";

?>

phpinfo load this:

sqlsrv support enabled
ExtensionVer 4.0.8.0
Directive Local Value Master Value
sqlsrv.ClientBufferMaxKBSize 10240 10240
sqlsrv.LogSeverity 0 0
sqlsrv.LogSubsystems 0 0
sqlsrv.WarningsReturnAsErrors On On
pdo_sqlsrv

pdo_sqlsrv support enabled
ExtensionVer 4.0.8.0
Directive Local Value Master Value
pdo_sqlsrv.client_buffer_max_kb_size 10240 10240
pdo_sqlsrv.log_severity 0 0
 
Ok!
Try with PDO could not find driver, but mssql "work" whitout errors and dont show any request from MSSQL.
This is issue from Plesk or Microsoft?
 
Back
Top