Edit report at http://bugs.php.net/bug.php?id=49344&edit=1
ID: 49344
Comment by: tom at punkave dot com
Reported by: rockyjl at gmai dot com
Summary: pdo_mssql fails to connect,throws PDOException
SQLSTATE[] (null) (severity 0)
Status: No Feedback
Type: Bug
Package: PDO related
Operating System: win2003 X64
PHP Version: 5.2.11RC1
Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
Works with the command line tsql tool even though it does not work with
command
line PHP. Both using the FreeTDS that was installed on PHP's behalf.
Previous Comments:
------------------------------------------------------------------------
[2011-04-11 18:47:33] tom at punkave dot com
Still experiencing this error. Tweaking freetds.conf:
[global]
# TDS protocol version
# Microsoft compatible we hope
tds version = 7.0
Had no effect.
PHP 5.3.5 (cli) (built: Jan 27 2011 11:42:56) on macports.
------------------------------------------------------------------------
[2011-01-07 09:37:47] wrobel at wsb-nlu dot edu dot pl
It seems that the problem is solved by changing tds version to 7.0
instead of 8.0 in freetds configuration...
------------------------------------------------------------------------
[2011-01-06 12:11:45] wrobel at wsb-nlu dot edu dot pl
I have the same problem when connecting: PDOException with message
SQLSTATE[] (null) (severity 0).
My environment is:
PHP 5.2.14
apache-2.2.16
Sql Server 2008 Express (and Sql Server 2008 R2)
Linux/PLD
------------------------------------------------------------------------
[2009-10-09 18:56:19] [email protected]
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289440
Log: - Possible fix for bug #49344 on Windows (pdo_mssql fails to
connect,throws PDOException SQLSTATE[] (null) (severity 0))
------------------------------------------------------------------------
[2009-10-07 09:14:41] philipp at servicemail24 dot de
The same error occurs using Ubuntu 0910 with Zend Framework:
require_once('Zend/Db.php');
$db = Zend_Db::factory('Pdo_Mssql', array(
'host' => 'sqlsrv',
'username' => 'php',
'password' => 'secret',
'dbname' => 'myDatabase',
'pdoType' => 'dblib'
));
$result = $db->fetchAll(SELECT * FROM MyTable");
var_dump($result);
Zend_Db_Adapter_Exception: SQLSTATE[] (null) (severity 0) in
/usr/share/php/libzend-framework-php/Zend/Db/Adapter/Pdo/Abstract.php on
line 144
------------------------------------------------------------------------
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
http://bugs.php.net/bug.php?id=49344
--
Edit this bug report at http://bugs.php.net/bug.php?id=49344&edit=1