Changes

From SME Server
Jump to navigationJump to search
33 bytes removed ,  17:09, 20 June 2009
m
→‎Check PHP: Spelling correction
Line 223: Line 223:  
and
 
and
 
  phpinfo();
 
  phpinfo();
Section Configure Command, should contain: --with-unixODBC=shared,/usr
+
Section Configure Command, should contain: --with-unixODBC=shared,/usr.
 
There should also be a "odbc"-section further down.
 
There should also be a "odbc"-section further down.
   −
So far the php-functionality have been provided by unixODB and php-odbc and should have worked even before we installed the FreeTDS package.  
+
So far the php-functionality have been provided by unixODBC and php-odbc and should have worked even before we installed the FreeTDS package.  
   −
To test FreeTDS drivers you can do a connection to your remote database, "remoteserver" contain the DSN built in odbc.ini:
+
To test FreeTDS drivers in PHP you can test a connection to your remote database:
 
   $con = odbc_connect("remoteserver", "dbuser", "dbpass");
 
   $con = odbc_connect("remoteserver", "dbuser", "dbpass");
 
   if (!$con) { print("There is a problem with SQL Server connection."); }  
 
   if (!$con) { print("There is a problem with SQL Server connection."); }  
   else { print("The SQL Server connection object is ready.");  
+
   else { print("The SQL Server connection object seems to work.");  
 
           odbc_close($con); }
 
           odbc_close($con); }
  
206

edits

Navigation menu