Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php SQLSTATE[HY000]-PDOException-Laravel 4_Php_Sql Server_Freetds_Unixodbc - Fatal编程技术网

Php SQLSTATE[HY000]-PDOException-Laravel 4

Php SQLSTATE[HY000]-PDOException-Laravel 4,php,sql-server,freetds,unixodbc,Php,Sql Server,Freetds,Unixodbc,我正在将laravel4与centos5和php5.4一起使用。当我尝试运行查询时,得到以下结果: PDOException SQLSTATE[HY000] Attempt to set unknown LOGINREC field (severity 7) 只是一个简单的查询,如:User::find(1)(具有雄辩的ORM) 我的FreeTDS配置: Laravel数据库配置: 当我运行“tsql-C”时: php-v 解决了的 安装新的Freetds 配置freetds.conf 使用r

我正在将
laravel4
centos5
php5.4
一起使用。当我尝试运行查询时,得到以下结果:

PDOException
SQLSTATE[HY000] Attempt to set unknown LOGINREC field (severity 7)
只是一个简单的查询,如:
User::find(1)(具有雄辩的ORM)

我的FreeTDS配置: Laravel数据库配置: 当我运行“tsql-C”时: php-v 解决了的
  • 安装新的Freetds
  • 配置freetds.conf
  • 使用remi-repo重新安装php-mssql(
    yum--enablerepo=remi安装php-mssql
  • 重新启动apache

    • dblib已启用并按预期工作

  • 致命错误:未捕获异常“PDOException”,消息为“SQLSTATE[HY000]试图在中设置未知的LOGINREC字段(严重级别7)”
    [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