서버에서 현재 실행중인 php 5.5이고 FreeTDS dblib이 설치되어 있습니다.'SQLSTATE [] (null) (심각도 0)'메시지가있는 PDOException '
php -v
반환;
PHP 5.5.0-dev (cli) (built: Oct 23 2012 15:41:58) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
빌드
같은 것입니다;Configure Command => './configure' '--with-apxs2=/usr/bin/apxs2' '--enable-track-vars' '--with-mssql' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-zlib-dir=/usr' '--enable-ftp' '--with-gd' '--enable-freetype-4bit-antialias-hack' '--with-config-file-path=/etc' '--enable-calendar' '--with-curl' '--with-curlwrappers' '--enable-exif' '--with-mysql' '--with-ldap' '--with-freetype-dir=/usr' '--enable-sockets' '--with-pdo-mysql' '--enable-soap' '--with-mcrypt' '--with-pdo-dblib' '--with-openssl' '--enable-sysvsem' '--enable-shmop' '--enable-pcntl' '--with-xsl'
단순히 다음과 SQL 서버 상자에 연결을 시도하고있다;
<?php $pdo = new PDO ('dblib:host=fqdn,port;dbname=db', 'usr', 'passwd'); ?>
출력은 다음;
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[] (null) (severity 0)' in /path/to/file.php:17 Stack trace: #0 /path/to/file.php(17): PDO->__construct('dblib:host=fqdn...', 'usr', 'passwd') #1 {main} thrown in /path/to/file.php on line 1
흥미롭게도 guide to confirming your FreeTDS installation 다음에 나오는 명령은 나를 위해 실행되지 않는 명령을 나타냅니다. 나는 FreeTDS의 재설치를 시도 할 것이다.