fcaserio Posted April 27, 2009 Share Posted April 27, 2009 I have an application which runs PHP and SQL Server There is a Linux Server running redhat and PHP 5.1.6 and a Windows Server for SQL 2005. On the last weeks the application started to return eventually mssql_connect erros, saying server is unavailable. There is no network instability that we could map. We've tried to replace mssql_connect with mssql_pconnect, but then the erros returned eventually were on mssql_select_db instead of mssql_connect. I've discovered that PHP 5.1 added a new parameter [, bool $new_link ] on both mssql_connect and mssql_pconnect. Documantation for new_link says: If a second call is made to mssql_connect() with the same arguments, no new link will be established, but instead, the link identifier of the already opened link will be returned. This parameter modifies this behavior and makes mssql_connect() always open a new link, even if mssql_connect() was called before with the same parameters. What is the best technique recommended to connect to SQL Server for a production server? mssql_connect or mssql_pconnect? new_link = true or new_link = false? tks for any help Quote Link to comment https://forums.phpfreaks.com/topic/155840-what-is-the-best-connection-technique/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.