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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.