msphpsql icon indicating copy to clipboard operation
msphpsql copied to clipboard

Connection Delay When Used With MySQL

Open v-mabarw opened this issue 12 years ago • 1 comments

In my php.ini if I have both extension=php_sqlsrv_ts.dll and extension=php_mysql.dll enabled and then try to connect to an MS SQL Server there is a several second delay. If you disable extension=php_mysql.dll the connection loads right away. The delay is also there if I enable extension=php_pdo.dll and extension=php_pdo_mysql.dll.

The script I run for testing (note I have all output buffering turned off):

'someUser', 'PWD' => 'somePass', 'ConnectionPooling' => 0, 'Database' => 'someDb')); $finish = microtime(true); echo "Took ".(($finish - $start)/60)." secs"\n; ob_flush(); flush(); sqlsrv_close($conn); ob_flush(); flush(); echo "Closed\n"; ``` ?>

All the output in the script is nearly instant "Starting Took 0.0020201166470846 secs Closed" but the page still shows that its loading for another 5 seconds! So I suspect something is wrong with how the sql server extension shuts down.

I found at least one other person having this issue: [ http://social.msdn.microsoft.com/Forums/en- US/sqldriverforphp/thread/52184d98-df10-48a1-ba13-c9fee6e5aa0f ](http://social.msdn.microsoft.com/Forums/en- US/sqldriverforphp/thread/52184d98-df10-48a1-ba13-c9fee6e5aa0f)

Note: MySql seems to work fine without any delays regardless of what's enabled.

Work Item Details

Original CodePlex Issue: Issue 13506 Status: Closed Reason Closed: Unassigned Assigned to: Unassigned Reported on: Jun 18, 2009 at 5:11 PM Reported by: brendantbs Updated on: Jul 13, 2010 at 9:19 PM Updated by: icosahedron Closed on: Jul 13, 2010 at 9:19 PM

v-mabarw avatar Jul 29 '14 22:07 v-mabarw

On 2010-07-14 04:19:26 UTC, icosahedron commented:

A C.A. Norris in the same thread seems to have resolved the issue by using an older version of libmysql.dll. He references another url in the thread that details the problem. I'm going to close this issue, but feel free to reopen the issue (or open a new one) if this does not solve your problem.

v-mabarw avatar Jul 29 '14 22:07 v-mabarw