Jump to content

What is the best connection technique?


fcaserio

Recommended Posts

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

 

 

Link to comment
https://forums.phpfreaks.com/topic/155840-what-is-the-best-connection-technique/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.