Q:

SQLSTATE[HY000] Unknown host machine name (severity 2)

I have a problem in which I can not find a solution and I was hoping that you could help me out. 
I rolled back my server and now none of the php scripts can now connect to other servers.  The scripts are up to date as the rollback is from last week.  
I get the SQL error: 

SQLSTATE[HY000] Unknown host machine name (severity 2)

And on cmd I get: 

SQLState = S1T00, NativeError = 0 Error = [unixODBC][Microsoft][SQL
  Server Native Client 11.0]Login timeout expire
  d SQLState = 08001, NativeError = 10022 Error =
  [unixODBC][Microsoft][SQL Server Native Client 11.0]A network-related
  or                                              instance-specific
  error has occurred while establishing a connection to SQL Ser
  ver.  Server is not found or not accessible.  Check if instance name is
  correct an                                             d if SQL Server
  is configured to allow remote connections.  For more information
  see SQL Server Books Online.  SQLState = 08001, NativeError = 10022
  Error = [unixODBC][Microsoft][SQL Server Native Client 11.0]TCP
  Provider: Error                                              code
  0x2726

On telnet I can connect to remote server.  
sqlcmd also lets me connect to the remote server
Please if anyone could help me out.  I do not know what to do next. 
All help will be greatly appreciated. 
This is a test script to try the connection
$link = mssql_connect('xx.xxx.xxxx.xx,1433','myuname','mypwd');

    if (! $link) {
    die('Something went wrong while connecting to MSSQL:'.  mssql_get_last_message());
    }

A:

I just needed to modify the etc/network and modify interfaces file and do
sudo /etc/init.d/networking restart For some reason the dns-namesevers were wrong.