Connection error to SQL SERVER By ip public

0

I have installed xammp on my home computer, I am developing a web inventory for a company, it is ready, I established a local connection from the company to the server of the same one and without problems connected, then I wanted to test the connection from outside the company through its ip public and it worked in the same way, the problem is that I arrive on Monday to implement new features to the page, but when I connect to the server with the ip public I get this error:

  

[0] = > Array ([0] => 08001 [SQLSTATE] => 08001 [1] => 1326 [code] = >   1326 [2] = > [Microsoft] [ODBC Driver 17 for SQL Server] Provider of   named pipes: Could not open a connection with SQL   Server [1326] Logon timeout has finished

     

[Microsoft] [ODBC Driver 17 for SQL Server] Error related to the network   or instance specific when establishing connection to the SQL server   Server. The server is not found or is not accessible. Check if   the name of the instance is correct and if SQL Server is configured   to allow remote connections.

This is my code:

$serverName = "206.18.78.5";//NOMBRE DEL SERVIDOR    
$connectionInfo = array("DATABASE"=>"ESTRELLA", "UID"=>"sa", "PWD"=>"hjhff254");

    $conn = sqlsrv_connect($serverName, $connectionInfo);//SE EJECUTA LA CONEXION
    if( $conn ) {
    }else{
         echo "Conexión no se pudo establecer.<br/>";
         die( print_r( sqlsrv_errors(), true));
    }
    
asked by Eduardo 14.11.2018 в 19:31
source

0 answers