Bug #64338 [Com]: pdo_dblib can't connect to Azure SQL

2013-06-11 Thread mah at everybody dot org
Edit report at https://bugs.php.net/bug.php?id=64338&edit=1

 ID: 64338
 Comment by: mah at everybody dot org
 Reported by:mah at everybody dot org
 Summary:pdo_dblib can't connect to Azure SQL
 Status: Closed
 Type:   Bug
 Package:MSSQL related
 Operating System:   any
 PHP Version:5.5.0alpha5
 Block user comment: N
 Private report: N

 New Comment:

Could we get this fix backported?


Previous Comments:

[2013-06-04 05:03:31] s...@php.net

Automatic comment on behalf of ssufficool
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=d8f938c78478c211dc3b5609e9f37d2e2c47896f
Log: FIX BUG #55647, #60512, #60512, #61900, #64338, #64808, #63638


[2013-06-04 03:40:23] ssuffic...@php.net

Automatic comment on behalf of ssufficool
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=d8f938c78478c211dc3b5609e9f37d2e2c47896f
Log: FIX BUG #55647, #60512, #60512, #61900, #64338, #64808, #63638


[2013-06-01 05:58:54] ssuffic...@php.net

Automatic comment on behalf of ssufficool
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=0e2bcf3373d914a215784c041a2a4c3b6afc2034
Log: FIX BUG #64338, #64808, #63638


[2013-03-04 16:05:50] mah at everybody dot org

Updated the patch to fix a segfault that I observed when I turned on FreeTDS' 
debug log. See http://lists.ibiblio.org/pipermail/freetds/2013q1/028280.html


[2013-03-02 19:36:53] mah at everybody dot org

Yes, this is on Linux.  If you're using Azure to host your Linux machine (which 
I am), it makes sense to use the Azure-hosted SQL database if you can.

I've already attached a patch and tested the patch that does exactly what you 
suggest.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=64338


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64338&edit=1


Bug #64338 [Com]: pdo_dblib can't connect to Azure SQL

2013-03-02 Thread mah at everybody dot org
Edit report at https://bugs.php.net/bug.php?id=64338&edit=1

 ID: 64338
 Comment by: mah at everybody dot org
 Reported by:mah at everybody dot org
 Summary:pdo_dblib can't connect to Azure SQL
 Status: Open
 Type:   Bug
 Package:MSSQL related
 Operating System:   any
 PHP Version:5.5.0alpha5
 Block user comment: N
 Private report: N

 New Comment:

Originally reported to Debian: http://bugs.debian.org/702079


Previous Comments:

[2013-03-02 15:29:43] mah at everybody dot org

Description:

The SQL database available on Azure apparently does not have the same
connection semantics as SQL Server.  “use DATABASE” is not possible — it
returns an error saying that you should open a new connection if you
want a new database.

This is confusing when you are using the DBLIB connector because it is
the DBLIB connection code that does the “use”, not the developer's PHP
code.

The FreeTDS people recognized this a while back:

About a year ago we added the DBSETLDBNAME macro as a way to set the
dbname in the db-lib LOGINREC.  That sets the dbname in the login
packet, obviating the need for "USE dbname".

http://lists.ibiblio.org/pipermail/freetds/2012q4/028168.html

The attached patch makes use of DBSETLDBNAME and eliminates the USE.


Test script:
---
https://bugs.php.net/bug.php?id=64338&edit=1