Sunday, September 9, 2012

Windows + PHP + Remote MSSQL server




... Not applicable when used on one computer. Another computer to MSSQL server
TCP / IP remote access is worth referring
 

BSD or Linux environment by installing public sources FreeDTS, reliable access to external MSSQL. However, Windows and PHP, MSSQL environment from remote TCP / IP access to, or when the procedure does not run, the resulting message does not take, such as some of the problems arise.

First to use MSSQL PHP_MSSQL.DLL expansion module settings in the php.ini file means that you need.

Customized registry If the remote TCP / IP to connect to SQL server xan.reg file if you are registered.
registry db connections in Windows applications have gotten one ODBC SQL server directly connected the necessary libraries, which handle the db connection using a library is.

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServerClientConnectTo]
"DSQUERY" = "DBNETLIB"

And on your computer that you want to connect to the definition
If you are using MSSQL Client Network Utility.

Example) "220.85.19.99 \ db143" = "DBNMPNTW, 220.85.19.99 \ db143, 1433"


DBNMPNTW.DLL (named pipe when)
DBNETLIB.DLL (tcp / ip SQL server 2000 when)
dbmssocn.dll (tcp / ip SQL server 7.0 when)
sqlsrv32.dll


And, because Null is returned when you run the stored procedure insert, delete, update query results error with the PHP will recognize and discard this part is or should be treated as a simple script. If we expect see in the next version MSSQL.DLL is considering whether to process in the udanax.org.


$ lastMessage = mssql_get_last_message ();
if (strstr ($ lastMessge, "Changed database context") && strstr ($ lastMessge, "context"))

No comments:

Post a Comment