我正在Laravel 4
使用CentOS 5
和PHP 5.4
。当我尝试运行查询时,我得到了这个:
PDOException
SQLSTATE[HY000] Attempt to set unknown LOGINREC field (severity 7)
只是一个简单的查询,例如:User::find(1);
(使用Eloquent ORM)。
[myconf]
host = 172.30.1.24
# tried with port 1433 and 1453
port = 1453
# tried with tds 8.0 and 7.0
tds version = 7.2
....
'sqlsrv' => array(
'charset' => 'iso-8859-1',
'driver' => 'sqlsrv',
'host' => 'myconf',
'database' => 'mydb',
'username' => 'myuser',
'password' => 'mypass',
'prefix' => '',
),
Compile-time settings (established with the "configure" script)
Version: freetds v0.82
freetds.conf directory: /etc
MS db-lib source compatibility: yes
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
PHP 5.4.23 (cli) (built: Dec 11 2013 06:57:28)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.4.4, Copyright (c) 2002-2013, by ionCube Ltd., and
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
答案 0 :(得分:0)
yum --enablerepo=remi install php-mssql
)重启apache